简体   繁体   中英

php script with errors resulting in a blank page

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM