Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ugh. Cannot Connect to Db Server. How dumb can I be?


cdetdi

Recommended Posts

Warning: mysqli_connect(): (HY000/2002): Connection timed out ...

Unable to connect to database server!

 

Tired topic - asked millions of times, always answered in one way, configure.php.  What else?

 

My situation: moved from shared hosting to a dedicated server.  After move I cannot get passed this error message.

 

How do I know configure.php is working?

I used the auto-installer available in my cPanel to install a new oscommerce installation.  I then modified the configure.php file of the fresh installation to connect to the migrated database.  Viola!  Worked.  (looks like hell, obviously, but products and information loads perfectly)  So, just to be sure, I also copied the fresh database connection information into the migrated site...and will not connect.

 

Two sites, same config file information.  One connects, one gives the error above.  Any ideas?

 

I've done a fair amount of customization to my migrated site, and I am using packages such as SEO URLs.  

 

What OTHER things, besides configure.php could cause this error?

Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference.

Link to comment
Share on other sites

Is the database server setting in configure.php pointing to localhost? If so, are both sites on the same server?

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Same server.  Mad because I won't have enough time to investigate for few weeks. 

Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference.

Link to comment
Share on other sites

ANSWER: VERY DUMB!

 

Unlike my earlier OsCommerce site, the new site on 2.3.3 BS has FOUR configure.php files.

 

includes/configure.php

includes/local/configure.php

includes/[admin]/configure.php

includes/[admin]/local/configure.php

 

Find and update all those files and my site was back to business.

Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference.

Link to comment
Share on other sites

The includes/local/configure.php will override the includes/configure.php. The same for the admin pair. The answer is to delete the includes/local/configure.php and admin/includes/local/configure.php. Keep a coy just in case, but get rid of them.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...