Post by reflexweb » Mon May 14, 2018 11:45 pm

My oc 3x has now started showing this error (error includes db username and password port and IP - (real details have been changed for the error below)
Warning: mysqli::mysqli(): (HY000/2002): Connection timed out in /var/sites/q/foobar.com/public_html/system/library/db/mysqli.php on line 7Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /var/sites/q/foobar.com/public_html/system/library/db/mysqli.php on line 10Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /var/sites/q/foobar.com/public_html/system/library/db/mysqli.php on line 10
Fatal error: Uncaught exception 'Exception' with message 'Error: <br />Error No: ' in /var/sites/q/foobar.com/public_html/system/library/db/mysqli.php:10 Stack trace: #0 /var/sites/q/foobar.com/public_html/system/library/db.php(31): DB\MySQLi->__construct('99.169.0.170', 'questing_uam3', 'tgfrtyc897t8g3fu...', 'questing_ubm3', '3306') #1 /var/sites/q/foobar.com/public_html/system/framework.php(481): DB->__construct('mysqli', '99.169.0.170', 'questing_ubm3', 'tgfrtyc897t8g3fu...', 'questing_uam3', '3306') #2 /var/sites/q/foobar.com/public_html/system/startup.php(104): require_once('/var/sites/q/qu...') #3 /var/sites/q/foobar.com/public_html/index.php(38): start('catalog') #4 {main} thrown in /var/sites/q/foobar.com/public_html/system/library/db/mysqli.php on line 10
My host says the databse has to much traffic - this however is not my concern right now, what is though is the fact the error shown publicly is the db security login details!!!!

How can this be prevented should this happen again?

Thanks in advance
Roger

New member

Posts

Joined
Thu Jun 28, 2012 8:06 pm

Post by reflexweb » Tue May 15, 2018 12:31 am

fixed this by adding php.ini file to root and setting pho error reporting to off
display_errors = 0;

New member

Posts

Joined
Thu Jun 28, 2012 8:06 pm

Post by Johnathan » Tue May 15, 2018 8:59 pm

Turn off error display in System > Settings > Server. You can leave error logging turned on, but the display should always be turned off for a live store.

If that doesn't fix it, talk to your host about how to hide those error messages, and not output them to the web page.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by reflexweb » Tue May 15, 2018 10:00 pm

Thankf for replying !

I have error reporting turned off in oc settings already - but adding the php.ini file and turning off all error reporting is the best and safest option and fixed the problem.

Kinds
R

New member

Posts

Joined
Thu Jun 28, 2012 8:06 pm
Who is online

Users browsing this forum: No registered users and 9 guests