display error shows off on server, on in browser

webguy

Verified User
Joined
Apr 13, 2005
Messages
41
Location
Best, Netherlands
Dear all,
I am having a strange issue in the reporting of the PHP setting "display_errors".
I am running a CentOS system with custombuild and PHP 5.3.18.
PHP is running in CGI mode. My php.ini is at
/usr/local/etc/php5/cgi/php.ini

In php.ini I have set: display_errors = off
When I run php -i I get the following outout:

-bash-4.1# php -i | grep display_errors
Zend Optimizer requires Zend Engine API version 220060519.
The Zend Engine API version 220090626 which is installed, is newer.
Contact Zend Technologies at http://www.zend.com/ for a later version of Zend Optimizer.

display_errors => Off => Off

However, when I view through the browser a file hat calls phpinfo() I get the following:

display_errors: Local Value: On, Master Value: On

Anny suggestions how to resolve this?
 
either your editing the wrong php.ini file or its not really off.

What do you get with:

Code:
grep ^display_errors /usr/local/etc/php5/cgi/php.ini
 
Code:
-bash-4.1# grep ^display_errors /usr/local/etc/php5/cgi/php.ini
display_errors = off

It *is* off and i *am* editing the right file.
I found that the problem might be centos related.

We have several VPS systems with two centos versions:

Machines with
Code:
Linux version 2.6.32-220.17.1.el6.x86_64 ([email protected]) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Wed May 16 00:01:37 BST 2012

do NOT have the problem,

Machines with
Code:
Linux version 2.6.32-279.11.1.el6.x86_64 ([email protected]) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Tue Oct 16 15:57:10 UTC 2012

DO have the problem.
 
It could be that when you run php from the command line, you are actually using one installed with the OS and one installed via custombuild. Try using the full path when executing it:
/usr/local/bin/php
instead of just
php
which uses $PATH to resolve which one to execute.
 
Hi Toml,
I just tried this:

Code:
-bash-4.1# find . -type f -name "php" -print
./usr/local/php5/bin/php

So there seems to be only one php on the server.
 
Back
Top