title: Wordpress - PHP Fatal Error - functions.php - while trying to get to wp-admin
body: <p>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.</p>
  
  <p>I have went to the logs and have looked and found the following error:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>I have seen many posts where it says to make the following settings:</p>
  
  <blockquote>
    <p>Increase your allocated memory in wp-config.php or wherever you need
    it:</p>
    
    <p>define('WP_MEMORY_LIMIT', '64M'); </p>
    
    <p>In case PHP itself is running out of
    memory, you can increase that by modifying php.ini and restarting your
    web server.</p>
    
    <p>memory_limit 256M</p>
  </blockquote>
  
  <p>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.</p>
  
  <p>I also turned WP_DEBUG to true and saw this:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>