FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > PHP, Perl, Python and/or MySQL
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-22-1999, 03:19 PM   Postid: 42948
Justin
Visitor
 
Justin's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jan 1999
Location: Kissimmee, FL
Posts: 3,672
I'm really not sure why the REQUEST_URI seems to get reset - but I've heard of that before... I have used PHP scripts to handle error documents and with success. For example, go to http://www.hostfacts.com/foo.bar and you'll see where it states "We could not find any file named /foo.bar". You could very easily mail this information out using:


Code Sample:

mail (
   "errors@hostfacts.com",
   "404 - $REQUEST_URI",
   "404 Error - someone requested $REQUEST_URI and they came from $HTTP_REFERER"
);




HTH

------------------
Justin Nelson
FutureQuest Support
Justin is offline   Reply With Quote
Old 07-22-1999, 06:42 PM   Postid: 42949
Stephen
Site Owner
 
Stephen's Avatar

Forum Notability:
89 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Location: L.A.
Posts: 671
Well I might just follow up on your suggestion and write a php version of guardian, minus the 500 error handling. I have avoided php because I haven't been able to get it to run on my home machine. But that's another story...

New question. I changed the index page in my root directory today (though it's still called index.htm) and now it appears that every time I access that top page guardian fires off a 404 Not Found message. Even so, the page gets served OK. Any suggestions about how this might happen, or what is happening? Obviously guardian wouldn't complain if the server didn't call it, so what's Apache doing?
Stephen is offline   Reply With Quote
Old 07-23-1999, 12:37 AM   Postid: 42947
Stephen
Site Owner
 
Stephen's Avatar

Forum Notability:
89 pts: Helpful Contributor
[Post Feedback]
 
Join Date: Feb 1999
Location: L.A.
Posts: 671
guardian continued...

OK, to satisfy Dean I started a new thread on this subject.

Justin, how does using a php script circumvent the problem of having REQUEST_URI reset when Apache reads the .htaccess file to determine which script to execute on a 404 (or other) error? I'm missing something here, because I can't see what difference it makes whether the script is written in perl or php.

I take your point about the endless 500 loop, which could happen if guardian fails for some reason. However there are ways of breaking the loop, and I can implement one--such as making sure guardian isn't the referer. Although it might be safer just to drop the 500 guardian switch from the .htaccess file and let Apache handle that one.
Stephen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 04:04 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.