[PHP] Sessions only work in SSL
I have a strange issue here. I am running a CentOS machine, with apache 2.2.3 php 5.1.6 kernel 2.6.18-194.8.1.el5xen My sessions will work using https, but not using simple http. I've compared my configs with another identical machine which works with both, and I can't figure out why. Anyone got an idea? Here's the simple script I run to test. ?php session_start(); echo 'session started'; if (isset($_SESSION['name'])) { echo 'br /' . $_SESSION['name']; session_destroy(); } else { echo 'br /No session found'; $_SESSION['name'] = 'My session'; } phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions only work in SSL
On Mon, Oct 18, 2010 at 8:46 PM, Daniel Houle drho...@hotmail.com wrote: I have a strange issue here. I am running a CentOS machine, with apache 2.2.3 php 5.1.6 kernel 2.6.18-194.8.1.el5xen My sessions will work using https, but not using simple http. I've compared my configs with another identical machine which works with both, and I can't figure out why. Anyone got an idea? Here's the simple script I run to test. ?php session_start(); echo 'session started'; if (isset($_SESSION['name'])) { echo 'br /' . $_SESSION['name']; session_destroy(); } else { echo 'br /No session found'; $_SESSION['name'] = 'My session'; } phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Are you sure session.cookie_secure is not turned on somewhere? Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions only work in SSL
On 10/19/2010 09:41 AM, Andrew Ballard wrote: On Mon, Oct 18, 2010 at 8:46 PM, Daniel Houledrho...@hotmail.com wrote: I have a strange issue here. I am running a CentOS machine, with apache 2.2.3 php 5.1.6 kernel 2.6.18-194.8.1.el5xen My sessions will work using https, but not using simple http. I've compared my configs with another identical machine which works with both, and I can't figure out why. Anyone got an idea? Here's the simple script I run to test. ?php session_start(); echo 'session started'; if (isset($_SESSION['name'])) { echo 'br /' . $_SESSION['name']; session_destroy(); } else { echo 'br /No session found'; $_SESSION['name'] = 'My session'; } phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Are you sure session.cookie_secure is not turned on somewhere? Andrew No, it was not set anywhere. But I did add it in with session.cookie_secure 0 and it solved my issue. Thank you very much Andrew! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php