Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different session id in secure page

Status
Not open for further replies.

grovemedia

Technical User
Dec 15, 2003
22
US
I'm kinda new to php and I have session_start(); on a page and when I go to a secure page and use session_start(); it produces a new session id. Is there a way not to produce a new session id? Any help will be appreciated. Thanks.
 
Create a script which consists entirely of:

<?php
phpinfo();
?>

and look at the output of the script both through secure and non-secure connections. Are there differences in the "session" sections of the two outputs?


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I'm on a Mac and I tried both Safari 2.0 and Firefox 1.0.4
 
I assume that sessions work fine within the http:// part of your site and also within the https:// part of your site, but not across the boundary between those two sites, right?

What version of PHP are you running? On that platform with what web server? Are you running PHP as a web server module or as as standalone CGI interpreter?


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Yes.

PHP v5.0.4. Web server is Apache v1.3.33. Running PHP as a web server module.
 
Hmm.

I'm running PHP on a LAMP (FC3/2.0.53/4.1/5.0.4) box and hitting my test pages with Opera 8.0, IE 6.0.2900 and Firefox 1.0.4.

Unfortunately, I can't duplicate your error.


Are you transmitting your session IDs in the URL or in a cookie?




Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I wasn't transmitting the id in the url but I am now because thats the only way I can get the session id to the secure page. Thanks for your help with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top