phpBB : Critical Error

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Haider
Registered User
Posts: 20
Joined: Wed Dec 22, 2004 3:46 pm

phpBB : Critical Error

Post by Haider »

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/tmp/mysql.sock' (2) in /home2/fisttheo/public_html/FastNU/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home2/fisttheo/public_html/FastNU/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home2/fisttheo/public_html/FastNU/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


Is this a preoblem with phpBB software or my hosting SQL server?

User avatar
pentapenguin
Former Team Member
Posts: 11030
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Post by pentapenguin »

Are you sure you enter the correct database username, password, server, and type?
If so, contact your host and ask them.
The server might just be down.
Support Resources: Support Request Template
If you need professional assistance with your board, please contact me for my reasonable rates.

Efran
Registered User
Posts: 1
Joined: Thu Dec 23, 2004 6:35 am

Post by Efran »

Hi All

I also get this same error and have been digging throught the forums looking for a clue.

I can consistently reproduce the error.

It happens when I as admin, or a remote user delete a topic. I think it only happens if it was the last message in a topic. Also unsure if it makes a difference if the message was the original top message or not.

I first get this message:

Code: Select all

Error in deleting post

DEBUG MODE

SQL Error : 2013 Lost connection to MySQL server during query

DELETE FROM phpbb_topics WHERE topic_id = 21 OR topic_moved_id = 21

Line : 519
File : C:\@Share\@_Web\@Mad_Web\skp\includes\functions_post.php
I have had the same thing happen When I have deleted things as a moderator. It happens if I use the check box Delete this post whilst editing a message as well as if I press the X icon to delete without editing

I have dug through the code and the following SQL is what actually crashes the MySQL server. Then you have to wait for it to restart before you can see your pages again.
DELETE FROM phpbb_topics WHERE topic_id = 21 OR topic_moved_id = 21

[ofcourse with different numbers in different cases]

I have tried the SQL command directly in the DB and that also causes a crash.
[Mad_Server_MySQL (LAN)] ERROR 2013: Lost connection to MySQL server during query

So I am guessing either the schema is wrong (Are there any FORIEGN KEYS anywhere ?) or the wrong SQL was constructed. I am guessing not the second one since it should not crash the MySQL server, just give an error message. Of course the problem could be with the MySQL server! :?:

Ofcourse the forum then needs a Resync !

I am using :

Code: Select all

phpBB 2.0.11, 2222;3333
WINXP Pro SP2 IIS
MySQL Server version 5.0.0-alpha-nt
Just for the record this is the error messages I get. For all practical purposes identical to the one reported by Haider above :
Warning: mysql_connect(): Can't connect to MySQL server on '192.168.1.50' (10061) in C:\@Share\@_Web\@Mad_Web\skp\db\mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\@Share\@_Web\@Mad_Web\skp\db\mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in C:\@Share\@_Web\@Mad_Web\skp\db\mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


Thanks in advance. :D
Efran

RogueScribner
Registered User
Posts: 34
Joined: Thu Oct 14, 2004 10:01 pm

Post by RogueScribner »

I'm having a similar issue:
Warning: mysql_connect(): Too many connections in /home/rogueze/public_html/fanforce/forum/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/rogueze/public_html/fanforce/forum/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/rogueze/public_html/fanforce/forum/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


Now, my server went down a day or two for a few hours but then it came back up. During the down time the site wouldn't load. But now the site attempts to load and I get this error. I guess what I want to know, since I'm pretty ignorant of such matters, is what the problem is? Is the database corrupt or is it a server issue? I want to know where to focus my attention.

Thanks.

Locked

Return to “2.0.x Support Forum”