note 12013 deleted from function.setcookie by imajes
| From: | imajes@php.net | Date: | Wed, 30 Jan 2002 05:47:24 +0000 |
| Subject: | note 12013 deleted from function.setcookie by imajes | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-26015@lists.php.net to get a copy of this message | ||
The cookie problem with IIS was a BIG one in both PHPNuke and phpWebSite. I was able to fix the
header("Location: ...) problem by using the following:
example line:
header("Location: user.php?op=userinfo&bypass=1&uname=$uname");
was changed to:
header("Refresh: 0;url=user.php?op=userinfo&bypass=1&uname=$uname");
This worked perfectly with my setup (IIS4.0 on NT Server. IE 5.5 as client.).
So all I did was run a global search and replace using PERL from my command line (I use ActivePerl
5.6) from my phpNuke/phpWebSite directory on the server:
for /R %f in (*.php) do perl -i.bak -p -e "s/Location: /Refresh: 0;url=/g" %f
and to catch the inc files:
for /R %f in (*.inc) do perl -i.bak -p -e "s/Location: /Refresh: 0;url=/g" %f
I know this is specific to phpNuke/phpWebSite, but it got around the entire problem with the
Location: header causing all other headers to be ignored. SetCookie() then worked perfectly after
the replacement procedure.
Hope this helps! I had tried every suggestion on this page, and this one was the only one that
worked every time for me!
-wade