Jump to content

$_SESSION setting variables on one server but not on the other...


sepoto

Recommended Posts

IIS seems to be fine:OUTPUT:User added...mysql@mysql.commysqlmysql Apache & PHP not so muchOUTPUT:User added... success.php:<?phpsession_start();echo "User added...";echo $_SESSION["email_address"]."<br>";echo $_SESSION["last_name"]."<br>";echo $_SESSION["first_name"]."<br>";?> Why would $_SESSION be output on one server but not on the other. I already tried setting the permissions of the sessions save path to 777 to no avail.... I have to admit I am most confused. The code does run on both servers without any serious breaks but on my rackspace.com cloud I dont get the $_session coming out. Does anyone know why this might be?

Edited by sepoto
Link to comment
Share on other sites

I don't see any problems with the code you posted. Check the error settings, make sure you're showing all error messages or writing them to a log file. PHP will show errors if there are problems starting a session.

Link to comment
Share on other sites

It needed to be more like this: session_start();$email_address = $postFields["email_address"];$_SESSION["email_address"] = $email_address;$_SESSION["last_name"] = $postFields["last_name"];$_SESSION["first_name"] = $postFields["first_name"];session_write_close(); The call to session_write_close() brought the code online.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...