strange session problem [message #8258] |
Mon, 20 January 2003 09:19 |
tufan
Messages: 70 Registered: June 2002
Karma: 0
|
Member |
|
|
the following code doesn't work on linux apache 1.3.27, php 4.2.3 with register_globals=off:
<?php
session_start();
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
} else {
$_SESSION['count']++;
}
echo "Count: {$_SESSION['count']}";
?>
every time you reload the page, a new PHPSESSID seems to appear, and the count is always 0. If you pass the PHPSESSID in links, everything is ok. It seems there is something wrong with the cookies, but i cannot guess what (cookie settings were open in the all browsers we tried)
Strangeness is, the very same code works on another linux machine with same configuration (We even tried copying php.ini from the working machine to the one which doesn't work, but it didn't help).
any idea why it doesn't work?
|
|
|
Ynt: strange session problem [message #8260 is a reply to message #8258] |
Mon, 20 January 2003 11:33 |
tufan
Messages: 70 Registered: June 2002
Karma: 0
|
Member |
|
|
Hmm..
Problem solved, it's caused by the locale of the operating system (tr_TR). I think, this problem is specific to Turkish.
If I'm not wrong, protoss already submitted this but to php.net. It's something with the variables including "I" letter. It seems to be not corrected yet. Similar problems occur with the apache itself. Variable names are changed.
So, if there is anyone using Turkish tr_TR locale on their system, change it to en_US, and then re-compile apache (if you compiled using tr_TR locale, there should be no need for recompiling if you've done an rpm installion, in this case, just change the locale to en_US, and restart the apache server).
c ya all..
|
|
|
|