Post by oc-hastings » Thu Nov 07, 2019 4:21 am

Hi Community

An upgrade on our web server's MariaDB last night was unsuccessful and took down all the databases.
I was alarmed to see our data sensitive connection details printed in php error displayed on our OpenCart website.
I've got Display Errors in dashboard settings set to No.

How do I hide sensitive connection details if there is a problem on the server again?

Thanks

New member

Posts

Joined
Fri Jan 16, 2015 10:58 pm

Post by IP_CAM » Thu Nov 07, 2019 7:53 am

In your Shop ROOT php.ini file, set display_errors to OFF:
display_errors = Off;
(or: display_errors = Off for some yet unknown to me reason ... 8) ;) )
https://superuser.com/questions/527296/ ... ia-php-ini

You also might find some valuable information here:
https://www.mssqltips.com/sqlservertip/ ... -database/
https://perishablepress.com/stupid-htaccess-tricks/
https://www.google.com/search?q=Enable+ ... e+Database
https://www.accuwebhosting.com/blog/ena ... ql-server/
https://www.sqlshack.com/how-to-set-and ... nnections/

Good Luck!
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + 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 oc-hastings » Thu Nov 07, 2019 5:46 pm

Thanks Ernie

New member

Posts

Joined
Fri Jan 16, 2015 10:58 pm

Post by oc-hastings » Thu Nov 07, 2019 7:09 pm

Is there an approriate chmod for php.ini? (If that's not a daft question.)

New member

Posts

Joined
Fri Jan 16, 2015 10:58 pm

Post by ADD Creative » Thu Nov 07, 2019 11:54 pm

Any production server should have display_errors = Off by default. It seems many hosting servers out there don't do this. https://github.com/opencart/opencart/issues/7650

To ensure no errors are being displayed, a must for any live store, you need to do all of the following.
1. Set the PHP display_errors setting to Off (or 0 or false). This may need to be done in you main php.in, local php.ini, user.ini, .htaccess or hosting control panel, depending on you hosting setup.

2. Set $_['error_display'] to false in you system/config/default.php file (if there is one).

3. Set Display Errors to No in the OpenCart settings.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ADD Creative » Fri Nov 08, 2019 12:20 am

IP_CAM wrote:
Thu Nov 07, 2019 7:53 am
(or: display_errors = Off for some yet unknown to me reason ... 8) ;) )
php.ini files should not have a semicolon at the end on a line. The semicolon indicates the start of a comment.

A semicolon on the end of a value can cause issues in some hosting configurations where the php.ini file is not processed directly by PHP. An example is cPanel with its MultiPHP INI Editor enabled. It will include the semicolon as part of the value leading to "charset `UTF-8;' not supported" errors.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by IP_CAM » Fri Nov 08, 2019 1:37 am

Thanks for the information, I just have them in my 1.5.6.x Version, but I have been reading
about lately, and was not sure, if it possibly only concerns later OC Versions. And lucky me,
I never had any problems because of that either, since my brilliant Server seems to handle
that as planned. That's, why I figured to mention it, just to make sure... ;)
Ernie

PS:: Who the hell is removing some of my Postings here ? And for what Reason ? I was on
10925 already some days ago, and this afternoon again, to now see that Number again.
If someone does not like me, just let me know, and I'm history here for good ... :'(

My Github OC Site: https://github.com/IP-CAM
5'200 + 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
Who is online

Users browsing this forum: Majestic-12 [Bot] and 47 guests