sepoto 1 Posted March 1, 2013 Report Share Posted March 1, 2013 (edited) 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 March 1, 2013 by sepoto Quote Link to post Share on other sites
justsomeguy 1,135 Posted March 1, 2013 Report Share Posted March 1, 2013 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. Quote Link to post Share on other sites
sepoto 1 Posted March 1, 2013 Author Report Share Posted March 1, 2013 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.