Technology Insights

PHP Script Using Exec Function & Launched From Crontab Hogging Server Memory

While working on a PHP script on a CentOS Linux server that runs from crontab I ran into an issue where PHP was bogging the server down because of memory use. The script has a lot of output that is not necessary to store though when using the exec function within the PHP script it was storing the unneeded output to an away which I believe was causing the memory usage problem. At first I thought I simply needed to modify the memory_limit setting within php.ini however that was not the true issue at hand. Below I describe two items to look at modifying if you run into a similar issue.

Technology Errors

WordPress Pretty Link Not Working, Pretty Link URL’s Open Blank Page

I received a comment on one of the QD posts earlier today that noted the Facebook link-share button posted an incorrect link on Facebook. These social media buttons exist on the bottom of each article on the Question Defense site. Initially when looking into the issue I was confused because he actual URL that was posted was correct meaning it posted the proper Pretty Link via the WordPress Pretty Link plugin however when I tested the actual link I was redirected to the proper domain but the page display was blank. Below is information on the troubleshooting process I used, what the problem ended up being, and how the problem was resolved.

Technology Errors

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes)

I recently reinstalled CentOS on a server for a client and then proceeded to install their WordPress web site on the fresh install of CentOS Linux. After working through various minor issues the WP site was up and functioning without issue but after a week or so they contacted me to let me know that they could no longer view items in their FAQ system via the WordPress administration site. The FAQ system is a WordPress plugin called FAQ Builder and is a great little system for frequently asked questions. Below I describe the error received when attempting to access the FAQ Builder admin and what I did to resolve the issue.