Re: header() not working?

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

 



On 14.12.2016 at 15:52, Tedd Sperling wrote:

>> On Dec 13, 2016, at 5:13 AM, Ford, Mike <M.Ford@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> What's does include('includes/header.php') do? I'm betting there's output in there! If so, put it inside your
>>
>>    if ($step == 0)
>>
>> where it belongs anyway.
> 
>> (As does the include of footer.php, incidentally.) There's no point putting anything that might possibly do output in a path that can issue a redirect, so don't.
>>
>> And, yes, this is almost certainly due to a change in the output buffering in your site's config.
>>
>> Cheers!
>>
>> Mike
>>
> 
> Mike:
> 
> Thanks for your comments.
> 
> Your comments are interesting and I’ll look into them, but the code did work for the last 8 years.
> 
> My reason for starting this thread was to ask people how know the internals of php/server settings to tell me what is happing. Perhaps the init file, or some server directive is not set correctly, or whatever — not knowing, is the reason for me asking.
> 
> Cheers,
> 
> tedd

Okay, I'll try to guess.  It is possible, that the output_buffering ini
option[1] has been changed; while formerly it was set to value large
enough to automatically buffer the output before the header() call, now
it is too small to do so, what would explain the script "suddenly" failing.

[1]
<http://php.net/manual/en/outcontrol.configuration.php#ini.output-buffering>

-- 
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