By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,751 Members | 1,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,751 IT Pros & Developers. It's quick & easy.

Sessions and AOL

P: n/a
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

Feb 20 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
>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.
Not having examined your code properly nor knowing what is in the included
files do you by any chance check if someone is who they are meant to be by
checking their ip from 1 page to another? If so it could be the cause of
your problem, an AOL user could effectively have a different ip number after
every page load due to the way AOL works.
Feb 20 '07 #2

P: n/a
On 21 Feb, 00:55, "peter" <sub...@flexiwebhost.comwrote:
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.

Not having examined your code properly nor knowing what is in the included
files do you by any chance check if someone is who they are meant to be by
checking their ip from 1 page to another? If so it could be the cause of
your problem, an AOL user could effectively have a different ip number after
every page load due to the way AOL works.
All the test files are displayed above including the include file.

No I do not use IP address in any way to track. Please see my test
code in my original post.

Feb 20 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.