vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   MYSQL error (https://vborg.vbsupport.ru/showthread.php?t=265517)

dlewisr 06-20-2011 07:51 AM

MYSQL error
 
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 [DATE]1308607576[/DATE] at [TIME]1308607576[/TIME] ---------------

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

Quote:

Originally Posted by dlewisr (Post 2210581)
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 [DATE]1308607576[/DATE] at [TIME]1308607576[/TIME] ---------------

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 [DATE]1308687922[/DATE] at [TIME]1308687922[/TIME] ---------------

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 [DATE]1308688120[/DATE] at [TIME]1308688120[/TIME] ---------------

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 [DATE]1308763732[/DATE] at [TIME]1308763732[/TIME] ---------------

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

Quote:

Originally Posted by dlewisr (Post 2211009)
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.


Code:

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



All times are GMT. The time now is 04:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01017 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete