ScotDiddle Posted September 23, 2009 Share Posted September 23, 2009 Hi Folks, I inherited a production php 5.1.6 LAMP environment at my new job here in Richmond VA. The Linux Guru set me up a dev environment... phpinfo() looks the same for both systems... Here's my problem: When I start debugging PRODUCTION with Zend Studio 5.5.0, the $GLOBALS show a cookie called $_COOKIE['SessionID'] with a value of mv5nfdru8jrdl98de8j0ssest0 When I start debugging DEV (which contains an exact copy of PROD source code) $_COOKIE is not set at all in GLOBALS. This is affecting subsequent login logic between the two systems. Can someone explain where PROD is getting his $_COOKIE name and value and why DEV does not have the same variable ? These values are either there, or not there, as soon as I hit PF8 and start a Zend Studio debugging session. (Eventually ( like right away...) both the PROD and Dev code issues : session_name( 'SessionID' ); followed by: session_start(); But, the $_COOKIE value is only set on PROD...) Any ideas / directions / advice ... etc. will be appreciated. Thanks in advance. Scot L. Diddle, Richmond VA Quote Link to comment https://forums.phpfreaks.com/topic/175224-solved-need-help-with-_cookies/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 23, 2009 Share Posted September 23, 2009 The session is not being started, probably due to a header error or an include statement that is not working or short open tags being used... Are you developing and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON in your php.ini to get php to display all the errors it detects so that it would be helping you? Stop and start your web server to get any change made to php.ini to take effect and confirm that the settings where actually changed using a phpinfo() statement in case the php.ini that you changed is not the one that php is using. Quote Link to comment https://forums.phpfreaks.com/topic/175224-solved-need-help-with-_cookies/#findComment-923539 Share on other sites More sharing options...
ScotDiddle Posted September 25, 2009 Author Share Posted September 25, 2009 PFMaBiSmAd, Thanks for the input... My problem turned out to be : " ini_set('session.cookie_domain', '.someDomainName.com'); " My test server is called " linux2.someDomainName.com" and I thought it was a sub-domain. Turns out it isn't and I had to use: " ini_set('session.cookie_domain', 'linux2.someDomainName.com'); " Scot L. Diddle, Richmond VA Quote Link to comment https://forums.phpfreaks.com/topic/175224-solved-need-help-with-_cookies/#findComment-924992 Share on other sites More sharing options...
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.