ID: 17186 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Session related Operating System: IRIX64 6.5.15m PHP Version: 4.2.0 New Comment:
Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2002-05-13 13:31:38] [EMAIL PROTECTED] Testing the 4.2.1RC2 as a 64bit CGI with apache2 shows a strange behavior with a simple session script. Based on a example from the manual the following script only works after the page was reload. <?php //ini_set('session.use_cookies',0); session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; } else { $_SESSION['count']++; } ?> <html> <head><title>session test</title></head> <body> <?php echo 'count = '.$_SESSION['count'].'<br />'; echo '<a href='.$_SERVER['PHP_SELF'].'>link</a><br />'; ?> </body> </html> Nothing was shown during the first visit but client asking about for accepting the cookie, so after a reload page would work as aspectet. If the script sets 'session.use_cookies' to 0 the page wont works any more(no output). Same is happend when the same setup was made in the php.ini. Using the cgi via comandline the following output was given back.. Settings: 'session.use_cookies = 1' [o200]:/usr/local/apache/htdocs/php/sessions $ ../../../cgi-bin/php index.php X-Powered-By: PHP/4.2.1RC2 Set-Cookie: SID=8cdd40e358f292da280d84fbba73b6e3; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-type: text/html And now with the -q parameter [o200]:/usr/local/apache/htdocs/php/sessions $ ../../../cgi-bin/php -q index.php <br /> <b>Warning</b>: Cannot send session cookie - headers already sent in <b>/usr/local/httpd64/htdocs/php/sessions/index.php</b> on line <b>3</b><br /> [o200]:/usr/local/apache/htdocs/php/sessions $ and now with Settings: 'session.use_cookies = 0' the output looks similar to the first without the Set-Cookie information. Error_reporting is set to E_ALL and error.log is stil activate but shows nothing. when using the -q parameter no output was shown ?! ../../../cgi-bin/php -q index.php There is a testscript temporaray available under http://194.15.95.23:8080/php/sessions/index.php http://194.15.95.23:8080/php/sessions/index.phps //source http://194.15.95.23:8080/php/sessions/info.php // phpinfo() The same script runs fine with apache 1.3.24 + mod_php and cgi on http://194.15.95.23/php/sessions/index.php [o200]:/usr/local/apache/htdocs/php/sessions $ ../../../cgi-bin/php -m Running PHP 4.2.1RC2 Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies [PHP Modules] xslt xml wddx tokenizer sysvshm sysvsem standard shmop session posix pcre mysql ftp exif dio dbx dbase ctype calendar bcmath [Zend Modules] file ../../../cgi-bin/php ../../../cgi-bin/php: ELF 64-bit MSB mips-4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17186&edit=1
