Support » Fixing WordPress » How to test php error logging

  • Resolved alvarix


    I just set up the error logging as explained in this codex page:


    at the top of wp-config.

    I don’t think it’s working because hitting a blank page (due to a php error presumably) writes nothing to the log file. In the past I’ve had trouble getting this to work.
    The log file is 660 and sits in the public webroot.

    Is there anyway to test this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • From the link above.

    If WP_DEBUG is defined to true, the errors will also be saved to this file.

    Do you have debugging on?.. (done by editting config.php)

    Thanks. I added that and it certainly populated my error log.
    However I still have two problems:

    1. Enabling wp_debug prints php errors to screen. That is not very cool. Is it meant to just be turned on when you are actively debugging?
    2. I created a test page with an intentional php error, test.php. Visting the page I saw the error printed to screen, but it didnt show up in the error log.

    Any ideas? Thanks again.

    Debugging is for ‘debugging’, it’s not intended as an always on feature, or at least that’s my understanding..

    You host should give you a log option for the main errors you need to aware of..

    For anything else, use PHP’s error reporting…

    wp_debug does print to screen, it’s debugging mode… very handy when doing debugging though, i’ve used it quite a bit….

    Here’s a good article in relation to PHP error reporting.

    I thought the point was to give you quick access to php settings:

    Because wp-config.php… it is an excellent location to set php ini settings that control your php installation.

    Anyway, thanks for your insight.

    PHP ini settings are not something you may have control over, that’s managed by whoever runs the server, in most cases this is your webhost..

    Some settings can be changed (via .htaccess etc..), but some will simply be out of reach unless you have a dedicated or virtual host (is that the term – been a while)..

    It really depends what kind of hosting you have and the kind of access you have to said PHP settings, for the most part these aren’t something average joes gets to fiddle with… (including me with my host – but then i don’t need that).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to test php error logging’ is closed to new replies.