You are here: Sessions and AOL « PHP Programming Language « IT news, forums, messages
Sessions and AOL

Posted by Mike on 02/20/07 15:08

I have a site where users register and log in. All the data is stored
in a MySQL database.

When a user logs in, the username and password is checked in the
database and if all ok I set a few sessions. Then at the top of each
page I simply check that the sessions have been set and carry on.

All this works fine except for users on AOL. They log in but straight
away are told that they need to log in.

After many weeks of testing different things I'm still confused why it
doesn't work.

I created a some test scripts as follows to try and get sessions
working...

aolphpsetup.php

<?php
ini_set('session.use_trans_sid',1);
ini_set('session.use_cookies',0);
?>

aolinclude.php

<?php
if ($_SESSION[s_check1] == 4) {
$another_check = "1";
} else {
$another_check = "0";
}
?>

aoltest.php

<?php
include("aolphpsetup.php");
session_start();
$_SESSION[s_check1] = "4";
?>
<body>
<form name="form1" method="post" action="aoltest1.php">
<input type="submit" name="Submit" value="Click Me">
</form>
</div>
</body>

aoltest1.php

<?php
include("aolphpsetup.php");
session_start();
header("Location: aoltest3.php?".SID);
?>

aoltest3.php

<?php
include("aolphpsetup.php");
session_start();
include("aolinclude.php");
?>
<body>
$_SESSION[s_check1] = <?php echo $_SESSION[s_check1];?><br>
$another_check = <?php echo $another_check;?>
</body>

When running aoltest.php you should click the button and the output
via aoltest3.php should produce as expected but it doesn't with an AOL
user.

I'm using PHP version 5.0.4 and below is the settings of the sessions
in my phpinfo..

session
Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary wddx

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 Off Off
session.bug_compat_warn On On
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_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0

Has anyone come across this problem and found a solution.

Many Thanks

Mike

 

Navigation:

[Reply to this 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

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