php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6084 PHP-4.0.1pl2 is treating filenames differently!?
Submitted: 2000-08-10 18:23 UTC Modified: 2000-08-17 16:23 UTC
From: m0ntar3 at home dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.1pl2 OS: RH6.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: m0ntar3 at home dot com
New email:
PHP Version: OS:

 

 [2000-08-10 18:23 UTC] m0ntar3 at home dot com
I have php scripts containing this exact code:

<?php
 
    session_start();
    echo session_name()." == ".session_id()."<br>\n";
 
?>
<H3>buggy.php</H3>
[<a href="buggy.php">SELF</a>] 

If the filename is "buggy.php", the first session_start() is lost, but the second session_start() is retained (i.e. a sess_* file is created in /tmp on the first call, then another is created in /tmp on the second call, and this second file is used there on).

If the filename is "buggy1.php", the first session_start() is retained---like it's supposed to be.

If the filename is "buggy2.php", then the behavior is similiar to that of "buggy.php". Except _sometimes_ the first and second session_start() are lost, and the third is retained. I think this is dependent upon the state of sess_* files in /tmp.. puzzling.

If the filenmae is "1234567890.php", things work normally, as in the case of the filename "buggy1.php".

Another note, refreshing a page starts a new session if there is no PHPSESSID defined in the URL. If PHPSESSID is defined in the URL, then no new session is created when refreshing a page.

I compiled with --enable-trans-sid and --enable-track-vars, I have cookies turned off in php.ini, and referral_check turned on. 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-10 18:38 UTC] m0ntar3 at home dot com
The short it---my installation of PHP4.0.1pl2 works reliably iff my filenames end in '1'.

Example: filename.php don't work and filename1.php does.
 [2000-08-17 16:23 UTC] sas@php.net
Your referral_check value is probably wrong. Please set it to "" (without the quotes), until you read the documentation.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 23:01:27 2025 UTC