vasvra Posted February 28, 2014 Share Posted February 28, 2014 Hi I hope somebody can help me. All of a sudden I cannot open the site or the admin section. I get the following message Fatal error: Uncaught Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory thrown in /home/www/xxxxxxxx/classes/db/DbPDO.php on line 57 My server checked the data base and found no problem and says it is a script error. I will appreciate some help Link to comment Share on other sites More sharing options...
vekia Posted February 28, 2014 Share Posted February 28, 2014 hello have you changed something in configuration file ? Link to comment Share on other sites More sharing options...
vasvra Posted February 28, 2014 Author Share Posted February 28, 2014 (edited) Hi Vekia. Thanks for looking at it. I have done nothing to the site for at least 2 weeks and it has been working Ok the last time i checked it. My site is www.digitalelectronics.gr you can see it yourself Edited February 28, 2014 by vasvra (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted February 28, 2014 Share Posted February 28, 2014 strange, perhaps you changed credentials to your database? like login and password are you able to verify it ? for example, with phpmyadmin ? (use credentials to connect to db like you've got in prestashop settings file) Link to comment Share on other sites More sharing options...
vasvra Posted March 1, 2014 Author Share Posted March 1, 2014 Hi Vekia I do get in the database. No problem. The server checked the data base and said it is Ok and also the php test like http://xxxxxxxxxxxx/1mysql.php The only think that come to my mind is that 2 weeks ago I tried to install Prestashop 1.6 but in subdirectory but there I created a new data base. i will try and go back step by step what I did just in case. Link to comment Share on other sites More sharing options...
vekia Posted March 1, 2014 Share Posted March 1, 2014 and what about database credentials in your configuration file? Link to comment Share on other sites More sharing options...
Yenibosnaweb Posted February 2, 2017 Share Posted February 2, 2017 and what about database credentials in your configuration file? I have similar problem. I havent changed any of dbname user name or password. what can be problem www.hedeftoner.com Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory thanks Link to comment Share on other sites More sharing options...
Yenibosnaweb Posted February 2, 2017 Share Posted February 2, 2017 When I use php 5.5 version it gives following error: Fatal error: Call to undefined function mysql_connect() in /home/???????/public_html/classes/db/MySQL.php on line 37 when I use native php 5.5 version it gives: Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory when I use php 7.0 version it gives: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/???/public_html/classes/db/MySQL.php:37 Stack trace: #0 /home/?/public_html/classes/db/Db.php(242): MySQLCore->connect() #1 /home/???/public_html/classes/db/Db.php(199): DbCore->__construct('localhost', 'database_user', 'password32423...', 'database_db') #2 /home/??/public_html/config/alias.php(64): DbCore::getInstance() #3 /home/??/public_html/classes/shop/Shop.php(304): pSQL('www.hedeftoner....') #4 /home/???/public_html/config/config.inc.php(90): ShopCore::initialize() #5 /home/???/public_html/admin/index.php(30): require('/home/??/...') #6 {main} thrown in /home/??/public_html/classes/db/MySQL.php on line 37 Link to comment Share on other sites More sharing options...
Recommended Posts