Bug #16842 Updated: header() function doesn`t work
| From: | shiflett@php.net | Date: | Wed, 12 Jun 2002 13:28:15 +0000 |
| Subject: | Bug #16842 Updated: header() function doesn`t work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10241@lists.php.net to get a copy of this message | ||
ID: 16842
Updated by: shiflett@php.net
Reported By: sanya@mail.ru
Status: Open
Bug Type: HTTP related
Operating System: Windows XP
PHP Version: 4.2.0
New Comment:
So does this solution work for those experiencing this problem?
Previous Comments:
------------------------------------------------------------------------
[2002-06-09 11:42:40] sabedard@jig.to
I think I have the answer to this one. If you are using the
php4ts.dll from 4.2.1 with the old dlls from 4.1.2 (in the C:\php\dll
and c:\php\extensions) this header problem will occur. However, if you
just replace these old dll's with the correct 4.2.1 versions all will
be well. Specifically I think mismatching c:\winnt\system32\php4ts.dll
and c:\php\sapi\php4apache.dll is the real issue. Of course, the best
way to solve this it to uninstall 4.1.2, clean the directory and
install 4.2.1 :)
Thanks,
Shawn
------------------------------------------------------------------------
[2002-06-09 10:40:13] sabedard@jig.to
I am experiencing the same problem with 4.2.1 on Win2000. The
following code works fine with 4.1.2 but does not redirect in 4.2.1.
...
if (isset($HTTP_POST_VARS["submit_login"])) {
$tbp = new Users();
$tbp->retrieveDb( "where user_id = '" .$HTTP_POST_VARS["fuser_id"].
"'
and password='" .$HTTP_POST_VARS["fpassword"]. "'" );
$uid = $tbp->getField("user_id");
if (!$uid) {
$login_success = false;
} else {
$path = str_replace ("reg_login","reg_type",$PHP_SELF);
$tbp->log("Directing to Location: http://" .$SERVER_NAME.
$path);
header ("Location: http://" .$SERVER_NAME. $path);
}
}
....
Looking at my log the Location path is correct. I have even tried
surrounding this code by ob_start() and ob_end_flush() with no luck.
There is a reference in the header documnentation page indecating that
referencing all variable with a @ will fix this problem. But that just
seems wrong. Any workaround would be greatly appreciated.
------------------------------------------------------------------------
[2002-06-08 04:47:49] mfischer@php.net
Reopen
------------------------------------------------------------------------
[2002-06-08 04:13:56] cg@gordimer.net
not the bug report is bogus - only the last user's comment.
Please reopen.
------------------------------------------------------------------------
[2002-06-08 04:08:36] derick@php.net
User error > bogus
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16842
--
Edit this bug report at http://bugs.php.net/?id=16842&edit=1