Support » How-To and Troubleshooting » Can I supress MySQL error messages?

Can I supress MySQL error messages?

  • My hosting service (www.vizaweb.com) is having a bunch of problems which make parts of my site unavailable at the moment. My WordPress blog works, but it generates lots of errors like this one:

    WordPress database error: [Got error 12 from storage engine]
    SELECT DISTINCT post_id, cat_ID FROM wp_categories, wp_post2cat WHERE category_id = cat_ID AND post_id IN (1522)

    Until vizaweb gets things working again, is there a way I can hide these messages? I’m still able to create new entries on the blog.


    Brian Reilly

Viewing 6 replies - 1 through 6 (of 6 total)
  • 1. I’d try to find a decent host – an error like that should be fixed in minutes after they know about it.
    2. I wouldn’t do anything on the blog until it’s fixed.
    3. Unfortunately, I don’t know how to hide those messages.

    Yes, I think finding a new host is a good idea, but I think the one I have is having bigger issues right now than fixing my database problems — I think they got hacked this week and their own site is down. I’m hoping they will resolve that soon. If not, I’ll go someplace else.

    I found the answer to my question if anyone else runs into this. Here is one way to hide the error messages. I am using this temporarily while I wait for my host to repair themselves:

    from niziol

    I use the following code in my .htaccess file to suppress the error messages and log those errors to the server log instead:

    php_flag log_errors on
    php_flag display_errors off

    The only downside is that the visitor will get a blank white page if there is a fatal error. I believe your host does need to allow .htaccess settings to over-ride the php.ini values for this to work, you can also add add/change similar values in the ini file to achieve the same results.

    Good luck,

    Actually that didn’t work. For a moment, I had no error messages but they re-appeared right away.

    I’d love to see an answer for this as well.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can I supress MySQL error messages?’ is closed to new replies.