You can use HTML:
<meta http-equiv="refresh" content="0; url=XXXXXXXX"> -Mike On Thu, 10 Jul 2003, Donatas wrote: > Date: Thu, 10 Jul 2003 19:25:46 +0200 > From: Donatas <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] need help with sessions > > Thanks Luis, > > I had this idea in mind, but still... maybe someone knows a way how to > achieve same effect without using JavaScript? Not that I don't like it but > that there should be some way. > > > PS. Your english is just as great as mine :D > > > -----Original Message----- > From: Luis Ferro [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 10, 2003 4:56 PM > To: [EMAIL PROTECTED] > > One of the things that can be happening is that the server is sending > the "location:" before the session data in the header... and when the > browser gets it, simply forgots the session data. > > I'm not sure of in which version of PHP there was a problem like the one > i'm describing, but i remember very well that i've made a Javascript > redirector to place in the end of the page (after the session > manipulation) to force the current page to go to the browser whole and > then in the browser be redirected to the new page where the session was > needed... > > Hope to have been usefull (and perceptible, from my english ;) ) > Luis Ferro > > Donatas wrote: > > >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 > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php