Post by neeticollections » Tue Apr 04, 2017 10:34 pm

Hello,
The MySQL on my hosting company went down. During this time, accessing the front end of my site was showing below error and was listing the user id and password for my website's database. This is a big flaw. I think the code should catch the error and return more user friendly message on the front end. The technical details and trace logs can be sent to Systems-> Error Logs.in the Admin section of the site.

prntscr.com/esawcp


Posts

Joined
Tue Apr 04, 2017 9:32 pm

Post by IP_CAM » Tue Apr 04, 2017 10:48 pm

that's a real Problem, and the possibly only way, to prevent it, would be, to have
a top hoster, in order to avoid, a DB to ever be out of service.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by neeticollections » Tue Apr 04, 2017 11:20 pm

Hello,
No matter if you have the best hosting company in the world, the outage would happen once in a while. I think the code should be smart to NOT show user id / password or other details that could compromise the security.

Somebody please help me with some fix / solution / work around.


Posts

Joined
Tue Apr 04, 2017 9:32 pm

Post by IP_CAM » Wed Apr 05, 2017 6:34 am

well, I assume, it's a Server Information.
Ernie
Last edited by IP_CAM on Fri Apr 07, 2017 1:20 am, edited 1 time in total.

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by artcore » Wed Apr 05, 2017 2:37 pm


Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by neeticollections » Wed Apr 05, 2017 4:02 pm

Thanks artcore !!

I have added following code in - system/library/db/mysqli.php

if ($this->connection->connect_error) {
die('Unable to connect to database');
}


Posts

Joined
Tue Apr 04, 2017 9:32 pm

Post by artcore » Wed Apr 05, 2017 4:57 pm

Or 'something went wrong, please contact the webmaster'. No one needs to know details ;D

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands
Who is online

Users browsing this forum: No registered users and 9 guests