PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED
PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED :: select * from zen_project_version WHERE project_version_key = 'Zen-Cart Database' in /home/sammirah/public_html/webstore/includes/classes/db/mysql/query_factory.php on line 120
After deleting the zen cart and database then restoring from the last working copy from May 2015 this is what is showing in the logs. Can someone help me with this please?:please:
Re: PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED
First why did you restore such an old copy??
Check your 2 configure.php files for valid information paying close attention to the DB details
Re: PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED
I restored that copy after attempting to restore the most recent copies to no avail. It was the best copy before this year. Now I am back to the most recent copy from last week.
Here is the includes/configure.php file:
/**
* The following settings define your database connection.
* These must be the SAME as you're using in your non-admin copy of configure.php
*/
define('DB_TYPE', 'mysql'); // always 'mysql'
define('DB_PREFIX', 'zen_'); // prefix for database table names -- preferred to be left empty
define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
define('DB_SERVER', 'localhost'); // address of your db server
define('DB_SERVER_USERNAME', 'sammirah_zenc152');
define('DB_SERVER_PASSWORD', 'XXXXX');
define('DB_DATABASE', 'sammirah_zenc152');
Here is the admin/includes/configure.php file:
* The following settings define your database connection.
* These must be the SAME as you're using in your non-admin copy of configure.php
*/
define('DB_TYPE', 'mysql'); // always 'mysql'
define('DB_PREFIX', 'zen_'); // prefix for database table names -- preferred to be left empty
define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
define('DB_SERVER', 'localhost'); // address of your db server
define('DB_SERVER_USERNAME', 'sammirah_zenc152');
define('DB_SERVER_PASSWORD', 'XXXX');
define('DB_DATABASE', 'sammirah_zenc152');
What am I missing?
Re: PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED
You should change your database password as it was posted briefly but is now removed ...
Re: PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED
Thanks for removing the password for me.
Now is there anything that is missing? What are reasons the database may not be connecting?
Re: PHP Fatal error: 0:DB_ERROR_NOT_CONNECTED
you should check the cpanel for your host and ensure that the DB USER:
sammirah_zenc152
has access rights to the DB:
sammirah_zenc152
and ensure that the password is correct. or change the password from your cpanel and then change the password in your configure.php files.