Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to connect to database server!


Sion.S

Recommended Posts

Hi All,

I have been working on a store here: www.grahamsweet.com/shop

all hase been fine until recenly.

Now i get an intermitant problem when browsing the store. i get a white screen with "Unable to connect to database server!".

 

I also get this problem on the admin side.. but again only intermitantly.

 

Any help or advice would be greatly apreciated.

 

Thanks.

SIon.

Link to comment
Share on other sites

Since your site is insecure, you may want to look for signs of hacker intrusion. It appears your configure.php file has also been changed because when you type in the entire url www.grahamsweet.com/shop/index.php it works, which leads me to believe the cookie path is not set correctly.

 

I suggest you read these threads: Admin Security and Catalog Security BEFORE doing anything else. Then check your configure.php file for changes and your site for malicious code.

 

 

Chris

Link to comment
Share on other sites

Hi. thanks for the reply.

the configure.php file was changed yesterday, as we had to move the database location.

will get them to sort out the security first thing tomorow.

 

This problem was here before we changed that, and its still here now.

Is should emphisise that this is an intermitant problem.. so most of the time when you just type in www.grahamsweet.com/shop it works. but then sometimes it doesnt. the same when browsing the store.. only sometimes ( maybe 1 in 4 ) does it fail.

 

Cheers.

Sion.

 

Since your site is insecure, you may want to look for signs of hacker intrusion. It appears your configure.php file has also been changed because when you type in the entire url www.grahamsweet.com/shop/index.php it works, which leads me to believe the cookie path is not set correctly.

 

I suggest you read these threads: Admin Security and Catalog Security BEFORE doing anything else. Then check your configure.php file for changes and your site for malicious code.

 

 

Chris

Link to comment
Share on other sites

Sion,

 

I tried it several times, and each time it failed. I suggest again, verifying the database location, username and password and ensure they are correct in the two configure.php files.

 

 

Chris

Link to comment
Share on other sites

Hi Chris.

I double checked the database details, and both configure.php files, and all seems correct.

I am able to vew the store and admin side intermitantly from here. I am also useing oscommerce-manager and that is connecting to the DB with no problems.

 

Cheers.

Sion.

Sion,

 

I tried it several times, and each time it failed. I suggest again, verifying the database location, username and password and ensure they are correct in the two configure.php files.

 

 

Chris

Link to comment
Share on other sites

Not and answer to your problem, but somehting you need to know....

 

Visit the link below:

 

How to Secure Your Site

 

Pay close attention to "SECURING THE ADMIN" - Yours is vulnerable.

 

It's easier to do a few security fixes now than to clean up a hacked store later.

 

And if you don't secure the admin your shop will be hacked.

 

It's just a question of when...

:o

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I also wanted to point out that your images folder (and another one) has 777 permissions.

 

That will get you hacked on 99% of the servers out there.

:o

 

Any web accessible folder should have permissions no higher that 755

 

If you must have them at 777 you might consider this

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Hi Chris.

I double checked the database details, and both configure.php files, and all seems correct.

I am able to vew the store and admin side intermitantly from here. I am also useing oscommerce-manager and that is connecting to the DB with no problems.

 

Cheers.

Sion.

 

I've had this problem of intermittent "unable to connect to database server" messages as well. You should talk to your host. I think the problem in my case is that I've asked my host to block my home IP address from being counted in the visitor logs/stats. For whatever reason, this may occasionally cause that problem, though they still haven't been able to eliminate it or even confirm that it's happening on my end, as it goes away by the time I get tech support on the phone. But it doesn't seem to happen at any other computer and hopefully it's not happening to any site visitors.

 

 

Like you, I'd still like a definitive answer of course.

Link to comment
Share on other sites

I've had this problem of intermittent "unable to connect to database server" messages as well. You should talk to your host. I think the problem in my case is that I've asked my host to block my home IP address from being counted in the visitor logs/stats. For whatever reason, this may occasionally cause that problem, though they still haven't been able to eliminate it or even confirm that it's happening on my end, as it goes away by the time I get tech support on the phone. But it doesn't seem to happen at any other computer and hopefully it's not happening to any site visitors.

 

 

Like you, I'd still like a definitive answer of course.

 

 

"It looks to be a user that is causing increased IO due to their queries and is impacting yours. We are taking actions now to help prevent this, please let us know if this reoccurs."

 

This is the message I finally got from my host's tech support. Look like I'm going to be switching from a shared plan to a VPS soon...

Link to comment
Share on other sites

"It looks to be a user that is causing increased IO due to their queries and is impacting yours. We are taking actions now to help prevent this, iplease let us know if this reoccurs."

 

This is the message I finally got from my host's tech support. Look like I'm going to be switching from a shared plan to a VPS soon...

 

thanks for this.

hopefully will get this sorted soon.

The site is going to be moved from a less busy server. hopefully this will help.

Will let you know how it pans out for me.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...