4

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?

4 Answers 4

6

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

Sign up to request clarification or add additional context in comments.

Comments

2

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.

4 Comments

Its hosted (privately) so I have no access to /var. Thanks
OK, how about the error plugin? wordpress.org/extend/plugins/error-reporting
check your installation's root for error_log file or the plugin's root that causes the error..some servers are configured that way.
@Scott, the error-reporting came a bit closer. I actually have errors but I'm still not getting the errors from the main problem. The problematic code is some utility functions file inside a subdirectory of wp-content
1

It is very useful for development WordPress installation set to true WP_DEBUG constant in wp-config.php file:

/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/

define('WP_DEBUG', true);

You will see much more, including PHP noticing and WordPress messages about deprecating staff usage.

1 Comment

This is one of the first things we tried. Thank you though. I'm thinking something is conflicting.
1

on the .htaccess file in your root directory add the following line.

php_flag display_errors on

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.