PHP 4.0 Bug #3549 Updated: phpsessid & include bug
| From: | Bug Database | Date: | Mon, 21 Feb 2000 15:18:06 +0000 |
| Subject: | PHP 4.0 Bug #3549 Updated: phpsessid & include bug | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15752@lists.php.net to get a copy of this message | ||
ID: 3549
User Update by: goral@unet.pl
Status: Open
Bug Type: Misbehaving function
Description: phpsessid & include bug
There seems to be a problem with phpsessid when using include function. I have enable-trans-sid
ENABLED.
Here's an example:
Make test1.php, and put:
<?
session_register("my_link");
$my_link="mylink.php";
include "test2.php";
?>
In test2.php put:
<a href="<?=$my_link?>">This is a link to<?=$my_link?></a>
Now run test1.php and REJECT the cookie.
You'll get:
"This is a link to mylink.php"
and the link is:
?PHPSESSID=53d33977231e561997cf0abbe90ac97d
but is should be:
mylink.php?PHPSESSID=53d33977231e561997cf0abbe90ac97d
When I use require instead of include then the result is:
&PHPSESSID=53d33977231e561997cf0abbe90ac97d
Ofcourse the PHPSESSID stuff is diffrent each time.
Is this a bug, or am I doing something wrong?
PHP config:
It runs as Apache mod,
FreeType enabled
GD enabled
MySQL support
enable-track-vars
enable-trans-sid
If someone needs more info, please email me.
Full Bug description available at: http://bugs.php.net/version4/?id=3549