Reply to Re: Sessions in different versions of PHP

Your name:

Reply:


Posted by Steve on 02/22/07 16:42

"Mike" <mike@mjfcadsolutions.co.uk> wrote in message
news:1172161385.402338.197150@a75g2000cwd.googlegroups.com...
|I have tested the 2 scripts below....
|
| aoltest.php
| *************
| <?php
| session_start();
| $_SESSION[s_check1] = "4";
| ?>
| <a href="aoltest3.php">click me</a>
|
|
| aoltest3.php
| **************
| <?php
| session_start();
| ?>
| <body>
| The session is <?php echo $_SESSION[s_check1];?><br>
| </body>
|
| Both on 2 different servers. 1 running PHP version 5.0.4 and the other
| running 4.4.3.
|
| Both work fine until tested with a user on an AOL ISP. The one under
| 4.4.3 works perfectly but the one under 5.0.4 fails and the session is
| not carried accross to the new page.
|
| Any one have any clues why this would happen. Whats the changes/
| diferences between 4.4.3 and 5.0.4 that could effect this?

there was a huge discussion about AOL and sessions about a month or two ago.
i'd just search for it as i remember it being resolved.

on another note, unless s_check1 is a constant, i.e. define('s_check1',
'some value'), always be explicit...as in $_SESSION['s_check1']. otherwise,
you will eventually run into problems aside from the fact that you are
writing less than optimal code - it will always be slower because php has to
see if s_check1 is defined literally somewhere else so it can use the
correct value/key or, it will cast it as a string...as opposed to php
knowing it is a string and the value of the string is the key for the
$_SESSION array element.

but that's just my 0.02 usd.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация