Welcome to WebmasterWorld Guest from 34.229.24.100

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

RewriteMap with perl script problem

     
11:00 am on Jan 13, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 13, 2004
posts:2
votes: 0


Hi all,

With the following configuration I have a problem to start the httpd server, message: 'The requested operation has failed!'.
I have also tested the configuration and no errors are reported.

In the httpd logfile there is this line:
[Tue Jan 13 11:53:27 2004] [error] (OS 193)%1 n'est pas une application Win32 valide. : mod_rewrite: could not startup RewriteMap program (null)

Since 3 months nobody could answer to me about this problem ... so please help.

thx

System:
--------
- WinXP Pro
- Httpd 2.0.48
- Perl 5.8.2

httpd.conf:
------------
[...]
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

RewriteEngine on
RewriteLog logs/rewrite_error.log
RewriteLogLevel 9
RewriteLocklogs/rewrite.lock
RewriteMaptestprg:/test.pl
RewriteRule"^/(.*)"http://${failover:$1}/$1[P,L]

c:/test.pl:
------------
#!/perl/bin/perl
$¦ = 1;
while (<STDIN>) {
s¦bar¦quux¦;
print $_;
}

3:48 am on Jan 14, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


walouh,

Welcome to WebmasterWorld [webmasterworld.com]!

It is likely that there is some problem with your server configuration, since it is trying to start RewriteMap as a program, and then failing because it does not recognize it as a valid Windows program (je parle un peu, mais j'oublie la plus-part).

Also, as posted above, the following lines appears to be missing spaces, which may not help. (It could also just be a character-code problem with posting here on the board using your current browser settings).


RewriteLock logs/rewrite.lock
RewriteMap test prg:/test.pl
RewriteRule "^/(.*) "http://${failover:$1}/$1[P,L]

I'm not enough of a server config expert to tell what's wrong, but hopefully one of our server gurus will see this thread and check in.

Jim

1:29 pm on Jan 14, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 13, 2004
posts:2
votes: 0


Sorry this is due to copy/paste ... but there are space in my httpd.conf file.

But my problem is resolved and you're right when you said that windows does not recognize the perl program as a valid win32 application.

Solution :
----------
RewriteMap test "prg:c:/perl/bin/perl.exe /test.pl"

Also if anyone as a trick which permit to specify a program without specifying the associated intepreter, I'm aware of it.

Thanx for answer