Jump to content

Emptied setting.inc.php files.


Recommended Posts

Hi All,

I am really in a bad situation. My prestashop is not working, it constantly shows this error

please someone help me

Fatal error: Uncaught Link to database cannot be established: SQLSTATE[HY000] [2005] Unknown MySQL server host '_DB_SERVER_' (0) thrown in /home8/shoperaa/public_html/classes/db/DbPDO.php on line 109, this is getting ridiculuos , i don't even understand why this issue occurs?

Link to comment
Share on other sites

For example:

 

define('_DB_SERVER_', 'localhost');

define('_DB_NAME_', '');

define('_DB_USER_', '');

define('_DB_PASSWD_', '');

define('_DB_PREFIX_', 'ps_');

define('_MYSQL_ENGINE_', 'InnoDB');

define('_PS_CACHING_SYSTEM_', 'CacheMemcache');

define('_PS_CACHE_ENABLED_', '0');

define('_MEDIA_SERVER_1_', '');

define('_MEDIA_SERVER_2_', '');

define('_MEDIA_SERVER_3_', '');

define('_COOKIE_KEY_', 'ELgkrJs295iK0QHuFjxpyB555WaybRrh7VvAgStpxDjoVwsgs8XZKz4q');

define('_COOKIE_IV_', 'NdaUfx3J');

define('_PS_CREATION_DATE_', '2012-12-09');

define('_PS_VERSION_', '1.5.2.0');

define('_RIJNDAEL_KEY_', 'tyBq30iNd1eGomULuCxFhYp55uHEIG7Z');

define('_RIJNDAEL_IV_', 'Qu55y5SXo4P4cOlT2WcqTw==');

Edited by Alexander Simonchik (see edit history)
Link to comment
Share on other sites

I was able to fix just by replacing the files, but unfortunately i was not able to understand why they were emptied, i feel it is either something related to the mobile template since it happened right after i installed it, enabled and then disabled it but then i sort of think the www. issue which i still have may have an effect on it, my shop still has the domain.az not www.domain.az name, i tried to use the fix which came out it started throwing many different small issues so i decide to go on the safe side

Link to comment
Share on other sites

Attention! Attention everyone, I don't understand why, but the file got emptied again today, this is very strange, i replaced the file this time again but I have a feeling that this is going to continue, can somebody help me to track the issue, or how can i do that?

 

Hello KamranMK, thank you for the feedback. It is through information like this that we continue to make PrestaShop better each day.

 

I will go ahead and mark this thread as SOLVED, thank you for choosing PrestaShop!

 

Best Regards,

 

Benjamin

 

 

I guess you will have to undo the SOLVED, since this issue occured today again

Link to comment
Share on other sites

Hi Alexander, thanks for replying, for now I have changed the permissions to the file from 644 to 444 and the issue sort of stopped, which means i don't experience it right now but everything can happen, that's what i think as well, i have disabled the mobile theme for now, when you mean check overrides, what exactly should i check?

Link to comment
Share on other sites

Here is the list of my changed files, maybe you can find out why this has happened

 

  • footer.php
  • header.php
  • classes/AddressFormat.php
  • classes/Cart.php
  • classes/Link.php
  • classes/db/DbPDO.php
  • classes/shop/Shop.php
  • config/config.inc.php
  • config/defines.inc.php
  • config/smarty.config.inc.php
  • config/xml/modules_list.xml
  • js/jquery/plugins/autocomplete/jquery.autocomplete.css
  • js/jquery/plugins/fancybox/jquery.fancybox.css
  • js/jquery/plugins/jqzoom/jquery.jqzoom.css
  • js/jquery/plugins/jqzoom/jquery.jqzoom.js
  • modules/blockbestsellers/blockbestsellers-home.tpl
  • modules/blockbestsellers/blockbestsellers.tpl
  • modules/productcomments/productcomments-extra.tpl
  • modules/productcomments/productcomments.css
  • modules/productcomments/img/star.gif
  • override/classes/shop/Shop.php
  • override/controllers/admin/AdminProductsController.php

Link to comment
Share on other sites

  • 4 months later...

Hi there,

I had a lot of test installations and this happened to me a couple of times too. Usually after upgrades.

I never had an idea why this could happen and did not read much about that in the forum.

Today I made another shop upgrade and after I loaded the modules page to reinstall the paypal module the settings.inc.php was emptied again. Is there any chance that that the paypal module is the suspect? My vague guess is, that it might related to the paypal module or/and the mobile theme enabling/disabling. Maybe the reports of "crashed paged" are related to that. I know that I had that a lot of times during playing around after test upgrades with the 1.5.x branch. Now usually I have a copy of settings.inc.php but the bug is reproducable although I am not sure when exactly it is triggered.

All the best, trip

Edited by Trip (see edit history)
Link to comment
Share on other sites

  • 11 months later...

Had no problems with the latest 1.5x versions. Before that I changed file permission so web user had not write permissions on the file but before upgrades you should change that back as there might be changes to the file.

Regards, Trip

Link to comment
Share on other sites

×
×
  • Create New...