You are here: Re: header (Location: ) not working on web server « PHP Programming Language « IT news, forums, messages
Re: header (Location: ) not working on web server

Posted by Erwin Moller on 02/07/07 15:13

php newbie wrote:

> I have a simple php page in which I use
>
> header("Location: http://www.example.com/");
>
> to redirect the user to another php page. The php script works on my
> local machine but when I upload it to the web server for hosting the
> redirection does not work. Instead on one server it gives the standard
> header error
>
> Warning: Cannot modify header information - headers already sent
> by .......
>
> while on the other server, I dont see this error but it also does not
> redirect just refreshes the page when I click the Submit button.
>
> Does anybody know how can i resolve this?
> Thanks

Yes,

On one server you created output before using hedaer(), and on the other
not.
You cannot use header if you send information already.

Possibly you have an error/notice/warning/whatever on 1 server (and thus
produce output) and not on the other?

Regards,
Erwin Moller

 

Navigation:

[Reply to this 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

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