Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress won't allow PHP errors

Tags:

php

wordpress

I have a site I am working on currently that uses Wordpress. However it makes it a bit difficult to debug because I cannot get PHP errors to display on the page. Instead I get the white screen of death.

I have tried adding the defines in the wp-config.php file and in the php.ini file to no avail. I also can't add the flags in the .htaccess because of the way the server handles apache/php.

One thing I noticed is that any page outside of Wordpress displays errors fine.

Any suggestions?

like image 910
Jason Turner Avatar asked Dec 27 '22 17:12

Jason Turner


2 Answers

Try adding ini_set("display_errors","2"); ERROR_REPORTING(E_ALL); to the index.php file.

like image 174
dotty Avatar answered Dec 30 '22 05:12

dotty


Can you get access to /var/log/httpd/error_log? If you're on Linux, this is (by default) where the errors would be shown.

like image 37
Scott C Wilson Avatar answered Dec 30 '22 07:12

Scott C Wilson