Re: header() not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08.12.2016 at 17:30, Tedd Sperling wrote:

> Hi gang:
> 
> For several years I have had an example of a redirect working on my college’s Server for my students to review.
> 
> The code is simple:
> 
> header ("Location:$where"); 
> exit(0); 
> 
> The $where is URL’s such as “amazon.com” coming from a POST:
> 
> $where = isset($_POST['where']) ? $_POST['where'] : null;
> 
> Like I said, this has worked for years and now it doesn’t.
> 
> I suspect something has changed in the school’s Server, but I don’t know what that may be. 
> 
> Any ideas as to why and how to fix it?

Have you checked that no output has been generated before these lines
are executed?  Even a single space could stop the headers from being
sent.  I suggest you enable error_reporting, and check the respective
log file; there you might find something like "Cannot send headers.
Headers already sent".

-- 
Christoph M. Becker

> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux