![]() |
| [resolved] Problem with PHP sessions |
|
Site Admin
|
Please do not mess debugger sessions with php sessions. They are completely different matters. What you're talking about is PHP session. If you do not start it explicitly, you need session.auto_start setting to be turned on in php.ini. Please check with phpinfo() output. Debugger session is intended to continue debugging upon navigation from a page that was debugged, nothing else. |
||||||||||||||
|
_________________ The PHP IDE team |
|||||||||||||||
|
got it.
Yes, the session is started by a custom session handler, and I've walked through and know that it has been called correctly. And if I run it locally and not through the debugger, the session is restored successfully. As I mentioned earlier, the same script is being run remotely and works correctly. There is something when the script is called with the debugger that is preventing the session id from being passed from the browser back to the php interpreter. |
||||||||||||||||
|
|
|||||||||||||||||
|
Site Admin
|
if you have a simple script that will replicate the problem and you submit it there or send through Contact Us page, I'd highly appreciate it. |
||||||||||||||
|
_________________ The PHP IDE team |
|||||||||||||||
|
ok, i dont know if something has changed between when i wrote the original post, or i dreamed the whole thing, but the session data is not being carried to subsequent pages whether I'm running the debugger or not. After about two hours of checking, I finally discovered that it had to do with my use of
in my session wrapper function. I had APP_DOMAIN set to 'localhost' if I was running locally, but it didnt like that. Sorry for the false alarm. Is there a way to see the current value of your constants during debugging, short of adding them to the watch list? I was thinking that I could hover over them like I do a variable and a small pop-up would display its value, but nothing happens for constants. Which brings me back to my second question from my original post: is there a better way to handle this situation? Having to constantly juggle whether I'm running locally or not is becoming increasingly complex. I'm open to ANY suggestions that would make this easier.... |
||||||||||||||
|
|
|||||||||||||||
|
Site Admin
|
you may want to make get_defined_constants() call in the Immediate window or add this call to Watches
Why do you need to change 'session.cookie_domain'? If you use cookie path =/ and empty domain, all the cookies you set will work for all the URLs inside current domain. I think that the only reason to use 'session.cookie_domain' is to have the same cookies to work for say www.nusphere.com and forum.nusphere.com ('session.cookie_domain' = nusphere.com) but it's rarely needed. Finally, you can add somehostname.somedomain.somezone to c:\windows\system32\drivers\etc\hosts, for example: 127.0.0.1 localhost myhost_mydomain_com and work with http://myhost_mydomain_com as if it were a really registered host |
||||||||||||||||
|
_________________ The PHP IDE team |
|||||||||||||||||
|
ok, I'll give that a try tomorrow.
unfortunately, that's exactly my situation. My apps all run on subdomains of the missouri.edu domain, so I have to specify the cookie_domain. I dont want the cookies to be accessible anywhere else on the missouri.edu domain except specifically the domain the app is running at.
I hadnt even thought of that. good idea. I'll give that a shot tomorrow as well. Thanks dmitri! |
||||||||||||||||||
|
|
|||||||||||||||||||
|
Site Admin
|
Maybe I'm wrong, but if you don't specify cookie.domain, cookie will work for the current HOSTNAME (FQDN) only. For example if the cookie issued from somehost.mywebserver, it won't work for someotherhost.mywebserver even though the hosts are from the same "domain" in DNS terms. At least I checked with www.nusphere.com and didn't see cookies the browser got from forum.nusphere.com |
||||||||||||||
|
_________________ The PHP IDE team |
|||||||||||||||
| [resolved] Problem with PHP sessions |
|
||
|
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by


RSS2 Feed