Forums / Basic Configuration / 0 DB_ERROR_NOT_CONNECTED after editing configure.php

0 DB_ERROR_NOT_CONNECTED after editing configure.php

Views: 1,186

Results 1 to 8 of 8
20 Nov 2014, 5:04 PM
#1
michaelchu avatar

michaelchu

Zen Follower

Join Date:
Nov 2011
Posts:
121
Plugin Contributions:
0

0 DB_ERROR_NOT_CONNECTED after editing configure.php

I following the instruction on changing the folder name for zen cart (1.3.9). Was able to see the home page of the cart but can not get into the categories or product pages. Tried to revert back to the original by removing the changes, now I am receiving this error when trying to access the cart admin page
:
0 DB_ERROR_NOT_CONNECTED
in:
[select * from project_version WHERE project_version_key = 'Zen-Cart Database' ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Any ideas on how to fix this? Many thanks.

20 Nov 2014, 5:13 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: 0 DB_ERROR_NOT_CONNECTED after editing configure.php

Generally, that error results from the database name, user and/or password in the configure.php file being wrong.

20 Nov 2014, 6:01 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: 0 DB_ERROR_NOT_CONNECTED after editing configure.php

With regards to the first issue, do you have an .htaccess file in the root of your store? Use a URI rewriter?

And as steve said, would check both configure.php files, the store side and the admin side, verify that the database information is the same in both. Since store side is working any differences in database settings should be copied from the store side to the admin side.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Nov 2014, 6:36 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 0 DB_ERROR_NOT_CONNECTED after editing configure.php

Or you created a syntax error in the configure.php file by adding/removing single-quotes or parentheses or semi-colons, and therefore the db settings later in the file are not being interpreted properly, thus it can't login to the db.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Nov 2014, 3:37 PM
#5
michaelchu avatar

michaelchu

Zen Follower

Join Date:
Nov 2011
Posts:
121
Plugin Contributions:
0

Re: 0 DB_ERROR_NOT_CONNECTED after editing configure.php

I managed to get the access to admin and revert back to the original state (thank god for backups), thanks. But the original problem still exists, I followed the instructions for renaming the zen-cart directory line by line, after the change I can get to the zen-cart homepage but I would get the 404 error when I try to navigate beyond the home page to any of the content. Is there a step missing from the tutorial for renaming directory? I do also have the Ultimate SEO plugin installed.
Also I could access the admin page with no issues under the new directory.

Here is the link to the cart:

https://www.waterbabiesbikini.com/competition-bikinis/

21 Nov 2014, 3:48 PM
#6
michaelchu avatar

michaelchu

Zen Follower

Join Date:
Nov 2011
Posts:
121
Plugin Contributions:
0

Re: 0 DB_ERROR_NOT_CONNECTED after editing configure.php

After further testing, this appears to be the issue with the Ultimate SEO, when turned off I can access the store content but when turned on I would encounter the 404. I tried clearing the SEO url cache but that didn't work. At this point I may need to R/R the SEO plug-in unless any experts know of a quick fix. Any suggestions would be greatly appreciated.

21 Nov 2014, 5:17 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: 0 DB_ERROR_NOT_CONNECTED after editing configure.php

Post your .htaccess ensuring to obfuscate anything of sevurity concern such as your admin directory, your ip address,, any credentials (not expected but stating anyways), etc...

When posting place within code tags that are generated when using the # symbol button above the text entry area for a post.

Another way to think about it is that you are performing some of the steps to install the uri program.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 Nov 2014, 7:02 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 0 DB_ERROR_NOT_CONNECTED after editing configure.php

michaelchu:

After further testing, this appears to be the issue with the Ultimate SEO, when turned off I can access the store content but when turned on I would encounter the 404. I tried clearing the SEO url cache but that didn't work. At this point I may need to R/R the SEO plug-in unless any experts know of a quick fix. Any suggestions would be greatly appreciated.
Yup. Your .htaccess evidently has the old directory in it.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.