Re: I'm a newbie and running php on Linux

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

 



On Wed, Mar 31, 2010 at 11:25 AM, King Coffee <kcoffee@xxxxxxxxxxx> wrote:
> Thanks,
> I think Output_Buffering may be the difference on the two servers. I had a
> default php.ini on the Linux server but not on the Windows server. But for
> now, I remove the echo statement.
>
> Thank,
> King
>
> "jose javier parra sanchez" <jojapasa@xxxxxxxxx> wrote in message
> news:r2j99f1636c1003310941xdc809603l774b40457870b7c7@xxxxxxxxxxxxxxxxx
>>
>> Check your php.ini , look for output_buffering
>>
>> 2010/3/31 King Coffee <kcoffee@xxxxxxxxxxx>:
>>>
>>> Hi,
>>>
>>> I ran the following code snippet on Windows IIS 7, in my index.php file
>>> and
>>> it worked fine. But when run it on Linux, the "die" code is executed.
>>>
>>> Is there an include file or something else I need to to process this on a
>>> linux server?
>>>
>>> <?php
>>>       echo '<h1>Redirecting... Please Wait</h1>';
>>> /*
>>>       redirect('welcome.html');
>>> */
>>>       if (!headers_sent()) {
>>>               header('Location: ' .
>>> 'http://auction.househops.com/index.php');
>>>       } else {
>>>               die('Could not redirect.');
>>>       }
>>> ?>
>>>
>>>
>>> Thanks,
>>> King
>>>

Having that echo in there pointless since PHP will redirect
immediately.  If you want to inform the users that they're being
redirected because of URL changes, then look into meta tag for the
delayed redirect and you still have that echo for informative
purposes.  You may also need to set the set headers with proper http
code for the search engines.

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