In my httpd error_log I keep getting the following error:

 syntax error, unexpected END_OF_LINE, expecting '=' in /usr/local/lib/php.ini on line 2

When I look at the php.ini file line 2 reads:


If I remove the 0 and save the file, when I try to pull up any of the sites hosted on the server I get the following error:

Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 1536 bytes) in /home/SOMENAME/public_html/wp-includes/default-constants.php on line 194

I put the 0 back in and the sites all come up again.

Is there anyone out there that can shed some light on this?

  • 1
    Did you try reading the file? – Michael Hampton Nov 18 '13 at 23:00
  • Well if you have a zero in the file PHP is mostly likely assuming the entire file is corrupt, and just using defaults. By fixing the file, you stop using the defaults, and use what is explicitly defined in your file. Obviously what you have in that file doesn't work. Perhaps use a page with <?php phpinfo(); to see what is configured when you have a valid configuration, and when you don't have a valid configuration. Fix your configuration based on your needs. – Zoredache Nov 18 '13 at 23:01

Just delete the whole file and reinstall it from your distro's package. That zero should not be there and [PHP] should be line 1 not line 2.

| improve this answer | |
  • Thanks for your help. I tend to get a little nervous when dealing with this type of things. – user140816 Nov 19 '13 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy