WordPress – PHP Fatal Error – functions.php – while trying to get to wp-admin-Collection of common programming errors
I have W3TC, Nginx, varnish and php5-fpm installed on an Ubuntu 12.04 image with 768 MB RAM. The site itself is functioning fine, but when I try to access /wp-admin I get an HTTP 500 Internal Server error.
I have went to the logs and have looked and found the following error:
PHP message: PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 5184285 bytes) in /var/www/wp-includes/functions.php on line 251 while reading response header from upstream
I have seen many posts where it says to make the following settings:
Increase your allocated memory in wp-config.php or wherever you need it:
define(‘WP_MEMORY_LIMIT’, ’64M’);
In case PHP itself is running out of memory, you can increase that by modifying php.ini and restarting your web server.
memory_limit 256M
But haven’t had any luck. I have also restored the image from a previous backup and the issue still exists. No plugins have been modified or updated since the previous time I was able to access the backend.
I also turned WP_DEBUG to true and saw this:
Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts , admin_enqueue_scripts , or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /var/www/wp-includes/functions.php on line 2758 Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts , admin_enqueue_scripts , or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /var/www/wp-includes/functions.php on line 2758 Notice: Undefined variable: paged in /var/www/wp-content/themes/organic_magazine/functions.php on line 419