PDA

View Full Version : MYSQL error


dlewisr
06-20-2011, 07:51 AM
Database error in vBulletin :

I am getting the error below on my forum, there were no problems last night but
when I got up this morning this is the message I got. Members are taken to 500
internal server error when they click the what's new and also on the
unreadposts or New Posts.


Database error in vBulletin :

mysql_connect() [<a
href='function.mysql-connect'>function.mysql-connect</a>]: Can't
connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
/home/xxxxxx/public_html/includes/class_core.php on line 314

MySQL Error :
Error Number :
Request Date : Monday, June 20th 2011 @ 05:14:11 AM
Error Date : Monday, June 20th 2011 @ 05:14:11 AM
Script : http://www.xxxxxxxx.co.uk/misc.php?show=ccbmessages
Referrer :
http://www.xxxxxxx.co.uk/showthread.php/419-xxxxxxxxxx
IP Address : 194.66.200.1
Username :
Classname : vB_Database
MySQL Version :


Any ideas or suggestions anyone? I've contacted the server who said it maybe because they have updated to php version 5.3.6 which is my version anyway, so sounds lame. I've asked them to locate and analyse the error logs as there is no error showing in the logs when I looked.

Open to suggestions?
Cheers in advance

Lynne
06-20-2011, 02:00 PM
MySQL can't connect (through socket):

See this page for the causes of this error: https://www.vbulletin.com/docs/html/cantconnect You will most likely need to talk to your host in order to fix the issue.

dlewisr
06-20-2011, 08:52 PM
I emailed them before I went to work and they are now saying that it maybe because I upgraded to 5.3.6 and there is now incompatibility issues with scripts, but I have not upgraded. I'm now emailing to say this. Thank you Lynne and I'll check the link that you mention.

The strange thing is that posts are adding on the 'new posts' and going down when read but not linking when clicked, I've just been informed the search is also directing to the 500 page too.

--------------- Added 1308607576 at 1308607576 ---------------

I've read the link that you sent me........... and I'm baffled by that. I'm no tech savvy, unfortunately.

borbole
06-20-2011, 10:13 PM
I emailed them before I went to work and they are now saying that it maybe because I upgraded to 5.3.6 and there is now incompatibility issues with scripts, but I have not upgraded. I'm now emailing to say this. Thank you Lynne and I'll check the link that you mention.

The strange thing is that posts are adding on the 'new posts' and going down when read but not linking when clicked, I've just been informed the search is also directing to the 500 page too.

--------------- Added 1308607576 at 1308607576 ---------------

I've read the link that you sent me........... and I'm baffled by that. I'm no tech savvy, unfortunately.

Did you contact your host as suggested above? It is something that is caused on their end.

Lynne
06-20-2011, 10:19 PM
Maybe they meant that they upgraded you to 5.3 and that is causing the issue? You should be able to see what version of php your are running in your admincp.

dlewisr
06-21-2011, 06:40 PM
Thank you both for sticking with me! I have contacted them and you're right it is the webserver that upgraded to 5.3.6 I am running that on my site but previously it was 5.2. I don't know how that changes? Can they change that from the web host side? My apologies for sounding such a noobie......... but basically that is what I am.

I asked them when the upgrade occured and the time and date they give me corresponds exactly with that of the first email of the data base error and so it must be incompatibility issues.

There last email was this:

Hello David,

We do not provide support fro custom coding. You will need to code your site appropriately to work with php 5.3. The only alternative to this would be to put you on one of our older servers with the older version of php but be aware this would only be a temporary fix and all servers will eventually migrate to the newest version of php and similar issues will continue. The best solution is to look for a solution on getting your code working on php 5.3.
--
Thank you for choosing HostPapa!

Regards,

I thought Vbullettin was already 5.3.6 compatible. Is it? Although I am still on the 4.1.2 version and haven't upgraded to 4.1.4 yet.

Lynne
06-21-2011, 07:14 PM
vB4 is compatible with php5.3 There is a bug in php5.3 that can cause issues on the search page, and somebody entered it into Jira and there is a fix posted in the bug report (which isn't a vb bug, but a php bug, but it's still in Jira). I do not think that would cause the error you are seeing though since it isn't from the search page. The script you are running is misc.php?show=ccbmessages which happens to be from one of your modifications. You may need to see if it is php5.3 compatible.

dlewisr
06-21-2011, 07:23 PM
there is a problem with the search too and so may be related. The search takes me to the same 500 page too.

--------------- Added 1308687922 at 1308687922 ---------------

what is Jira? I do have a few mods on but they have all been fine, no problems till they upgraded?

Thanks for your help Lynne, which isn't the first time as it happens lol

--------------- Added 1308688120 at 1308688120 ---------------

Just re-read your post, duh, you mean that although they were fine before they may not be now that the upgrade has happened. I'll disable them all tomorrow to see what happens. Too late now as I'm at work in 5 hours and haven't been to bed yet!!!!

I'll let you know tomorrow. Fingers crossed.

--------------- Added 1308763732 at 1308763732 ---------------

I've disabled every mod and there is no change. Was the fix this, that you were referring to Lynne


vb/search/criteria.php

if (method_exists($this->search_type, 'get_display_name'))
{
$hashstrings[] = 'type:' . $this->search_type->get_display_name();
}
else
{
$hashstrings[] = 'type:' . strval($this->search_type);
}

and replace it with

$hashstrings[] = 'type:' . strval($this->search_type);

dlewisr
06-22-2011, 07:45 PM
Just to close this thread as editing the file mentioned above has solved the problem. I'm really grateful for the help Lynne as your post reminded me of the search error I had read some days ago, although I hadn't linked the two.

Thanks for the help too Borbole

Now to reinstall all those mods again lol

cheers again.

Gamelobby
06-20-2012, 06:27 AM
vb/search/criteria.php

if (method_exists($this->search_type, 'get_display_name'))
{
$hashstrings[] = 'type:' . $this->search_type->get_display_name();
}
else
{
$hashstrings[] = 'type:' . strval($this->search_type);
}

and replace it with

$hashstrings[] = 'type:' . strval($this->search_type);
Is this the fix.?
I am having a similar issue.


Database error in vBulletin :

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
/home/mysite.com/forum/includes/class_core.php on line 314