Session and Referer_check problem

From: Date: Mon, 03 Apr 2000 12:56:16 +0000
Subject: Session and Referer_check problem
Groups: php.version4 
Request: Send a blank email to php-version4+get-13034@lists.php.net to get a copy of this message
Hi everyone. I have finally found my problem with the sessions getting recreated for each page. This was due to the referer_check variable. I tried looking in the PHP4 source and I found this : if (PS(id) && PS(extern_referer_chk)[0] != '\0' && zend_hash_find(&EG(symbol_table), "HTTP_REFERER", sizeof("HTTP_REFERER"), (void **) &data) == SUCCESS && (*data)->type == IS_STRING && (*data)->value.str.len != 0 && strstr((*data)->value.str.val, PS(extern_referer_chk)) == NULL) I don't really understand all of this but I guess this tries to see whether the HTTP_REFERER variable is correct. But what does it compare this with ? How does it know the current site name ? Perhaps it would be interesting to feed this function with a url list which is ok (for example I have a site with 2 urls). Anyway I disabled this function and I'm doing the referer check manually for the moment so I'm perfectly happy now 8)

« previous php.version4 (#13034) next »