Reply to Baffling! Redirects with header() takes minutes to respond.

Your name:

Reply:


Posted by Monty on 11/16/05 00:02

Something odd is happening. Scripts on several sites that collect form
data, save it to a DB, then redirect the user to another page are
slowing to a crawl during the redirect using the header() function. For
example: header("Location:member.php").

I tried changing the header() command in a few ways:
header("Location:/member.php"), header("Location:./member.php"),
header("Location:http://www.site.com/member.php"). But none of these
made any difference.

I then discovered that if I put "exit;" after the header() function,
there's no more delay and the redirect is instantaneous again.

What's odd is that these pages worked just fine without the exit
command until recently. I've made no changes to those scripts, or to
PHP, so, I can't figure out why this all of a sudden started happening.

Has anyone else noticed this? Is putting an "exit;" right after a
header() now required in PHP? Because I never had to do this before and
it always worked fine.

Using PHP 4.3.2 on Linux Red Hat ES 3.0 server. Tested this in Safari,
Firefox and MS IE, with the same (slow) redirect results (until "exit;"
was added).

Monty

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация