Re: Netscape problems with PHP

From: Date: Fri, 02 Mar 2001 22:19:10 +0000
Subject: Re: Netscape problems with PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42410@lists.php.net to get a copy of this message
ok your experiencing some very strange errors. I would love to comment on the PHP_SELF thing, if you want me to I'll email you. do you have php configured with --trans-sid? is the cookie PHPSESSID being set on the client? is the SID being transfered on all non-full urls when cookies are not being used.? a few comments some people may not realize. sessions with cookies ------------------------ - will transfer across full urls - will transfer acress full form urls - will not set SID - will not transfer across multiple domainnames sessions without cookies ------------------------ - will set SID - will transfer across multiple domainnames if the domain name is on the same server and $SID is manualy appended to the url - will transfer across full urls if $SID is appended to the url - will transfer across full form urls if $SID is appended to the form url use code like this and you can fix some of those issues. <?php function mtime() { $mtime = microtime(); $mtime = str_replace('.', '', $mtime); $mtime = explode(' ', $mtime); $mtime = $mtime[1] . $mtime[0]; return($mtime); } if ( isset($HTTP_GET_VARS['PHPSESSID']) ) session_id($HTTP_GET_VARS['PHPSESSID']); if ( isset($HTTP_POST_VARS['PHPSESSID']) ) session_id($HTTP_POST_VARS['PHPSESSID']); if (!isset($HTTP_SESSION_VARS['SessionID'])) { $SessionID = mtime(); session_register('SessionID'); } $PHPSESSID = session_id(); $SID = "PHPSESSID=$PHPSESSID"; //---- echo " <a href='http://$SERVER_NAME/$PHP_SELF?$SID'>here </a> "; ?> I amcurious on how this works out -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 lee@mediawaveonline.com ""Robert Fischler, Ph.D. ABD"" <fischler@campcampus.com> wrote in message news:B6C58F6D.1CCA%fischler@campcampus.com... Hello all (first post for me!): I've been running into problems when testing PHP scripts on Netscape (when MSIE works fine). First problem (SOLVED) was that Netscape does something funny with the $PHP_SELF environmental variable, so I've learned to circumvent the problem by just hard-coding the page name instead of relying on the $PHP_SELF trick. Second problem (UNSOLVED, SO FAR) is that Netscape (...and I'm talking about Communicator 4.75 for the Mac, at least) doesn't carry my session variables over from page to page. Has anyone else ran into this problem and found a solution? Thanks!!! P.S. Things seem to work fine in the new Netscape 6, but most Mac users are still at 4.75. -- Robert Fischler, PhD ABD IUB Campus Manager CampCampus.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#42410) next »