First some data about my setup:
PHP 4.2.3 (I bet nothing has changed till PHP 4.3.2 regarding
sessions) running on Windows 2K server
My PC:
Windows 98 SE
Browser:
IE 6.0.2600.0000
Now, the problem occurs when using sessions and header
('Location: ...');
test1.php
/**********************/
<?
session_save_path ('c:/winnt/temp/'); //making sure that the path
is correct, I override any value set in php.ini
session_start ();
$_SESSION ['someVar'] = 'Hello';
session_write_close (); //saving session data and closing it
header ("Location: http://hqserver/....../test2.php");
//echo '<a href="http://hqserver/....../test2.php">To
test2.php</a>';
?>
test2.php
/**********************/
<?
session_save_path ('c:/winnt/temp/');
session_start ();
var_dump ($_SESSION);
?>
So, when I first open browser and go to test1.php I get redirected to
test2.php and see this output:
array(0) { }
When I edit the link in IE linkfield from test2.php (rememeber..
there was a redirect) to test1.php and open it once again, I get:
array(1) { ["someVar"]=> &string(5) "Hello" }
If I comment out header in test1.php and uncomment the HTML hyperlink
and go to test2.php using it, it works from the first time.
Thanks for any help solving this issue.
Cheers,
Donny
PS. My php.ini settings regarding sessions:
session.auto_start
Off Off
session.cache_expire
180 180
session.cache_limiter
nocache nocache
session.cookie_domain
no value no value
session.cookie_lifetime
0 0
session.cookie_path
/ /
session.cookie_secure
Off Off
session.entropy_file
no value no value
session.entropy_length
0 0
session.gc_maxlifetime
1440 1440
session.gc_probability
1 1
session.name
PHPSESSID PHPSESSID
session.referer_check
no value no value
session.save_handler
files files
session.save_path
c:/winnt/temp/ C:\php4.2.3\sessiondata
session.serialize_handler
php php
session.use_cookies
On On
session.use_trans_sid
1 1
<--------------------===================================-------------------->
Mažėja “Omnitel” paslaugų kainos privatiems abonentams!
SMS žinučių kaina - iki 20%
Minimalūs paslaugos mokesčiai - iki 33%
Pokalbių tarifai - iki 33% (naujas planas DRAUGAI 60)
http://www.omnitel.lt/?m_lt$79357_94571#z110474
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php