tags:

views:

41

answers:

1

Hello,

I have a php script with a few errors in. It's impossible to debug since its not showing me the errors!!

I tried:

my first line in my script contains following:

   <?php  ini_set('display_errors',1); error_reporting(E_ALL); ?>

but its still not giving me any errors, anyone?

/home/cpeasyapache/src/php-4.4.9/php.ini-dist
/home/cpeasyapache/src/php-4.4.9/php.ini-recommended
/home/cpeasyapache/src/php-5.2.12/php.ini-dist
/home/cpeasyapache/src/php-5.2.12/php.ini-recommended
/scripts/php.ini
/usr/lib/php.ini
/usr/local/cpanel/3rdparty/etc/php.ini
/usr/local/cpanel/3rdparty/etc/php.ini,v
/usr/local/cpanel/3rdparty/etc/php.ini.dist
/usr/local/cpanel/3rdparty/etc/php.ini.keep
/usr/local/cpanel/3rdparty/etc/horde/php.ini
/usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini
/usr/local/cpanel/3rdparty/etc/phppgadmin/php.ini
/usr/local/cpanel/3rdparty/etc/roundcube/php.ini
/usr/local/lib/php.ini
/usr/local/lib/php.ini,v
/usr/local/lib/php.ini-zend_optimizer.bak
/usr/local/php4/lib/php.ini
/usr/local/php4/lib/php.ini,v
/usr/local/php4/lib/php.ini-zend_optimizer.bak
/usr/php4/lib/php.ini
/var/cpanel/3rdparty/lib/php.ini
/var/cpanel/3rdparty/lib/php.ini,v

there are numerous php.ini files, how do I know which one is the one I need to edit?

+3  A: 

If you are hosted somewhere (meaning you do not own and operate the server), contact thier support and have them add

display_errors = On

to the php.ini file. Then you can use

error_reporting(E_ALL);
ini_set('display_errors', '1');

If you are running it yourself, simply make the changes and give it a try.

John
i changed my question, please take a look and see if you can locate what file I need to add that line to?
vick
I believe if you run the phpinfo() it will tell you where it is loading it's environment from.
John