Discussion:
[PHP-INSTALL] syntax error, unexpected '&' in /etc/php/php.ini on line 107
Diederick de Vries
2012-05-28 15:03:37 UTC
Permalink
Hi all,

I have a peculiar problem. My http error log is flooded with these two
lines over and over again:

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

Everything above these lines is commented, except for the first line,
that reads:

[PHP]

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? Is this a bug?

Thanks!

$ uname -a
Linux bender 3.3.6-1-ARCH #1 SMP PREEMPT Sun May 13 09:59:18 UTC 2012
i686 GNU/Linux

$ php --version
PHP 5.4.3 (cli) (built: May 8 2012 17:09:39)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
Keith Roberts
2012-05-28 17:27:39 UTC
Permalink
Subject: [PHP-INSTALL] syntax error,
unexpected '&' in /etc/php/php.ini on line 107
Hi all,
I have a peculiar problem. My http error log is flooded with these two
PHP: syntax error, unexpected '&' in /etc/php/php.ini on line 107
PHP: syntax error, unexpected '&' in /etc/php/php.ini on line 108
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
Everything above these lines is commented, except for the first line,
[PHP]
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? Is this a bug?
Are you sure you are using that php.ini file?

Are there multiple versions of php installed on the box?

A self-compiled version of php will typically put it's
php.ini file in a different place to a version of php from a
distribution's installation package version of php.

Is this a symbolic link to another file somewhere on the
system.

Make a backup copy of /etc/php/php.ini and delete the
original /etc/php/php.ini file.

Stop and start apache to force it to re-read the
php.ini file the apache php module uses.

If you still get the same error, then you most likely have
conflicting versions of php.ini on that system.

HTH,

Keith Roberts
Thanks!
$ uname -a
Linux bender 3.3.6-1-ARCH #1 SMP PREEMPT Sun May 13 09:59:18 UTC 2012
i686 GNU/Linux
$ php --version
PHP 5.4.3 (cli) (built: May 8 2012 17:09:39)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
-----------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------

Continue reading on narkive:
Search results for '[PHP-INSTALL] syntax error, unexpected '&' in /etc/php/php.ini on line 107' (Questions and Answers)
3
replies
php Parse error I get, I cannot see what I am doing wrong?
started 2007-08-24 06:56:15 UTC
programming & design
Loading...