You are not logged in.
Hi all,
I have a peculiar problem. My http error log show these lines repeatedly:
PHP: syntax error, unexpected '&' in /etc/php/php.ini on line 107
PHP: syntax error, unexpected '&' in /etc/php/php.ini on line 108
My /etc/php/php.ini's lines 104 through 109 are:
104 ; error_reporting
105 ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
106 ; Development Value: E_ALL
107 ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
108
109 ; html_errors
So the &s on line 107 are to be expected, and line 108 is empty. Does anyone have any idea what's going on here?
Thanks !
Offline
As line 108 is empty, my first guess would be a chroot for your webserver / PHP interpreter. Is PHP really using the file you are looking at?
Offline
It appears so. From my phpinfo():
Configuration File (php.ini) Path /etc/php
Loaded Configuration File /etc/php/php.ini
Scan this dir for additional .ini files /etc/php/conf.d
Additional .ini files parsed (none)
/etc/php/conf.d contains no files.
Offline
The semi-colon indicates a comment, it seems a bit strange PHP would be annoyed by random formatting in comments... After all, that's why they're comments.
Are you sure there's nothing wrong higher up?
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I agree there must be something going on that has little to do with the file mentioned. Even when I remove all the &s from line 107, or insert a few blank lines before line 107 (moving the supposedly wrong lines down) it still complains about &s in lines 107 and 108.
But where do I look?
Offline
Make sure you use an editor with syntax highlighting, and go up until you find the error. Look especially close at the lines you remember having edited before.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I agree there must be something going on that has little to do with the file mentioned. Even when I remove all the &s from line 107, or insert a few blank lines before line 107 (moving the supposedly wrong lines down) it still complains about &s in lines 107 and 108.
But where do I look?
I'd recommend checking your web server's config on wether a chroot is set or someting.
You could also try
sudo find / -name php.ini
This should list all php.ini's in your file system, including the one php is actually using.
Offline
Make a backup of /etc/php/php.ini and then empty the file, or delete at least everything after line 106. Then restart your http server. If the error still occours, then you're working definitely on the wrong php.ini
Offline