Bug 21975 - mod_rewrite RewriteMap from external program gets "confused"
Summary: mod_rewrite RewriteMap from external program gets "confused"
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-1.3
Classification: Unclassified
Component: mod_rewrite (show other bugs)
Version: 1.3.27
Hardware: PC Linux
: P1 normal with 3 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-29 17:39 UTC by Jeff Silverman
Modified: 2011-03-21 11:11 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Silverman 2003-07-29 17:39:59 UTC
I am using mod_rewrite to map username's last names to their row_id in my
person database. The Perl script I am using to do this *works* I have
tested it. I try to follow the KISS design philosphy.

example I/O session with this script: # ./facmap.pl
userlastname<ENTER>
53

It spits out the row_id if it gets a valid last name.

Now I am using RewriteMap prg: to get this mapping in Apache as follows:

RewriteMap faculty_map prg:/usr/local/bin/facmap.pl

RewriteRule ^/faculty/([^/]*)(/*.*) /webdir/fp$2?id=${faculty_map:$1} [L]

This *works*!  I know it does. I have seen it! :)

Now, the problem is that it *stops* *working*! After a certain amount of
time, the map gets munged. I have to restart or reload or graceful apache
to get the map working properly again!

Things I do know:
  * The perl script works on its own.
  * The rewrite rules are doing waht I want them to do when I first start
Apache
  * I upgraded the server software recently as follows:
    * Apache 1.3.23 -> 1.3.27
    * PHP 4.3.1 -> 4.3.2
    * MySQL 3.23.23 (?) -> 2.23.56
    * RHL 7.2 -> RHL9
    I mention these upgrades because I had the same basic rewrite rules
before the upgrade and they never seemd to get munged.
  * I tried adding a RewriteLock directive but it did not seem to help.

Things I do NOT know:
  * How much time passes before the problem occurs. * *what* is causing
  the problem
  * How to get the system to log this problem ( I tried bumping up the
RewriteLogLevel to 2 and 3 but this did not seem to capture the event).

Thanks!
Comment 1 André Malo 2003-10-06 09:55:18 UTC
What do you mean with "stops working"? doesn't respond anymore? Returns wrong data?
Comment 2 André Malo 2003-10-06 10:01:22 UTC
Maybe it is related to Bug 14453?
Comment 3 Tobia Caneschi 2003-10-06 10:16:26 UTC
yes, is the same bug.
Comment 4 André Malo 2003-10-06 10:18:54 UTC
Well, then I'll link this report to the other one. After the missing vote for
backport into the stable branches the fix will be done.

Thanks.

*** This bug has been marked as a duplicate of 14453 ***
Comment 5 Surendra Singhi 2009-09-09 11:33:04 UTC
We are using Apache/2.2.4, but we are still facing the same problem. Basically what happens is that user A starts, getting pages asked by user B. The same problem was faced by another user and is mentioned at: http://www.pubbs.net/httpd/200810/23667/

Thanks!
Comment 6 Malte S. Stretz 2011-03-21 11:11:16 UTC
This bug was originally reported against Apache HTTP Server 1.3 and marked as FIXED/DUPLICATE of bug 14453.  The reopening comment 5 and the referred post seem to point to a different bug with RewriteLock.  If this bug is still reproducible in a recent version, please open a new bug so we can keep track of it.