AJAX with OK status but still throwing error
Tuesday, March 2nd, 2010Just a quick note to say AJAX can be tricky and difficult to debug on occasion. (more…)

Just a quick note to say AJAX can be tricky and difficult to debug on occasion. (more…)
As you may have guessed, I am writing this because there is an issue with using SimpleXML and Session variables in conjunction with each other. Sessions apparently do not know how to handle object resource values that the SimpleXML engine generates. If you attempt to assign a Session variable to a SimpleXML object value you will get an error similar to this:
Warning: session_start() [function.session-start]: Node no longer exists
Here is an example of assigning the Session variable the “wrong way” (from Authorize.net CIM API):
$_SESSION['profileid'] = $this->results->customerProfileId;
And here is the correct way to assign the Session variable:
$_SESSION['profileid'] = (int)$this->results->customerProfileId;
If the expected data type of the object value is to be a string use (string)
That’s about it for now . . .
I have been using pages to hold content in Wordpress templates for some time now. The problem I have with it is that every time I need to perform such an action I cannot remember how to do it nor where I have done it before. (more…)
When setting a field in a MySQL database to be NULL by default you may run into NULL values in your dataset when querying the database. You cannot simply check if a variable is set using the isset() function in PHP because it returns false for NULL values. To remedy this issue you can use the array_key_exists(‘key’, $dataset) to check if the key exists in the array.
Good to know!
I never really thought about using a framework for PHP. Mostly because I know PHP’s native functions well enough to create anything I needed from scratch. The problem is time consumption with repetitive code and writing it out every time I needed it.
(more…)