WS2003: Version 1.2.13 does not work

Topics: User Forum
Mar 5, 2008 at 9:49 AM
Hi,
I 've a ws2003 R2 sp2 and I use IIEF with php 5.2.4 (isapi)
IIEF is registered as an Allowed Web Service Extension and ISAPI.

My Regular Expressions do not work, my IsapiRewrite4.ini is:

RewriteLog c:\temp\iirfLog.out
RewriteLogLevel 5

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 I,L

Coditionals !-f e -!d are always true, despite the file exists

In my log file i find:

Wed Mar 05 10:22:47 2008 - OnUrlMap: storing physical path (C:\icms3\httpd\www\ciao2.php), in ptr (0x000b16f8)
Wed Mar 05 10:22:47 2008 - HttpFilterProc SFNOTIFYAUTH_COMPLETE
Wed Mar 05 10:22:47 2008 - DoRewrites
Wed Mar 05 10:22:47 2008 - GetServerVariable_AutoFree: getting 'url'
Wed Mar 05 10:22:47 2008 - GetServerVariable_AutoFree - no joy (likely reason: server var not set yet) (GetLastError()=1413)
Wed Mar 05 10:22:47 2008 - GetServerVariable_AutoFree: 128 bytes
Wed Mar 05 10:22:47 2008 - GetServerVariable_AutoFree: result ''
Wed Mar 05 10:22:47 2008 - GetHeader_AutoFree: 11 bytes
Wed Mar 05 10:22:47 2008 - GetHeader_AutoFree: result '/ciao2.php'
Wed Mar 05 10:22:47 2008 - GetServerVariableAutoFree: getting 'QUERYSTRING'
Wed Mar 05 10:22:47 2008 - GetServerVariable_AutoFree: 1 bytes
Wed Mar 05 10:22:47 2008 - GetServerVariable_AutoFree: result ''
Wed Mar 05 10:22:47 2008 - GetHeader_AutoFree: 4 bytes
Wed Mar 05 10:22:47 2008 - GetHeader_AutoFree: result 'GET'
Wed Mar 05 10:22:47 2008 - New Url: '/ciao2.php'
Wed Mar 05 10:22:47 2008 - ApplyRules (depth=0)
Wed Mar 05 10:22:47 2008 - Rule 1 : 2 matches
Wed Mar 05 10:22:47 2008 - GetServerVariable: getting 'REQUEST_FILENAME'
Wed Mar 05 10:22:47 2008 - GetServerVariable: special variable name
Wed Mar 05 10:22:47 2008 - GetServerVariable: 28 bytes
Wed Mar 05 10:22:47 2008 - GetServerVariable: result 'C:\icms3\httpd\www\ciao2.php'
Wed Mar 05 10:22:47 2008 - ReplaceServerVariables: VariableName='REQUEST_FILENAME' Value='C:\icms3\httpd\www\ciao2.php'
Wed Mar 05 10:22:47 2008 - ReplaceServerVariables: InputString='%{REQUEST_FILENAME}' out='C:\icms3\httpd\www\ciao2.php'
Wed Mar 05 10:22:47 2008 - GenerateReplacementString: src='/ciao2.php','(null)' ReplacePattern='C:\icms3\httpd\www\ciao2.php' vec=[[ [ 0, 10, 0, 10] [] ] counts=2,0
Wed Mar 05 10:22:47 2008 - EvaluateCondition: checking 'C:icms3httpdwwwciao2.php' against pattern '!-f'
Wed Mar 05 10:22:47 2008 - EvaluateCondition: cond->SpecialConditionType= 'f'
Wed Mar 05 10:22:47 2008 - EvaluateCondition: Special: it is not a file; not a directory
Wed Mar 05 10:22:47 2008 - EvaluateCondition: Special, retVal= True
Wed Mar 05 10:22:47 2008 - Cond : Child is non NULL
Wed Mar 05 10:22:47 2008 - Cond : Current condition evaluates to TRUE
Wed Mar 05 10:22:47 2008 - Cond : Logical AND, ergo we evaluate the Child
Wed Mar 05 10:22:47 2008 - GetServerVariable: getting 'REQUEST_FILENAME'
Wed Mar 05 10:22:47 2008 - GetServerVariable: special variable name
Wed Mar 05 10:22:47 2008 - GetServerVariable: 28 bytes
Wed Mar 05 10:22:47 2008 - GetServerVariable: result 'C:\icms3\httpd\www\ciao2.php'
Wed Mar 05 10:22:47 2008 - ReplaceServerVariables: VariableName='REQUEST_FILENAME' Value='C:\icms3\httpd\www\ciao2.php'
Wed Mar 05 10:22:47 2008 - ReplaceServerVariables: InputString='%{REQUEST_FILENAME}' out='C:\icms3\httpd\www\ciao2.php'
Wed Mar 05 10:22:47 2008 - GenerateReplacementString: src='/ciao2.php','(null)' ReplacePattern='C:\icms3\httpd\www\ciao2.php' vec=[[ [ 0, 10, 0, 10] [] ] counts=2,0
Wed Mar 05 10:22:47 2008 - EvaluateCondition: checking 'C:icms3httpdwwwciao2.php' against pattern '!-d'
Wed Mar 05 10:22:47 2008 - EvaluateCondition: cond->SpecialConditionType= 'd'
Wed Mar 05 10:22:47 2008 - EvaluateCondition: Special: it is not a file; not a directory
Wed Mar 05 10:22:47 2008 - EvaluateCondition: Special, retVal= True
Wed Mar 05 10:22:47 2008 - Cond : Child is NULL
Wed Mar 05 10:22:47 2008 - EvaluateConditionList: TRUE, Rule will apply
Wed Mar 05 10:22:47 2008 - ReplaceServerVariables: InputString='/index.php/$1' out='/index.php/$1'
Wed Mar 05 10:22:47 2008 - GenerateReplacementString: src='/ciao2.php','(null)' ReplacePattern='/index.php/$1' vec=[[ [ 0, 10, 0, 10] [] ] counts=2,0
Wed Mar 05 10:22:47 2008 - GenerateReplacementString: replacing ($1) with /ciao2.php
Wed Mar 05 10:22:47 2008 - Result (length 21): /index.php//ciao2.php
Wed Mar 05 10:22:47 2008 - Last if Match
Wed Mar 05 10:22:47 2008 - ApplyRules: returning 1
Wed Mar 05 10:22:47 2008 - Rewrite Url to: '/index.php//ciao2.php'

But ciao2.php exists.

I find : EvaluateCondition: checking 'C:icms3httpdwwwciao2.php' against pattern '!-f' , is it correct?


I've:
c:\icms3\ IsapiRewrite4.dll, IsapiRewrite4.ini
c:\icms3\httpd\www index.php, ciao2.php
Everyone have full controll ... for test

Simone

Mar 6, 2008 at 3:10 AM
Hi Simone,

I noticed that version 1.2.13 was buggy on my Windows XP workstation. I didn't get around to testing on W2003, but I don't see what difference that would make anyway.

I tried one of the earlier versions and they evaluated my expressions just fine, although I did not extensively test for memory leaks, or other problems. I think that the latest version uses a different version of PCRE (think I read that somewhere).

What I'd like to know right now if it is safe to use one of the older versions in production, and/or if there will be an update to 1.2.13 that will address the regular expression problem.
Mar 7, 2008 at 9:08 AM
I'm getting similar errors. W2003, IIS6.

{Fri Mar 07 10:53:53 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:53 2008 - HttpFilterProc SFNOTIFYAUTH_COMPLETE
Fri Mar 07 10:53:53 2008 - DoRewrites
Fri Mar 07 10:53:53 2008 - GetServerVariable_AutoFree - no joy (likely reason: server var not set yet) (GetLastError()=1413)
Fri Mar 07 10:53:53 2008 - New Url: '/bwiki/Spezial:Zuf%C3%A4llige_Seite'
Fri Mar 07 10:53:53 2008 - ApplyRules (depth=0)
Fri Mar 07 10:53:53 2008 - Rule 1 : 2 matches
Fri Mar 07 10:53:53 2008 - EvaluateCondition: checking 'www.bcoma.com' against pattern '^www.bcoma.com'
Fri Mar 07 10:53:53 2008 - Cond : 1 (match)
Fri Mar 07 10:53:53 2008 - EvaluateCondition: checking 'C:Inetpubvhostsbcoma.comhttpdocsbwikiSpezial:Zufällige_Seite' against pattern '!-f'
Fri Mar 07 10:53:53 2008 - EvaluateCondition: checking 'C:Inetpubvhostsbcoma.comhttpdocsbwikiSpezial:Zufällige_Seite' against pattern '!-d'
Fri Mar 07 10:53:53 2008 - EvaluateConditionList: TRUE, Rule will apply
Fri Mar 07 10:53:53 2008 - Result (length 45): /index.php?title=Spezial:Zuf%C3%A4llige_Seite
Fri Mar 07 10:53:53 2008 - Last if Match
Fri Mar 07 10:53:53 2008 - ApplyRules: returning 1
Fri Mar 07 10:53:53 2008 - Rewrite Url to: '/index.php?title=Spezial:Zuf%C3%A4llige_Seite'
Fri Mar 07 10:53:53 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:53 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:53 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:53 2008 - HttpFilterProc SFNOTIFYAUTH_COMPLETE
Fri Mar 07 10:53:53 2008 - DoRewrites
Fri Mar 07 10:53:53 2008 - GetServerVariable_AutoFree - no joy (likely reason: server var not set yet) (GetLastError()=1413)
Fri Mar 07 10:53:53 2008 - New Url: '/bwiki/Index.php'
Fri Mar 07 10:53:53 2008 - ApplyRules (depth=0)
Fri Mar 07 10:53:53 2008 - Rule 1 : 2 matches
Fri Mar 07 10:53:53 2008 - EvaluateCondition: checking 'www.bcoma.com' against pattern '^www.bcoma.com'
Fri Mar 07 10:53:53 2008 - Cond : 1 (match)
Fri Mar 07 10:53:53 2008 - EvaluateCondition: checking 'C:Inetpubvhostsbcoma.comhttpdocsbwikiIndex.php' against pattern '!-f'
Fri Mar 07 10:53:53 2008 - EvaluateCondition: checking 'C:Inetpubvhostsbcoma.comhttpdocsbwikiIndex.php' against pattern '!-d'
Fri Mar 07 10:53:53 2008 - EvaluateConditionList: TRUE, Rule will apply
Fri Mar 07 10:53:53 2008 - Result (length 26): /index.php?title=Index.php
Fri Mar 07 10:53:53 2008 - Last if Match
Fri Mar 07 10:53:53 2008 - ApplyRules: returning 1
Fri Mar 07 10:53:53 2008 - Rewrite Url to: '/index.php?title=Index.php'
Fri Mar 07 10:53:53 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:53 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:54 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:54 2008 - HttpFilterProc SFNOTIFYAUTH_COMPLETE
Fri Mar 07 10:53:54 2008 - DoRewrites
Fri Mar 07 10:53:54 2008 - GetServerVariable_AutoFree - no joy (likely reason: server var not set yet) (GetLastError()=1413)
Fri Mar 07 10:53:54 2008 - New Url: '/bwiki/Index.php'
Fri Mar 07 10:53:54 2008 - ApplyRules (depth=0)
Fri Mar 07 10:53:54 2008 - Rule 1 : 2 matches
Fri Mar 07 10:53:54 2008 - EvaluateCondition: checking 'www.bcoma.com' against pattern '^www.bcoma.com'
Fri Mar 07 10:53:54 2008 - Cond : 1 (match)
Fri Mar 07 10:53:54 2008 - EvaluateCondition: checking 'C:Inetpubvhostsbcoma.comhttpdocsbwikiIndex.php' against pattern '!-f'
Fri Mar 07 10:53:54 2008 - EvaluateCondition: checking 'C:Inetpubvhostsbcoma.comhttpdocsbwikiIndex.php' against pattern '!-d'
Fri Mar 07 10:53:54 2008 - EvaluateConditionList: TRUE, Rule will apply
Fri Mar 07 10:53:54 2008 - Result (length 26): /index.php?title=Index.php
Fri Mar 07 10:53:54 2008 - Last if Match
Fri Mar 07 10:53:54 2008 - ApplyRules: returning 1
Fri Mar 07 10:53:54 2008 - Rewrite Url to: '/index.php?title=Index.php'
Fri Mar 07 10:53:54 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:54 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:55 2008 - HttpFilterProc SFNOTIFYURL_MAP
Fri Mar 07 10:53:55 2008 - HttpFilterProc SFNOTIFYAUTH_COMPLETE
Fri Mar 07 10:53:55 2008 - DoRewrites
Fri Mar 07 10:53:55 2008 - GetServerVariable_AutoFree - no joy (likely reason: server var not set yet) (GetLastError()=1413)
Fri Mar 07 10:53:55 2008 - New Url: '/bwiki/Index.php'
Fri Mar 07 10:53:55 2008 - ApplyRules (depth=0)
Fri Mar 07 10:53:55 2008 - Rule 1 : 2 matches
Fri Mar 07 10:53:55 2008 - EvaluateCondition: checking 'www.bcoma.com' against pattern '^www.bcoma.com'
Fri Mar 07 10:53:55 2008 - Cond : 1 (match)
Fri Mar 07 10:53:55 2008 - EvaluateCondition: checking 'C:Inetpubvhostsbcoma.comhttpdocsbwikiIndex.php' against pattern '!-f'
Fri Mar 07 10:53:55 2008 - EvaluateCondition: checking 'C:Inetpubvhostsbcoma.comhttpdocsbwikiIndex.php' against pattern '!-d'
Fri Mar 07 10:53:55 2008 - EvaluateConditionList: TRUE, Rule will apply
Fri Mar 07 10:53:55 2008 - Result (length 26): /index.php?title=Index.php
Fri Mar 07 10:53:55 2008 - Last if Match
Fri Mar 07 10:53:55 2008 - ApplyRules: returning 1
Fri Mar 07 10:53:55 2008 - Rewrite Url to: '/index.php?title=Index.php'
Fri Mar 07 10:53:55 2008 - HttpFilterProc SFNOTIFYURL_MAP}


What does this mean?:
Fri Mar 07 10:53:53 2008 - GetServerVariable_AutoFree - no joy (likely reason: server var not set yet) (GetLastError()=1413)
Mar 7, 2008 at 7:02 PM
I noticed that Cheeso recently released an upgrade at http://www.codeplex.com/IIRF/SourceControl/ListDownloadableCommits.aspx

Tue, 05 Feb 2008 16:11

v1.2.14

1. Fixed a bug where the case-folding flag was a backslash,
resulting in bad case folding for %{REQUEST_FILENAME} in a
RewriteCond, for example. The new case-folding flag
character is #.

2. Fixed a big where a string like %100 (with a subscript out of
range) in a replacement string caused the filter to crash.


Is anyone successfully using this version or is it better to use one of the versions before 1.2.13?
Apr 1, 2008 at 10:04 AM
Edited Apr 1, 2008 at 10:05 AM
I tried using 1.2.13 but to no avail. It does not read a simple rewrite rule such as:

RewriteRule addsite$ addsite.php L

1.2.12c worked fine.
Apr 9, 2008 at 2:19 PM
I'm having the same issue with !-f and !-d in 1.2.13 beta, I wonder if the clue is in this line:

Wed Mar 05 10:22:47 2008 - EvaluateCondition: checking 'C:icms3httpdwwwciao2.php' against pattern '!-d'

Note the mangling of the file that it is testing (no backslashes between directories.) I saw the same thing in my log files.

1.2.12c worked for me. I'm not sure where to snag a compiled version of 1.2.14 to test to see if it is fixed, and I haven't downloaded or compiled the source myself.

- Tony
Coordinator
Apr 15, 2008 at 5:17 PM
Sorry about the problems with 1.2.13 beta. I'm aware of them, just haven't had time to track em down.
Also there is no binary release of 1.2.14. It's a future, planned release.