Re: [PHP] ErrorDocument 404 Form

2002-07-19 Thread Fabien Penso


Peter a écrit : 

  If you removed the
  ErrorDocument 404 /phpinfo.php
  from the apache conf (or reset it to original value), what happens? Do you
  get a standard 404 not found error page?

Sure. But it's an apache problem, it drops the body as soon as you do
have a 404 error. Sux :p

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/

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




Re: [PHP] ErrorDocument 404 Form

2002-07-18 Thread Fabien Penso


Michael a écrit : 

  Well it could have been it, but it doesn't work neither trying to set
  the ErrorDocument into a .htaccess file.
  
  The problem is I am not even sure where is the trouble, and if it should
  work or not (I guess it should), so I don't know exactly where to ask,
  the dev list maybe ?

  I seem to remember from when I was toying around with this that
  $_SERVER[REQUEST_URI] was still available.  Even if $_GET isn't
  populated you could manually parse the REQUEST_URI.  Of course I may
  be misremembering...  If it's not available on your install let me
  know and I'll setup a test case on my server...

Well it still is in GET method because the url does still exist with the
?plop=foobar but in case I want to use POST method (which I will as my
form has huge textarea) everything disappear.
Also this is a turn around I don't like, I would first understand why it
doesn't work, and if I can fix it.

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/

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




Re: [PHP] ErrorDocument 404 Form

2002-07-18 Thread Matt

 Well it still is in GET method because the url does still exist with the
 ?plop=foobar but in case I want to use POST method (which I will as my
 form has huge textarea) everything disappear.
 Also this is a turn around I don't like, I would first understand why it
 doesn't work, and if I can fix it.
I  browsed the the apache source, and it looks to me that the message body
is simply read and dumped into the bit bucket on a 404 with an ErrorDocument
(and thus isn't passed as part of the internal request to the ErrorDocument
itself).  Perhaps you ought to ask the apache list.




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




Re: [PHP] ErrorDocument 404 Form

2002-07-18 Thread Fabien Penso


Matt a écrit : 

  Well it still is in GET method because the url does still exist with the
  ?plop=foobar but in case I want to use POST method (which I will as my
  form has huge textarea) everything disappear.
  Also this is a turn around I don't like, I would first understand why it
  doesn't work, and if I can fix it.

  I  browsed the the apache source, and it looks to me that the message body
  is simply read and dumped into the bit bucket on a 404 with an ErrorDocument
  (and thus isn't passed as part of the internal request to the ErrorDocument
  itself).  Perhaps you ought to ask the apache list.

Apparently, as I do read
http://www.geocrawler.com/archives/3/182/1999/4/0/1646542/, it's an
Apache problem.

Thanks, I move on an Apache user list :)

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/

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




Re: [PHP] ErrorDocument 404 Form

2002-07-18 Thread Peter

If you removed the
ErrorDocument 404 /phpinfo.php
from the apache conf (or reset it to original value), what happens? Do you
get a standard 404 not found error page?


Fabien Penso [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Matt a écrit :

   Well it still is in GET method because the url does still exist with
the
   ?plop=foobar but in case I want to use POST method (which I will as my
   form has huge textarea) everything disappear.
   Also this is a turn around I don't like, I would first understand why
it
   doesn't work, and if I can fix it.

   I  browsed the the apache source, and it looks to me that the message
body
   is simply read and dumped into the bit bucket on a 404 with an
ErrorDocument
   (and thus isn't passed as part of the internal request to the
ErrorDocument
   itself).  Perhaps you ought to ask the apache list.

 Apparently, as I do read
 http://www.geocrawler.com/archives/3/182/1999/4/0/1646542/, it's an
 Apache problem.

 Thanks, I move on an Apache user list :)

 --
 Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
 http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/



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




Re: [PHP] ErrorDocument 404 Form

2002-07-17 Thread Tom Ray

Actaully, neither Apache or PHP is at fault. The ErrorDocument (either in
httpd.conf or an .htaccess file) follows absolute paths, so you are calling
your engine.php out of the root directory of the machine. So the question
is, do you have engine.php in the / folder? If not you can put it there or
just adjust your ErrorDocument command to point to the path of the file.

Hope this helps.


- Original Message -
From: Fabien Penso [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 1:21 PM
Subject: [PHP] ErrorDocument 404  Form


 Hi.

 I got a trouble I don't know if Apache or PHP is in fault. Let's say I
 got something like :

 ErrorDocument 404 /engine.php

 If I make a form which use POST and redirect to something which doesn't
 exist, then a phpinfo() in engine.php won't show the variables. Am I
 wrong thinking it should ? Is there a way to make this work ?

 Thanks.

 --
 Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
 http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/

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




Re: [PHP] ErrorDocument 404 Form

2002-07-17 Thread Fabien Penso


Tom a écrit : 

  Actaully, neither Apache or PHP is at fault. The ErrorDocument (either in
  httpd.conf or an .htaccess file) follows absolute paths, so you are calling
  your engine.php out of the root directory of the machine. So the question
  is, do you have engine.php in the / folder? If not you can put it there or
  just adjust your ErrorDocument command to point to the path of the file.

No, you didn't understand. I'll make a simpler example. Let's say I did
use :

ErrorDocument 404 /phpinfo.php

/phpinfo.php exists, it just does phpinfo();

If I call http://localhost/dontexist?plop=foobar I will see the phpinfo,
and I will see variables like :

REDIRECT_ERROR_NOTES: File does not exist: /var/www/dontexist 
REDIRECT_QUERY_STRING: plop=foobar 
REDIRECT_REQUEST_METHOD: GET 
REDIRECT_STATUS: 404 
etc

but $plop won't be set, and there is no way to get the variables
back. In POST method I won't even see the REDIRECT_QUERY_STRING at
all. So should this work, if not why, and is there a way to fix it ?

Thanks :)

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/

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




Re: [PHP] ErrorDocument 404 Form

2002-07-17 Thread David Robley

In article [EMAIL PROTECTED], [EMAIL PROTECTED] says...
 
 Tom a écrit : 
 
   Actaully, neither Apache or PHP is at fault. The ErrorDocument (either in
   httpd.conf or an .htaccess file) follows absolute paths, so you are calling
   your engine.php out of the root directory of the machine. So the question
   is, do you have engine.php in the / folder? If not you can put it there or
   just adjust your ErrorDocument command to point to the path of the file.
 
 No, you didn't understand. I'll make a simpler example. Let's say I did
 use :
 
 ErrorDocument 404 /phpinfo.php
 
 /phpinfo.php exists, it just does phpinfo();
 
 If I call http://localhost/dontexist?plop=foobar I will see the phpinfo,
 and I will see variables like :
 
 REDIRECT_ERROR_NOTES: File does not exist: /var/www/dontexist 
 REDIRECT_QUERY_STRING: plop=foobar 
 REDIRECT_REQUEST_METHOD: GET 
 REDIRECT_STATUS: 404 
 etc
 
 but $plop won't be set, and there is no way to get the variables
 back. In POST method I won't even see the REDIRECT_QUERY_STRING at
 all. So should this work, if not why, and is there a way to fix it ?

I seem to remember some discussion about this ages ago - there was some 
difference between how ErrorDocument works in httpd.conf and .htaccess - 
you might try the latter and see if there is a different result.

Then again, I might not be remembering correctly, so ...

Cheers
-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




Re: [PHP] ErrorDocument 404 Form

2002-07-17 Thread Fabien Penso


David a écrit : 

  In article [EMAIL PROTECTED], [EMAIL PROTECTED] says...

[...]

  but $plop won't be set, and there is no way to get the variables
  back. In POST method I won't even see the REDIRECT_QUERY_STRING at
  all. So should this work, if not why, and is there a way to fix it ?

  I seem to remember some discussion about this ages ago - there was some 
  difference between how ErrorDocument works in httpd.conf and .htaccess - 
  you might try the latter and see if there is a different result.

  Then again, I might not be remembering correctly, so ...

Well it could have been it, but it doesn't work neither trying to set
the ErrorDocument into a .htaccess file.

The problem is I am not even sure where is the trouble, and if it should
work or not (I guess it should), so I don't know exactly where to ask,
the dev list maybe ?

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/

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




Re: [PHP] ErrorDocument 404 Form

2002-07-17 Thread Michael Sims

On Thu, 18 Jul 2002 03:21:48 +0200, you wrote:

  Then again, I might not be remembering correctly, so ...

Well it could have been it, but it doesn't work neither trying to set
the ErrorDocument into a .htaccess file.

The problem is I am not even sure where is the trouble, and if it should
work or not (I guess it should), so I don't know exactly where to ask,
the dev list maybe ?

I seem to remember from when I was toying around with this that
$_SERVER[REQUEST_URI] was still available.  Even if $_GET isn't
populated you could manually parse the REQUEST_URI.  Of course I may
be misremembering...  If it's not available on your install let me
know and I'll setup a test case on my server...

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