note 60923 added to function.session-start
| From: | jarss_sage at yahoo dot co dot uk | Date: | Fri, 20 Jan 2006 07:33:34 +0000 |
| Subject: | note 60923 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102141@lists.php.net to get a copy of this message | ||
I got a problem with session data that wont stay until next page. It work fine with my online
webserver. WhenI install it on my comp winXP pro SP2 (php 4.3.11, apache 1.3) my CMS authentication
wont work at all.
<?php
//======my session======
session_start();
if(isset($_POST["user"]) && $_POST["password"]=="pass frm db")
{
$_SESSION["user"]=$_POST["user"];
$_SESSION["password"]=$password;
}
?>
at the end the I can't login to it. My CMS system works fine on other server. I tried with
this simple code on my comp
<?php
session_start();
if(isset($_POST["try"]))
{
$_SESSION["test"] = $_POST["try"];
}
else
{
echo "<form method='post' action=$PHP_SELF>
<input type='text' name='try'>
<input type='submit' value='go'>
</form>";
}
echo $_SESSION["test"];
echo session_cache_limiter();
?>
//and it wont show my session value out..It works fine on my webhost. I switch the register_globals
on and off to try but the problem is still there. Maybe cookie will do the other way round.
----
Server IP: 203.142.1.159
Probable Submitter: 60.50.169.59
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60923
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60923&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60923&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60923&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60923&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60923&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60923&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60923&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60923&report=yes
Search -- http://master.php.net/manage/user-notes.php