|
|||
|
I originally private messaged this to knn but he told me to post it here as is... anyways, anyone have any advice? Hi, I'm a member of a UT2004 clan and I helped set up their website. We recently had to reinstall our php forums b/c they were hacked using a cookie exploit and while reinstalling I stumbled across your posts and tried to employ as many of your tips as possible. Anyways, everything was running fine until recently when we began to receive these messages while browsing them: phpBB : Critical Error Could not connect to the database Although if you refresh a couple times it will connect and work... but they're becoming annoying! Anyways, one of my forum admins installed a file attachment mod. I'm not sure if that was the cause of it or not, but it has since been removed and the problems still exist. I'm messaging you today for a couple reasons. First of all to thank you for your tips because they've been very helpful, and second of all to ask you if you've run across this issue before and know how to fix it. I'd also like to be able to back it up if necessary and was wondering if you'd ever finished your php backup suite. After using one of your tips it of course disabled the backup ability but even after renaming the file back to it's original name I still couldn't get it to work. Please feel free to check out our forums to see the error at forums.clan-no.com... Just browse a few minutes and you'll probably run into it. Thanks, MT posted by moving_target |
|||
|
|||
| in-my-opinion.orgTechnology, Computers, Science, InternetSoftware by the adminphpBB error: Could not connect to the database |
|
||||||||||||
|
moving_target: Just browse a few minutes and you'll probably run into it. I am instantly having this error. Are you sure this comes and goes randomly? When I tried to connect to your website yesterday it gave me another error "No such website" or similar... Maybe this is somehow related (but I kind of doubt it)... Try this:
posted by knn |
||||||||||||
|
|
||||||||||||
|
|||
|
Well... when I first googled the problem the only thing I found was that it usually meant that the host server was too busy. So, I emailed the support on my host and they claimed the database was fine and that they couldn't offer any more support on php code than that. So, we've been living with the problem until today, and as far as I can tell the problem is fixed. Unfortunately, I have no idea how! I, nor any of the other admins touched a thing. My only guess is that there was a problem with the host database system and they just didn't admit it to me. Anyways, thanks for your support and keep up the great work! MT posted by moving_target |
|||
|
|||
|
|||
|
Bah... I log on today only to find it won't load any pages at all. Yesterday everything was fine... not one error and today I get nothing. posted by moving_target |
|||
|
|||
|
|||
|
moving_target: not one error and today I get nothing. Do you have another hoster you could try this out? posted by knn |
|||
|
|||
|
|||
|
I thought I replied to this but apparently not. Anyways, I think I tracked down the problem. We backed up our forums and reinstalled. I think I set the mysql version to 4.x instead of 3.x. After getting the version changed it appears the errors are gone, which goes along with one of your suggestions. I appreciate all your help. MT posted by moving_target |
|||
|
|||
|
|||
|
Okay... nevermind that last post. I was completely wrong. After further review it seems like one of your modifications was at fault. It was the encrypted config.php file that was causing the error. For some reason I think the added delay for decrypting it was causing the forums to give that error. I was having a few problems and had to copy over a few more old files, including that modficiation and the errors popped up again. After noticing that the correct mysql version was still selected I set out to find out the cause again and after removing the encryption on the file it worked again. posted by moving_target |
|||
|
|||
|
|||
|
moving_target: It was the encrypted config.php file that was causing the error. Then maybe you encrypted the passowrd and username wrongly? posted by knn |
|||
|
|||
|
|||
|
But why would it work some of the time? Obviously it could decrypt it if it would occasionally. posted by moving_target |
|||
|
|||
|
|||
|
moving_target: But why would it work some of the time? Obviously it could decrypt it if it would occasionally. But then you can ask: Why would it NOT work occasionally. I see nothing supercritical in the script that could cause something like this. posted by knn |
|||
|
|||
|
|||
|
I tried now to slow down phpbb artificially by inserting a 40 millisecond delay in config.php, but everything is fine (except phpbb beeing sloooow). posted by knn |
|||
|
|||
|
|||
|
Yesterday, when I was messing around on the server, I received an "Could not connect to database" error, because I somehow overloaded MySQL. Maybe if there is a server overload something like this happens. In that case it would be your hoster's duty to take care for enough CPU ressources. posted by knn |
|||
|
|||
|
|||
|
Which is what I found when I first googled the problem myself. Perhaps the server is overloaded by decryption process? posted by moving_target |
|||
|
|||
|
|||
|
moving_target: Perhaps the server is overloaded by decryption process? Nah, what kind of server are you on? This server here, I believe, suffers sometimes from high load but I never ever received that error. I mean I am open to the possibility that something like that could happen, but I find it highly unlikely. posted by knn |
|||
|
|||
|
The time now is 12 February 2012, 14:56 php B.B. |