View Single Post
Old 03-10-2004, 01:56 PM   #1
tomas
Orange Mole
 
Join Date: Feb 2004
Posts: 47
Question https phpdig strange failure

digging a website with some https-forms produces strange failure:

some forms on this website force ssl this way:
PHP Code:
if ($_SERVER["SERVER_PORT"]=="80") {
        
$ssl_redirect "https://foo.com" $_SERVER["SCRIPT_NAME"];
        
header("Location: $ssl_redirect");
        exit;

this leads to:

<b>Warning</b>: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <b>/search/admin/spider.php</b> on line <b>485</b><br />
<br />
<b>Warning</b>: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <b>/search/admin/spider.php</b> on line <b>503</b><br />

about 5 apache processes, consuming about 80% memory remain for hours and spidering fails.

our workaround was:
PHP Code:
if (($_SERVER["SERVER_PORT"]=="80") and (strstr(strtolower($_SERVER["HTTP_USER_AGENT"]), mozilla)!="")) {
        
$ssl_redirect "https://foo.com" $_SERVER["SCRIPT_NAME"];
        
header("Location: $ssl_redirect");
        exit;

but on websites you have no access to scripts the bug will make it impossible to spider the site.

any ideas - anyone
tomas

Last edited by tomas; 03-10-2004 at 02:19 PM.
tomas is offline   Reply With Quote