cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable showing SQLSTATE errors in browser?

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How to disable showing SQLSTATE errors in browser?

Hello,

 

How to disable show errors in browser.

 

For example I made incorrect URL query and got error message 

SQLSTATE[HY093]: Invalid parameter number: no parameters were bound

 but i don't want show it.

1 REPLY 1

Re: How to disable showing SQLSTATE errors in browser?

Do you have a errors/local.xml file?

 

This file dictates whether the error is printed to the screen or alternatively you cen set it to email the error to you.

 

Here's an example

 

<config>
    <skin>default</skin>
    <report>
        <!--
            "action" can be set to "print" to show exception on screen and "email"
            to send exception on specified email
        -->
        <action>print</action>
        <!--
            in "subject" you can set subject of email
        -->
        <subject>Store Debug Information</subject>
        <!--
            "email_address" admin email address
        -->
        <email_address>user@example.com</email_address>
        <!--
            "trash" is handle about trace info
            value "leave" is for store on disk
            value "delete" is for cleaning
        -->
        <trash>leave</trash>
    </report>
</config>

 

Change the <action> to email and put your email address into <email_address>. 

 

This will stop errors being printed to the screen.