I have some custom post meta being generated and am ready to add to a post’s meta. I know how to do this. However, save_post causes a redirection after POST data has been sent. This means I am redirected to the dashboard and lose access to my POST data – therefore I cannot debug easily. Currently …
Tag: debugging
Have PHP dump heap on OutOfMemory exception
I am currently debugging a script that constantly runs into OutOfMemory exceptions. It is run as a cronjob and usually runs fine, but when the cronjob wasn’t run for a while (for whatever reason) the script has to handle to many elements that queued up and will run into a OutOfMemory exception. From exa…
PHP – Debugging Curl
I’d like to see what the post fields in the request are before I send it. (For debugging purposes). The PHP library (class) I am using is already made (not by me), so I am trying to understand it. As far as I can tell, it uses curl_setopt() to set different options like headers and such and then it uses
PHP: Notice: Undefined index where the session variable is defined
I am making a registration system with an e-mail verifier. Your typical “use this code to verify” type of thing. I want a session variable to be stored, so that when people complete their account …
How to print all properties of an object
I have an unknown object in php page. How can I print/echo it, so I can see what properties/values do it have? What about functions? Is there any way to know what functions an object have? Answer or These are the same things you use for arrays too. These will show protected and private properties of objects w…
How to Debug Variables in Smarty like in PHP var_dump()
I have some variables inside a template and I don’t know where I assigned them. I need to know what is inside a particular variable; for instance, say I have a variable in smarty called member. I …