Ever go to update WordPress and received this error? Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2516357 bytes) in /home/edm/public_html/wp-includes/http.php on line 1363 That’s because the php.ini is setup to only allocate so much memory to script execution. In this case, my .ini file was set to only allocate 32MB; [...]
Category Archives: Code
HTML Form Processing Tip
No, this isn’t something NEW, but a good reminder… I *assumed* it had been set up correctly to begin with, but I was wrong. So when processing a form (ie: POST form data to a validation/storage function) any input elements with the DISABLED attribute are ignored. Nothing new; right. But you might want to process [...]
$_SERVER, pretty formatting
I laughed my ass off when I was reading through the user comments/notes of the $_SERVER manual today. It’s content from back in October, but who needs to visit the $_SERVER manual on a weekly or even monthly basis? Several people in the past have come up with [>]clever loops to display the contents of [...]
PHP, how to find yesterday
I found a way to use date and mktime function to find/calculate the date for ‘yesterday’ in PHP… then I realized there is an easier to read/understand combination functions that are nearly as fast. Solution 1: $yesterday = date(‘Y-m-d’, mktime(0, 0, 0, date(“m”) , date(“d”)-1, date(“Y”))); Solution 2: $yesterday = date(‘Y-m-d’, strtotime(‘-1 day’)); Solution 2 [...]