Are you outputting BLANK LINES???

        eg.. if you have blank lines after your last ?> (closing PHP tag) in
ANY one of the require/include/script files, you're outputting something and
this cannot be the case.

eg. if in VI

echo $someecho
function dosomethig()
{
// whatever
}
?>
        <----- THIS blank line will be regarded as Output. Hence You can't
redirect!
~       <-- These sort of tidle marks are vi's way of saying.. no blank line
below this.
~
~
~
~
`

Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-----Original Message-----
From: Beauford.2005 [mailto:[EMAIL PROTECTED]
Sent: Friday, July 25, 2003 3:06 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Redirection Question (I spoke to soon)


Errors are on and I get nothing, it won't even direct if I hard code
header("Location: www.microsoft.com");


-----Original Message-----
From: Jason Wong [mailto:[EMAIL PROTECTED] 
Sent: July 23, 2003 12:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Redirection Question (I spoke to soon)


On Thursday 24 July 2003 11:37, Beauford.2005 wrote:

> I found one of my problems and also implemented your suggestions, and 
> still the same thing. It will not redirect.
>
> The problem I found is that $_SERVER['SERVER_NAME'] does not include 
> the port number. On my Win PC I am using port 800. So I changed this 
> line
> to:
>
> $_SESSION['goto'] = "http://"; . $_SERVER['SERVER_NAME'] .":800" . 
> $_SERVER['REQUEST_URI'];
>
> If I take the output from that and put it into my browser is works 
> just fine, but it will not work in the script.

[snip]

>             header("Location: " . $_SESSION['goto']);
>
> If I echo $_SESSION['goto'] right after session_start() it shows 
> exactly what it should be. So I am at a loss.

Have you checked your error logs? You should always, ALWAYS have error 
reporting on full, and check for errors. It could be that you're getting
an 
"headers already sent sent" error.

Does it work if you have a single line script:

      header("Location: whatever_$_SESSION['goto']_is_supposed_to_be");


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
But Officer, I stopped for the last one, and it was green!
*/


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


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

Reply via email to