Log in

View Full Version : Unable to Spider Corporate Website


jigr69
11-30-2006, 07:51 AM
Hi there

Wondering if anybody out there could help me sort out a problem. We've recently changed servers and have gone from MySQL v4 to v5, as well as a small bump in PHP version.

Since this, I cannot Spider the website. Tracking down the error, I've landed in robots_functions.php script (based on the fact that the robots.txt file wasn't being read and displayed). It seems that the fsockopen keeps failing and returning the NOHOST status back to the calling function.

If I remove the @ symbol on line 333, I get the warnings of:
PHP Warning: fsockopen(): unable to connect to localhost:80 in /apps/chks_web/wwwroot/phpdig/admin/robot_functions.php on line 333
PHP Warning: fsockopen(): unable to connect to localhost:80 in /apps/chks_web/wwwroot/phpdig/admin/robot_functions.php on line 333
PHP Warning: fsockopen(): unable to connect to localhost:80 in /apps/chks_web/wwwroot/phpdig/admin/robot_functions.php on line 333
PHP Warning: fsockopen(): unable to connect to localhost:80 in /apps/chks_web/wwwroot/phpdig/admin/robot_functions.php on line 333

The exactly same setup works fine on a test server....

Anyone know of a workaround or bux fix?

Cheers....

PHP v4.3.9
MYSQL v5.

jigr69
12-01-2006, 12:42 AM
Trawling the 'net for answers to the fsockopen function, it became apparent that since it could connect to external servers, it was an internal server problem.

One of the posts on another forum suggested trying the local hosts file, as its possible that the host name isn't being resolved properly.

Bingo... It was copied from our old server to our new server which has a different IP address. It now works brilliantly again....