PDA

View Full Version : Error when adding link


natas
09-15-2008, 04:58 PM
Today I get this error when trying to add a certain link to my links page.

Two things to keep in mind.
1) My mysql server is NOT down. Rest of the site and other sites I host still work
2) This only happens with this link (that I know of so far). I tried to add google.com and it worked fine.

Mysql.log shows no crashed tables or any errors.

Here is the error:

Database error in vBulletin 3.7.3:

Invalid SQL:

SELECT smilieid, smilietext, smiliepath, smilie.title,
imagecategory.title AS category
FROM smilie AS smilie
LEFT JOIN imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder;

MySQL Error : MySQL server has gone away
Error Number : 2006
Request Date : Monday, September 15th 2008 @ 08:48:18 PM
Error Date : Monday, September 15th 2008 @ 08:48:49 PM
Script : http://mydomain.com/links/addlink.php
Referrer : http://mydomain.com/links/addlink.php
IP Address : 71.154.x.x
Username : sjordan
Classname : vB_Database
MySQL Version :

natas
09-16-2008, 10:20 AM
anyone? This is now happening on two sites I try to add.

Our Sponsors
 

Brian
09-16-2008, 11:43 AM
What's the link you're trying to add? And are you using CURL or fsockopen in your 'Remote Site Function' setting?

natas
09-16-2008, 12:42 PM
I am using curl. Here is one site I found that did not work:
http://bornalivetruth.org/

Our Sponsors
 

Brian
09-16-2008, 01:00 PM
I tried submitting that URL here without a problem. So it sounds like your host either has your timeouts set very low so the script doesn't have enough time to check the link, or there's something weird going on with their remote site functions. If this becomes a re-occuring issue then you could always disable the 'Verify New Links' setting in your vBa Links options.

natas
09-16-2008, 01:01 PM
I run my own server, what timeout settings are you referring to?

Brian
09-16-2008, 01:39 PM
My guess would be one of these 3 in your php.ini file:

default_socket_timeout - (60)
max_execution_time (30)
mysql.connect_timeout - (60)

Make sure each of those is set at least as high as the value in parentheses.

natas
09-16-2008, 02:10 PM
those are my values. The link now works for me, maybe there site was slow that day.

Is there anyway to put something in the code that will catch the timeout and allow you to manually input values if it fails?

Brian
09-16-2008, 03:34 PM
Hrmmm... The only thing I can figure then is the site was timing out and then basically causing your MySQL server to timeout as well. If this becomes a re-occuring problem you could try looking in your forum/vba_links_functions_savelink.php file for this code:
curl_setopt($ch, CURLOPT_URL, $link['linkurl']);

And add this right below it to set a strict timeout for CURL:
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);