Joshua Posted November 17, 2009 Posted November 17, 2009 Not ready to turn it on yet, but will be once i re-open my site. Curious how i Can stop sql errors from displaying? Quote
Arek Posted November 17, 2009 Posted November 17, 2009 If i remember correct error_reporting(0) should work. Also in php.ini you can use display_errors = off Quote
Joshua Posted November 17, 2009 Author Posted November 17, 2009 I do not see a php.ini file Would this go in header? error_reporting(0) ? Quote
Joshua Posted November 17, 2009 Author Posted November 17, 2009 Thought so, I'll give it a shot and see what happens >,< Wanna get your butt kicked in connect 4? :O lawl. Quote
Arek Posted November 17, 2009 Posted November 17, 2009 Done some more reading and placing "php_value error_reporting 0" in htaccess would work too (better, depending on how you look at it) and no thanks :P Quote
Joshua Posted November 17, 2009 Author Posted November 17, 2009 Oh god i'm no good with htaccess, i'd prolly stick it in the wrong spot >,< Quote
Joshua Posted November 17, 2009 Author Posted November 17, 2009 Yeeeeh no :P I may give it a try later, gonna sit here and have my coffee and see if anyone joins my connect 4 game :P Quote
CrazyT Posted November 17, 2009 Posted November 17, 2009 lmao - MySQL errors willl only show if mysql_error() is there. Quote
Joshua Posted November 17, 2009 Author Posted November 17, 2009 Shows what you know. I have no mysql_errors() and though I havent been able to cause any to show since i updated a few things, they were. Mysql errors tend to show when .....kids...Like you try sql injections. I want it to send a blank page or no error at all. Don't want you guys knowing my tables after i Re-name them. Going to secure and re-name for extra security. Quote
CrazyT Posted November 18, 2009 Posted November 18, 2009 Shows what you know. I have no mysql_errors() and though I havent been able to cause any to show since i updated a few things, they were. Mysql errors tend to show when .....kids...Like you try sql injections. I want it to send a blank page or no error at all. Don't want you guys knowing my tables after i Re-name them. Going to secure and re-name for extra security. lmao - You wont see mysql_error() because it is in the database class file that is how you use $db->query('some query'); -.- Go to folder class -> db_class_mysql.php or something like that and you will see that in there. -.- Quote
Joshua Posted November 18, 2009 Author Posted November 18, 2009 yep, and that's been changed to something else. Quote
snailian Posted November 19, 2009 Posted November 19, 2009 You could use an empty "or die()" at the end of your mysql statements if you don't want to return an error. For example: mysql_query($sql) or die(); Or if you'd like, you can display a message in the die() function when mysql calls don't go right. For example: mysql_query($sql) or die("Error, Your IP has been logged. This event will be reviewed by an administrator."); Quote
Joshua Posted November 20, 2009 Author Posted November 20, 2009 I went through the class/class.db file and configured it there, was a bit more indepth >< Quote
ishmell Posted November 20, 2009 Posted November 20, 2009 In php put the fallowing code on the page you want no errors to display. You can change the value to 1 if you want them to display. ini_set('display_errors', 0); You can also create a php page and put that code in it then include that page to your pages or even put it in your header.php if its for your game. Quote
Joshua Posted November 20, 2009 Author Posted November 20, 2009 I used MTG's function for class_db_mysql.php It doesnt show errors to anyone other than ID 1. <3 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.