Re: [PHP] 404's and requesting page

2001-08-06 Thread Tom Carter

If anyone is interested I fixed this problem in a sudden (rare) moment of
inspiration...

in the htaccess statement I had put ErrorDocument 404
http://www.mysite.com/error/error.php rather than /error/error.php

This caused apache to basically start a separate request rather then pass it
on thru, which explains why the variables were as they were and why the
status was 401 rather than 404.

Obvious really when one thinks about it.

Thanks for you advice tho tim, much appreciated.

Tom
- Original Message -
From: "Tom Carter" <[EMAIL PROTECTED]>
To: "Tim" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 06, 2001 2:45 PM
Subject: Re: [PHP] 404's and requesting page


> Very odd.. I checked REQUEST_URI and outputed phpinfo() as you suggested
and
> nowhere does it say the name of the file that was requested.. is this a
> server configuration issue?
>
> All the variables relating to pages are set to the page that is displaying
> the error rather than the request that is producing it... nowhere was that
> name menionted!
>
> Anyone? Is this just me being strange?
>
>
> > Ah, yes.  You are correct about the $REDIRECT_URL thing.  I was looking
> > at some old code I had to deal with this and mis-read it. :)
> >
> > I use ErrorDoument just as you describe.
> >
> > I just tried this, and on my system $HTTP_SERVER_VARS["REQUEST_URI"]
> > contains the URI that generated the error.
> >
> > If your 404 page just dumps phpinfo() you can see the list of variables
> > available to your script.
> >
> > - Tim
> >
> > On 05 Aug 2001 21:16:29 +0100, Tom Carter wrote:
> > > Thanks for the advice Tim, however it didn't work. Neither of the
> statements
> > > in your mail were set ... I trued $REDIRECT_STATUS and that was set to
> 401
> > > (even tho that doc wasn't capturing that error) and $REDIRECT_URL was
> set to
> > > the path of the file handling the errors.
> > >
> > > Is there some other apache config I need to make?
> > > The .htaccess line I have doing the redirect is
> > > ErrorDocument 404 path/to/file
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 404's and requesting page

2001-08-06 Thread Tom Carter

Very odd.. I checked REQUEST_URI and outputed phpinfo() as you suggested and
nowhere does it say the name of the file that was requested.. is this a
server configuration issue?

All the variables relating to pages are set to the page that is displaying
the error rather than the request that is producing it... nowhere was that
name menionted!

Anyone? Is this just me being strange?


> Ah, yes.  You are correct about the $REDIRECT_URL thing.  I was looking
> at some old code I had to deal with this and mis-read it. :)
>
> I use ErrorDoument just as you describe.
>
> I just tried this, and on my system $HTTP_SERVER_VARS["REQUEST_URI"]
> contains the URI that generated the error.
>
> If your 404 page just dumps phpinfo() you can see the list of variables
> available to your script.
>
> - Tim
>
> On 05 Aug 2001 21:16:29 +0100, Tom Carter wrote:
> > Thanks for the advice Tim, however it didn't work. Neither of the
statements
> > in your mail were set ... I trued $REDIRECT_STATUS and that was set to
401
> > (even tho that doc wasn't capturing that error) and $REDIRECT_URL was
set to
> > the path of the file handling the errors.
> >
> > Is there some other apache config I need to make?
> > The .htaccess line I have doing the redirect is
> > ErrorDocument 404 path/to/file
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 404's and requesting page

2001-08-05 Thread Tim

Ah, yes.  You are correct about the $REDIRECT_URL thing.  I was looking
at some old code I had to deal with this and mis-read it. :)

I use ErrorDoument just as you describe.

I just tried this, and on my system $HTTP_SERVER_VARS["REQUEST_URI"]
contains the URI that generated the error.

If your 404 page just dumps phpinfo() you can see the list of variables
available to your script.

- Tim

On 05 Aug 2001 21:16:29 +0100, Tom Carter wrote:
> Thanks for the advice Tim, however it didn't work. Neither of the statements
> in your mail were set ... I trued $REDIRECT_STATUS and that was set to 401
> (even tho that doc wasn't capturing that error) and $REDIRECT_URL was set to
> the path of the file handling the errors.
> 
> Is there some other apache config I need to make?
> The .htaccess line I have doing the redirect is
> ErrorDocument 404 path/to/file



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 404's and requesting page

2001-08-05 Thread Tom Carter

Thanks for the advice Tim, however it didn't work. Neither of the statements
in your mail were set ... I trued $REDIRECT_STATUS and that was set to 401
(even tho that doc wasn't capturing that error) and $REDIRECT_URL was set to
the path of the file handling the errors.

Is there some other apache config I need to make?
The .htaccess line I have doing the redirect is
ErrorDocument 404 path/to/file

Thanks a million for any help, Tom

> $HTTP_SERVER_VARS["REDIRECT_STATUS"] will be "404" (or "403" if you trap
> those too).
>
> $HTTP_SERVER_VARS["REDIRECT_URL"] will be the requested URL that caused
> the error.
>
> - Tim
>   http://www.phptemplates.org
>
> On 05 Aug 2001 18:46:04 +0100, Tom Carter wrote:
> > I'm using an apache directive to redirect 404's to one of my own pages,
and
> > i was wondering it is possible find out what the request was that caused
> > 404.
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 404's and requesting page

2001-08-05 Thread Tim

$HTTP_SERVER_VARS["REDIRECT_STATUS"] will be "404" (or "403" if you trap
those too).

$HTTP_SERVER_VARS["REDIRECT_URL"] will be the requested URL that caused
the error.

- Tim
  http://www.phptemplates.org

On 05 Aug 2001 18:46:04 +0100, Tom Carter wrote:
> I'm using an apache directive to redirect 404's to one of my own pages, and
> i was wondering it is possible find out what the request was that caused
> 404.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] 404's and requesting page

2001-08-05 Thread Tom Carter

hi all,

I'm using an apache directive to redirect 404's to one of my own pages, and
i was wondering it is possible find out what the request was that caused
404.

I've examind all the global vairables etc, nothing I can see there.

If the 404 came from a link then I can find out the page with the link, but
that isn't what interests me.

system: apache, linux, php 4.0.6

Anyone got any ideas?

TIA, Tom



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]