Re: MySQL error reporting
- From: Paul Furman <paul-@xxxxxxxxxxxxx>
- Date: Mon, 02 Apr 2007 22:48:31 GMT
Jerry Stuckle wrote:
Paul Furman wrote:
Jerry Stuckle wrote:
Paul Furman wrote:
How do I turn off MySQL error reporting? I set error_reporting(0); but that doesn't seem to be working.
That turns off PHP error reporting.
What problem are you having?
Sorry for the slow reply. Any SQL error appears on the screen, and sometimes that includes info I don't want included. Hmm, now that I think of it that may be a built in error reporting system (I didn't write all of this system). In any case is this a risk and is there a way of turning it off? The worst case I recall was something like:
ERROR: unable to connect to the sever using user 'admin' and password 'mysectretpassword'
Ha ha, I made that up as I don't recall that one but I don't want anything like that to happen again!
Preface the mysql_connect() call with an '@' character, i.e.
@mysql_connect(....);
This suppresses any error message for this function. Just be sure to check the response.
Excellent, thank you!!!
.
- Follow-Ups:
- Re: MySQL error reporting
- From: Paul Furman
- Re: MySQL error reporting
- Prev by Date: Re: Stored procedures, MySQL, and PHP
- Next by Date: Re: Files into MySQL
- Previous by thread: Array comparison question
- Next by thread: Re: MySQL error reporting
- Index(es):