Is it Firefox or Zend Debugger? Cookie Standards
by Harun Yayli on Wednesday, February 20th, 2008 at 10:50 am under PHP, Web Standards, Zend
I’m frequently using Zend Debugger and recenlty it started not working with firefox so I decided to investigate. It still works with IE7 and Opera so it was weird to see Firefox being broken with the recent update (2.0.0.12).
When Zend Debugger starts, it sets a cookie on the browser, so when the request passes through the Debugger, it’s caught. Simple enough.
See the cookie that is set by Zend Debugger:
Set-Cookie: ZDEDebuggerPresent=php,phtml,php3; path=/ ZendDebuggerCookie=192.168.33.87%2C127.0.0.1%3A10000%3A0||084|77742D65|0; path=/ SESSdd12cedd715988d11c29f14605e8aa57=rfem27em2jsn3l9ipusujaava2; path=/; domain=.127.0.0.1
Nothing looks weird to me…
But when firefox does a second request it returns only the cookies below:
Cookie: ZDEDebuggerPresent=php,phtml,php3; SESSdd12cedd715988d11c29f14605e8aa57=rfem27em2jsn3l9ipusujaava2
What happened to ZendDebuggerCookie? The little firefox ate it?
Plain weird.
Recent Entries
- PHP Gurus in Montreal – I’m looking for 3 of them!
- Looking for 2 PHP Developers in Montreal (Senior and Intermediate)
- The difference between a bug and a feature
- Designing for Social Traction
- How to make Facebook shared links appear nice
- new pecl/memcache is out with memcache.php
- memcache.php flushes servers
- memcache.php can delete keys now
- memcache.php is now part of pecl/memcache
- memcache.php goes PECL
I have a similar problem where (some of) my cookies are lost when zend debugger exposes itself. The problem is that he cookie is not valid anymore. A cookie should be in this form:
name=value; name=value; etc.
The cookie starts right but messes things up with the path=/
Set-Cookie: ZDEDebuggerPresent=php,phtml,php3; path=/ [<-- should be removed or finished with a semicolon] ZendDebuggerCookie=192.168.33.87%2C127.0.0.1%3A10000%3A0||084|77742D65|0; path=/ [<-- should be removed or finished with a semicolon] SESSdd12cedd715988d11c29f14605e8aa57=rfem27em2jsn3l9ipusujaava2; path=/; [<--this one is right] domain=.127.0.0.1
I'm not sure how to fix this. setting the php variable a comment dash before this line in your php.ini:
zend_debugger.expose_remotely=always
like so:
#zend_debugger.expose_remotely=always
does the trick, but disables the debugging capabilities.
zend_debugger.expose_remotely=allowed_hosts
might help, but doesn't help me because my problems are on one of the allowed hosts.
Did you already succeed in solving your problem?
Cheers,
Chris.
November 6th, 2009 at 9:31 am