jmertic         Fri Feb 20 15:48:16 2009 UTC

  Modified files:              
    /win-installer      PHPInstallerBase52.wxs PHPInstallerBase52NTS.wxs 
                        PHPInstallerBase53.wxs PHPInstallerBase53NTS.wxs 
                        PHPInstallerBase60.wxs PHPInstallerBase60NTS.wxs 
                        PHPInstallerScripts52.vbs PHPInstallerScripts60.vbs 
  Log:
  For IIS, set the default document to index.php.
  
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase52.wxs?r1=1.40&r2=1.41&diff_format=u
Index: win-installer/PHPInstallerBase52.wxs
diff -u win-installer/PHPInstallerBase52.wxs:1.40 
win-installer/PHPInstallerBase52.wxs:1.41
--- win-installer/PHPInstallerBase52.wxs:1.40   Tue Feb 17 16:44:59 2009
+++ win-installer/PHPInstallerBase52.wxs        Fri Feb 20 15:48:15 2009
@@ -620,6 +620,15 @@
       Return="ignore" 
       Execute="deferred"
       Impersonate="no" />
+    <CustomAction Id="iis700IndexPhpCmd"
+      Property="iis700IndexPhp"
+      Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/defaultDocument 
/+&quot;files.[...@end,value='index.php'[\]]&quot;" />
+    <CustomAction Id="iis700IndexPhp"
+      BinaryKey="WixCA"
+      DllEntry="CAQuietExec"
+      Return="ignore"
+      Execute="deferred"
+      Impersonate="no" />
     <CustomAction Id="iis700FastCGIaddremoveCmd"
       Property="iis700FastCGIaddremove"
       Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/fastCGI 
/-&quot;[\[]fullPath='[INSTALLDIR]php-cgi.exe'[\]]&quot;" />
@@ -776,6 +785,12 @@
       <Custom Action="iis700FastCGI" After="iis700FastCGICmd">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
       </Custom>
+      <Custom Action="iis700IndexPhpCmd" After="iis700FastCGI">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
+      <Custom Action="iis700IndexPhp" After="iis700IndexPhpCmd">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="iis700FastCGIremoveCmd" After="InstallInitialize">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 2]]>
       </Custom>
@@ -839,7 +854,7 @@
       <Custom Action="configIIS4" After="InstallFinalize">
         <![CDATA[VersionNT < 600 AND &iis4FastCGI = 3]]>
       </Custom>
-      <Custom Action="unconfigIIS4" After="fcgiconfigJSFastCGIremove">
+      <Custom Action="unconfigIIS4" After="InstallInitialize">
         <![CDATA[VersionNT < 600 AND &iis4FastCGI = 2]]>
       </Custom>
       <Custom Action="unconfigApache" After="InstallValidate">
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase52NTS.wxs?r1=1.16&r2=1.17&diff_format=u
Index: win-installer/PHPInstallerBase52NTS.wxs
diff -u win-installer/PHPInstallerBase52NTS.wxs:1.16 
win-installer/PHPInstallerBase52NTS.wxs:1.17
--- win-installer/PHPInstallerBase52NTS.wxs:1.16        Tue Feb 17 16:44:59 2009
+++ win-installer/PHPInstallerBase52NTS.wxs     Fri Feb 20 15:48:15 2009
@@ -26,13 +26,13 @@
     </Upgrade>
 
     <Condition 
-         Message="You need to be an administrator to install PHP using this 
installer.">
+      Message="You need to be an administrator to install PHP using this 
installer.">
       <![CDATA[Privileged OR (AdminUser AND VersionNT >= 600]]>
     </Condition>
     
     <Condition 
-         Message="PHP requires Windows NT/2000/XP/2003/Vista/2008 or later to 
install">
-         <![CDATA[( VersionNT < 400 ) OR ( Version9x <> 0 )]]>
+      Message="PHP requires Windows NT/2000/XP/2003/Vista/2008 or later to 
install">
+      <![CDATA[( VersionNT < 400 ) OR ( Version9x <> 0 )]]>
     </Condition>
 
     <Media Id="1" 
@@ -487,6 +487,15 @@
       Return="ignore" 
       Execute="deferred"
       Impersonate="no" />
+    <CustomAction Id="iis700IndexPhpCmd"
+      Property="iis700IndexPhp"
+      Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/defaultDocument 
/+&quot;files.[...@end,value='index.php'[\]]&quot;" />
+    <CustomAction Id="iis700IndexPhp"
+      BinaryKey="WixCA"
+      DllEntry="CAQuietExec"
+      Return="ignore"
+      Execute="deferred"
+      Impersonate="no" />
     <CustomAction Id="iis700FastCGIaddremoveCmd"
       Property="iis700FastCGIaddremove"
       Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/fastCGI 
/-&quot;[\[]fullPath='[INSTALLDIR]php-cgi.exe'[\]]&quot;" />
@@ -617,6 +626,12 @@
       <Custom Action="iis700FastCGI" After="iis700FastCGICmd">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
       </Custom>
+      <Custom Action="iis700IndexPhpCmd" After="iis700FastCGI">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
+      <Custom Action="iis700IndexPhp" After="iis700IndexPhpCmd">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="iis700FastCGIremoveCmd" After="InstallInitialize">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 2]]>
       </Custom>
@@ -647,6 +662,9 @@
       <Custom Action="fcgiconfigJSFastCGISetPHPRCAndMAX_REQUESTS" 
After="fcgiconfigJSFastCGISetPHPRCAndMAX_REQUESTSCmd">
         <![CDATA[(VersionNT = 502 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 3]]>
       </Custom>
+      <Custom Action="configIIS4" After="InstallFinalize">
+        <![CDATA[VersionNT < 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="fcgiconfigJSFastCGICmdXP" After="InstallInitialize">
         <![CDATA[(VersionNT = 501 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 3]]>
       </Custom>
@@ -677,6 +695,9 @@
       <Custom Action="fcgiconfigJSFastCGIremoveXP" 
After="fcgiconfigJSFastCGIremoveCmdXP">
         <![CDATA[(VersionNT = 501 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 2]]>
       </Custom>
+      <Custom Action="unconfigIIS4" After="InstallInitialize">
+        <![CDATA[VersionNT < 600 AND &iis4FastCGI = 2]]>
+      </Custom>
       <RemoveExistingProducts After="InstallValidate" />
     </InstallExecuteSequence>
     
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase53.wxs?r1=1.16&r2=1.17&diff_format=u
Index: win-installer/PHPInstallerBase53.wxs
diff -u win-installer/PHPInstallerBase53.wxs:1.16 
win-installer/PHPInstallerBase53.wxs:1.17
--- win-installer/PHPInstallerBase53.wxs:1.16   Tue Feb 17 16:44:59 2009
+++ win-installer/PHPInstallerBase53.wxs        Fri Feb 20 15:48:16 2009
@@ -591,6 +591,15 @@
       Return="ignore" 
       Execute="deferred"
       Impersonate="no" />
+    <CustomAction Id="iis700IndexPhpCmd"
+      Property="iis700IndexPhp"
+      Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/defaultDocument 
/+&quot;files.[...@end,value='index.php'[\]]&quot;" />
+    <CustomAction Id="iis700IndexPhp"
+      BinaryKey="WixCA"
+      DllEntry="CAQuietExec"
+      Return="ignore"
+      Execute="deferred"
+      Impersonate="no" />
     <CustomAction Id="iis700FastCGIaddremoveCmd"
       Property="iis700FastCGIaddremove"
       Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/fastCGI 
/-&quot;[\[]fullPath='[INSTALLDIR]php-cgi.exe'[\]]&quot;" />
@@ -747,6 +756,12 @@
       <Custom Action="iis700FastCGI" After="iis700FastCGICmd">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
       </Custom>
+      <Custom Action="iis700IndexPhpCmd" After="iis700FastCGI">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
+      <Custom Action="iis700IndexPhp" After="iis700IndexPhpCmd">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="iis700FastCGIremoveCmd" After="InstallInitialize">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 2]]>
       </Custom>
@@ -810,7 +825,7 @@
       <Custom Action="configIIS4" After="InstallFinalize">
         <![CDATA[VersionNT < 600 AND &iis4FastCGI = 3]]>
       </Custom>
-      <Custom Action="unconfigIIS4" After="fcgiconfigJSFastCGIremove">
+      <Custom Action="unconfigIIS4" After="InstallInitialize">
         <![CDATA[VersionNT < 600 AND &iis4FastCGI = 2]]>
       </Custom>
       <Custom Action="unconfigApache" After="InstallValidate">
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase53NTS.wxs?r1=1.15&r2=1.16&diff_format=u
Index: win-installer/PHPInstallerBase53NTS.wxs
diff -u win-installer/PHPInstallerBase53NTS.wxs:1.15 
win-installer/PHPInstallerBase53NTS.wxs:1.16
--- win-installer/PHPInstallerBase53NTS.wxs:1.15        Tue Feb 17 16:44:59 2009
+++ win-installer/PHPInstallerBase53NTS.wxs     Fri Feb 20 15:48:16 2009
@@ -458,6 +458,15 @@
       Return="ignore" 
       Execute="deferred"
       Impersonate="no" />
+    <CustomAction Id="iis700IndexPhpCmd"
+      Property="iis700IndexPhp"
+      Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/defaultDocument 
/+&quot;files.[...@end,value='index.php'[\]]&quot;" />
+    <CustomAction Id="iis700IndexPhp"
+      BinaryKey="WixCA"
+      DllEntry="CAQuietExec"
+      Return="ignore"
+      Execute="deferred"
+      Impersonate="no" />
     <CustomAction Id="iis700FastCGIaddremoveCmd"
       Property="iis700FastCGIaddremove"
       Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/fastCGI 
/-&quot;[\[]fullPath='[INSTALLDIR]php-cgi.exe'[\]]&quot;" />
@@ -588,6 +597,12 @@
       <Custom Action="iis700FastCGI" After="iis700FastCGICmd">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
       </Custom>
+      <Custom Action="iis700IndexPhpCmd" After="iis700FastCGI">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
+      <Custom Action="iis700IndexPhp" After="iis700IndexPhpCmd">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="iis700FastCGIremoveCmd" After="InstallInitialize">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 2]]>
       </Custom>
@@ -618,6 +633,9 @@
       <Custom Action="fcgiconfigJSFastCGISetPHPRCAndMAX_REQUESTS" 
After="fcgiconfigJSFastCGISetPHPRCAndMAX_REQUESTSCmd">
         <![CDATA[(VersionNT = 502 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 3]]>
       </Custom>
+      <Custom Action="configIIS4" After="InstallFinalize">
+        <![CDATA[VersionNT < 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="fcgiconfigJSFastCGICmdXP" After="InstallInitialize">
         <![CDATA[(VersionNT = 501 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 3]]>
       </Custom>
@@ -648,6 +666,9 @@
       <Custom Action="fcgiconfigJSFastCGIremoveXP" 
After="fcgiconfigJSFastCGIremoveCmdXP">
         <![CDATA[(VersionNT = 501 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 2]]>
       </Custom>
+      <Custom Action="unconfigIIS4" After="InstallInitialize">
+        <![CDATA[VersionNT < 600 AND &iis4FastCGI = 2]]>
+      </Custom>
       <RemoveExistingProducts After="InstallValidate" />
     </InstallExecuteSequence>
     
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase60.wxs?r1=1.30&r2=1.31&diff_format=u
Index: win-installer/PHPInstallerBase60.wxs
diff -u win-installer/PHPInstallerBase60.wxs:1.30 
win-installer/PHPInstallerBase60.wxs:1.31
--- win-installer/PHPInstallerBase60.wxs:1.30   Tue Feb 17 16:44:59 2009
+++ win-installer/PHPInstallerBase60.wxs        Fri Feb 20 15:48:16 2009
@@ -591,6 +591,15 @@
       Return="ignore" 
       Execute="deferred"
       Impersonate="no" />
+    <CustomAction Id="iis700IndexPhpCmd"
+      Property="iis700IndexPhp"
+      Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/defaultDocument 
/+&quot;files.[...@end,value='index.php'[\]]&quot;" />
+    <CustomAction Id="iis700IndexPhp"
+      BinaryKey="WixCA"
+      DllEntry="CAQuietExec"
+      Return="ignore"
+      Execute="deferred"
+      Impersonate="no" />
     <CustomAction Id="iis700FastCGIaddremoveCmd"
       Property="iis700FastCGIaddremove"
       Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/fastCGI 
/-&quot;[\[]fullPath='[INSTALLDIR]php-cgi.exe'[\]]&quot;" />
@@ -747,6 +756,12 @@
       <Custom Action="iis700FastCGI" After="iis700FastCGICmd">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
       </Custom>
+      <Custom Action="iis700IndexPhpCmd" After="iis700FastCGI">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
+      <Custom Action="iis700IndexPhp" After="iis700IndexPhpCmd">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="iis700FastCGIremoveCmd" After="InstallInitialize">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 2]]>
       </Custom>
@@ -810,7 +825,7 @@
       <Custom Action="configIIS4" After="InstallFinalize">
         <![CDATA[VersionNT < 600 AND &iis4FastCGI = 3]]>
       </Custom>
-      <Custom Action="unconfigIIS4" After="fcgiconfigJSFastCGIremove">
+      <Custom Action="unconfigIIS4" After="InstallInitialize">
         <![CDATA[VersionNT < 600 AND &iis4FastCGI = 2]]>
       </Custom>
       <Custom Action="unconfigApache" After="InstallValidate">
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerBase60NTS.wxs?r1=1.16&r2=1.17&diff_format=u
Index: win-installer/PHPInstallerBase60NTS.wxs
diff -u win-installer/PHPInstallerBase60NTS.wxs:1.16 
win-installer/PHPInstallerBase60NTS.wxs:1.17
--- win-installer/PHPInstallerBase60NTS.wxs:1.16        Tue Feb 17 16:44:59 2009
+++ win-installer/PHPInstallerBase60NTS.wxs     Fri Feb 20 15:48:16 2009
@@ -458,6 +458,15 @@
       Return="ignore" 
       Execute="deferred"
       Impersonate="no" />
+    <CustomAction Id="iis700IndexPhpCmd"
+      Property="iis700IndexPhp"
+      Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/defaultDocument 
/+&quot;files.[...@end,value='index.php'[\]]&quot;" />
+    <CustomAction Id="iis700IndexPhp"
+      BinaryKey="WixCA"
+      DllEntry="CAQuietExec"
+      Return="ignore"
+      Execute="deferred"
+      Impersonate="no" />
     <CustomAction Id="iis700FastCGIaddremoveCmd"
       Property="iis700FastCGIaddremove"
       Value="&quot;[WindowsFolder]system32\inetsrv\APPCMD.EXE&quot; SET CONFIG 
-section:system.webServer/fastCGI 
/-&quot;[\[]fullPath='[INSTALLDIR]php-cgi.exe'[\]]&quot;" />
@@ -588,6 +597,12 @@
       <Custom Action="iis700FastCGI" After="iis700FastCGICmd">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
       </Custom>
+      <Custom Action="iis700IndexPhpCmd" After="iis700FastCGI">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
+      <Custom Action="iis700IndexPhp" After="iis700IndexPhpCmd">
+        <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="iis700FastCGIremoveCmd" After="InstallInitialize">
         <![CDATA[VersionNT >= 600 AND &iis4FastCGI = 2]]>
       </Custom>
@@ -618,6 +633,9 @@
       <Custom Action="fcgiconfigJSFastCGISetPHPRCAndMAX_REQUESTS" 
After="fcgiconfigJSFastCGISetPHPRCAndMAX_REQUESTSCmd">
         <![CDATA[(VersionNT = 502 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 3]]>
       </Custom>
+      <Custom Action="configIIS4" After="InstallFinalize">
+        <![CDATA[VersionNT < 600 AND &iis4FastCGI = 3]]>
+      </Custom>
       <Custom Action="fcgiconfigJSFastCGICmdXP" After="InstallInitialize">
         <![CDATA[(VersionNT = 501 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 3]]>
       </Custom>
@@ -648,6 +666,9 @@
       <Custom Action="fcgiconfigJSFastCGIremoveXP" 
After="fcgiconfigJSFastCGIremoveCmdXP">
         <![CDATA[(VersionNT = 501 AND ServicePackLevel >= 2) AND &iis4FastCGI 
= 2]]>
       </Custom>
+      <Custom Action="unconfigIIS4" After="InstallInitialize">
+        <![CDATA[VersionNT < 600 AND &iis4FastCGI = 2]]>
+      </Custom>
       <RemoveExistingProducts After="InstallValidate" />
     </InstallExecuteSequence>
     
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerScripts52.vbs?r1=1.12&r2=1.13&diff_format=u
Index: win-installer/PHPInstallerScripts52.vbs
diff -u win-installer/PHPInstallerScripts52.vbs:1.12 
win-installer/PHPInstallerScripts52.vbs:1.13
--- win-installer/PHPInstallerScripts52.vbs:1.12        Wed Feb 11 17:49:52 2009
+++ win-installer/PHPInstallerScripts52.vbs     Fri Feb 20 15:48:16 2009
@@ -1,7 +1,7 @@
 Const ForReading = 1
 Const ForWriting = 2
 
-sub configApache
+Sub configApache
 
     Dim objFSO
     Dim objFile
@@ -14,24 +14,24 @@
     End If
     
     If ( Session.FeatureRequestState("apacheCGI") = 3 ) Then
-               strDirective = strDirective & "ScriptAlias /php/ """ & 
strPHPPath & """" & vbCrLf
-               strDirective = strDirective & "Action application/x-httpd-php 
""" & strPHPPath & "php-cgi.exe""" & vbCrLf
-       End If
+        strDirective = strDirective & "ScriptAlias /php/ """ & strPHPPath & 
"""" & vbCrLf
+        strDirective = strDirective & "Action application/x-httpd-php """ & 
strPHPPath & "php-cgi.exe""" & vbCrLf
+    End If
     
     If ( Session.FeatureRequestState("apache22") = 3 ) Then
-               strDirective = strDirective & "PHPIniDir """ & strPHPPath & 
"""" & vbCrLf
-               strDirective = strDirective & "LoadModule php5_module """ & 
strPHPPath & "php5apache2_2.dll""" & vbCrLf
-       End If
+        strDirective = strDirective & "PHPIniDir """ & strPHPPath & """" & 
vbCrLf
+        strDirective = strDirective & "LoadModule php5_module """ & strPHPPath 
& "php5apache2_2.dll""" & vbCrLf
+    End If
         
-       If ( Session.FeatureRequestState("apache20") = 3 ) Then
-               strDirective = strDirective & "PHPIniDir """ & strPHPPath & 
"""" & vbCrLf
-               strDirective = strDirective & "LoadModule php5_module """ & 
strPHPPath & "php5apache2.dll""" & vbCrLf
-       End If
+    If ( Session.FeatureRequestState("apache20") = 3 ) Then
+        strDirective = strDirective & "PHPIniDir """ & strPHPPath & """" & 
vbCrLf
+        strDirective = strDirective & "LoadModule php5_module """ & strPHPPath 
& "php5apache2.dll""" & vbCrLf
+    End If
         
-       If ( Session.FeatureRequestState("apache13") = 3 ) Then
-               strDirective = strDirective & "PHPIniDir """ & strPHPPath & 
"""" & vbCrLf
-               strDirective = strDirective & "LoadModule php5_module """ & 
strPHPPath & "php5apache.dll""" & vbCrLf
-       End If
+    If ( Session.FeatureRequestState("apache13") = 3 ) Then
+        strDirective = strDirective & "PHPIniDir """ & strPHPPath & """" & 
vbCrLf
+        strDirective = strDirective & "LoadModule php5_module """ & strPHPPath 
& "php5apache.dll""" & vbCrLf
+    End If
     
     strDirective = strDirective &  "#END PHP INSTALLER EDITS - REMOVE ONLY ON 
UNINSTALL" & vbCrLf
     
@@ -98,9 +98,9 @@
     objFile.WriteLine strText
     objFile.Close
     
-end sub
+End Sub
 
-sub unconfigApache
+Sub unconfigApache
 
     Dim objFSO
     Dim objFile
@@ -143,11 +143,12 @@
     objFile.WriteLine strNewText
     objFile.Close
 
-end sub
+End Sub
 
-sub configIIS4
+Sub configIIS4
 
     Dim WebService
+    Dim WebService1
     Dim Paths
     Dim Nodes()
     Dim NumExtensions
@@ -159,7 +160,10 @@
     Dim J
     Dim K
     Dim MapNode, ScriptMaps, OutMaps(), Map, MapBits
- 
+    Dim fAddScriptMap
+    Dim DefaultDocuments
+
+    fAddScriptMap = TRUE
     strPHPPath = Session.TargetPath("INSTALLDIR")
     If ( right(strPHPPath,1) <> "\" ) then 
         strPHPPath = strPHPPath & "\"
@@ -171,17 +175,7 @@
         PHPExecutable = strPHPPath & "php5isapi.dll"
     End If
     If ( Session.FeatureRequestState("iis4FastCGI") = 3 ) Then
-       Exit Sub
-    End If
-    
-    If ( FormatNumber(GetWindowsVersion) < FormatNumber("5.2") ) Then
-        'use short path syntax here
-        Set objFSO = CreateObject("Scripting.FileSystemObject")
-        Set objFile = objFSO.GetFile(PHPExecutable)
-        PHPExecutable = objFile.ShortPath
-    Else
-        'use quotes and long name syntax
-        PHPExecutable = """" & PHPExecutable & """"
+        fAddScriptMap = FALSE
     End If
     
     'it could all go dreadfully wrong - so set error handler for graceful exits
@@ -192,42 +186,74 @@
         FatalError ("Error trying access the local web service: GetObject 
Failed.")
         Exit Sub
     End If
-    'I may be doing the wrong thing with inheritance here - it seems to work, 
however!
-    Paths = WebService.GetDataPaths("scriptmaps", IIS_DATA_INHERIT)
-    If Err.Number <> 0 Then Paths = WebService.GetDataPaths("scriptmaps", 
IIS_DATA_NO_INHERIT)
-    If (Err.Number <> 0) Then
-        FatalError ("Error trying to find the nodes containing scriptmaps 
:GetDataPaths Failed.")
-        Exit Sub
+
+    ' Add index.php to default documents list at server level
+    DefaultDocuments = WebService.DefaultDoc
+    If ( InStr(DefaultDocuments,"index.php") = 0 ) Then
+        DefaultDocuments = DefaultDocuments & ",index.php"
+        WebService.DefaultDoc = DefaultDocuments
+        WebService.SetInfo
+    End If
+
+    ' Add index.php to default documents list of SiteId 1
+    Set WebService1 = GetObject("IIS://LocalHost/W3SVC/1")
+    If (Err.Number = 0) Then
+        DefaultDocuments = WebService1.DefaultDoc
+        If ( InStr(DefaultDocuments,"index.php") = 0 ) Then
+            DefaultDocuments = DefaultDocuments & ",index.php"
+            WebService1.DefaultDoc = DefaultDocuments
+            WebService1.SetInfo
+        End If
     End If
-    For Each FullPath In Paths
-        Set MapNode = GetObject(FullPath)
-        ReDim OutMaps(0)
-        J = 0
-        For Each Map In MapNode.ScriptMaps
-            'split the extension from the scriptmap entry
-            MapBits = Split(Map, ",")
-            If MapBits(0) <> ".php" Then
-                'if the extension doesn't match any of our php ones, preserve 
it
-                ReDim Preserve OutMaps(J)
-                OutMaps(J) = Map
-                J = J + 1
-            End If
-        Next
 
-        ReDim Preserve OutMaps(J + 1 - 1)
+    If ( fAddScriptMap = TRUE ) Then
+        If ( FormatNumber(GetWindowsVersion) < FormatNumber("5.2") ) Then
+            'use short path syntax here
+            Set objFSO = CreateObject("Scripting.FileSystemObject")
+            Set objFile = objFSO.GetFile(PHPExecutable)
+            PHPExecutable = objFile.ShortPath
+        Else
+            'use quotes and long name syntax
+            PHPExecutable = """" & PHPExecutable & """"
+        End If
+    
+        'I may be doing the wrong thing with inheritance here - it seems to 
work, however!
+        Paths = WebService.GetDataPaths("scriptmaps", IIS_DATA_INHERIT)
+        If Err.Number <> 0 Then Paths = WebService.GetDataPaths("scriptmaps", 
IIS_DATA_NO_INHERIT)
+        If (Err.Number <> 0) Then
+            FatalError ("Error trying to find the nodes containing scriptmaps 
:GetDataPaths Failed.")
+            Exit Sub
+        End If
+        For Each FullPath In Paths
+            Set MapNode = GetObject(FullPath)
+            ReDim OutMaps(0)
+            J = 0
+            For Each Map In MapNode.ScriptMaps
+                'split the extension from the scriptmap entry
+                MapBits = Split(Map, ",")
+                If MapBits(0) <> ".php" Then
+                    'if the extension doesn't match any of our php ones, 
preserve it
+                    ReDim Preserve OutMaps(J)
+                    OutMaps(J) = Map
+                    J = J + 1
+                End If
+            Next
+
+            ReDim Preserve OutMaps(J + 1 - 1)
 
-        'add our php extensions to OutMaps
-        OutMaps(J) = ".php" & "," & PHPExecutable & ",1"
+            'add our php extensions to OutMaps
+            OutMaps(J) = ".php" & "," & PHPExecutable & ",1"
    
-        'write the Outmap to the current node
-        MapNode.Put "ScriptMaps", (OutMaps)
-        'setinfo to make it so
-        MapNode.SetInfo
-    Next
+            'write the Outmap to the current node
+            MapNode.Put "ScriptMaps", (OutMaps)
+            'setinfo to make it so
+            MapNode.SetInfo
+        Next
+    End If
     
 End Sub
 
-sub unconfigIIS4
+Sub unconfigIIS4
 
     Dim WebService
     Dim Paths
@@ -241,12 +267,15 @@
     Dim J
     Dim K
     Dim MapNode, ScriptMaps, OutMaps(), Map, MapBits
+    Dim fRemoveScriptMap
  
+    fRemoveScriptMap = TRUE
+
     'it could all go dreadfully wrong - so set error handler for graceful exits
     On Error Resume Next
 
     If ( Session.FeatureRequestState("iis4FastCGI") = 2 ) Then
-       Exit Sub
+        fRemoveScriptMap = FALSE
     End If
  
     Set WebService = GetObject("IIS://LocalHost/W3SVC")
@@ -254,35 +283,38 @@
         FatalError ("Error trying access the local web service: GetObject 
Failed.")
         Exit Sub
     End If
-    'I may be doing the wrong thing with inheritance here - it seems to work, 
however!
-    Paths = WebService.GetDataPaths("scriptmaps", IIS_DATA_INHERIT)
-    If Err.Number <> 0 Then Paths = WebService.GetDataPaths("scriptmaps", 
IIS_DATA_NO_INHERIT)
-    If (Err.Number <> 0) Then
-        FatalError ("Error trying to find the nodes containing scriptmaps 
:GetDataPaths Failed.")
-        Exit Sub
-    End If
-    For Each FullPath In Paths
-        Set MapNode = GetObject(FullPath)
-        ReDim OutMaps(0)
-        J = 0
-        For Each Map In MapNode.ScriptMaps
-            'split the extension from the scriptmap entry
-            MapBits = Split(Map, ",")
-            If MapBits(0) <> ".php" Then
-                'if the extension doesn't match any of our php ones, preserve 
it
-                ReDim Preserve OutMaps(J)
-                OutMaps(J) = Map
-                J = J + 1
-            End If
-        Next
 
-        'write the Outmap to the current node
-        MapNode.Put "ScriptMaps", (OutMaps)
-        'setinfo to make it so
-        MapNode.SetInfo
-    Next
+    If ( fRemoveScriptMap = TRUE ) Then
+        'I may be doing the wrong thing with inheritance here - it seems to 
work, however!
+        Paths = WebService.GetDataPaths("scriptmaps", IIS_DATA_INHERIT)
+        If Err.Number <> 0 Then Paths = WebService.GetDataPaths("scriptmaps", 
IIS_DATA_NO_INHERIT)
+        If (Err.Number <> 0) Then
+            FatalError ("Error trying to find the nodes containing scriptmaps 
:GetDataPaths Failed.")
+            Exit Sub
+        End If
+        For Each FullPath In Paths
+            Set MapNode = GetObject(FullPath)
+            ReDim OutMaps(0)
+            J = 0
+            For Each Map In MapNode.ScriptMaps
+                'split the extension from the scriptmap entry
+                MapBits = Split(Map, ",")
+                If MapBits(0) <> ".php" Then
+                    'if the extension doesn't match any of our php ones, 
preserve it
+                    ReDim Preserve OutMaps(J)
+                    OutMaps(J) = Map
+                    J = J + 1
+                End If
+            Next
+
+            'write the Outmap to the current node
+            MapNode.Put "ScriptMaps", (OutMaps)
+            'setinfo to make it so
+            MapNode.SetInfo
+        Next
+    End If
 
-end sub
+End Sub
 
 Sub FatalError(Message)
     MsgBox Message & " You will need to manually configure the web server.", 
vbExclamation, "Error"
http://cvs.php.net/viewvc.cgi/win-installer/PHPInstallerScripts60.vbs?r1=1.12&r2=1.13&diff_format=u
Index: win-installer/PHPInstallerScripts60.vbs
diff -u win-installer/PHPInstallerScripts60.vbs:1.12 
win-installer/PHPInstallerScripts60.vbs:1.13
--- win-installer/PHPInstallerScripts60.vbs:1.12        Wed Feb 11 17:49:52 2009
+++ win-installer/PHPInstallerScripts60.vbs     Fri Feb 20 15:48:16 2009
@@ -1,7 +1,7 @@
 Const ForReading = 1
 Const ForWriting = 2
 
-sub configApache
+Sub configApache
 
     Dim objFSO
     Dim objFile
@@ -14,24 +14,24 @@
     End If
     
     If ( Session.FeatureRequestState("apacheCGI") = 3 ) Then
-               strDirective = strDirective & "ScriptAlias /php/ """ & 
strPHPPath & """" & vbCrLf
-               strDirective = strDirective & "Action application/x-httpd-php 
""" & strPHPPath & "php-cgi.exe""" & vbCrLf
-       End If
+        strDirective = strDirective & "ScriptAlias /php/ """ & strPHPPath & 
"""" & vbCrLf
+        strDirective = strDirective & "Action application/x-httpd-php """ & 
strPHPPath & "php-cgi.exe""" & vbCrLf
+    End If
     
     If ( Session.FeatureRequestState("apache22") = 3 ) Then
-               strDirective = strDirective & "PHPIniDir """ & strPHPPath & 
"""" & vbCrLf
-               strDirective = strDirective & "LoadModule php6_module """ & 
strPHPPath & "php6apache2_2.dll""" & vbCrLf
-       End If
+        strDirective = strDirective & "PHPIniDir """ & strPHPPath & """" & 
vbCrLf
+        strDirective = strDirective & "LoadModule php6_module """ & strPHPPath 
& "php6apache2_2.dll""" & vbCrLf
+    End If
         
-       If ( Session.FeatureRequestState("apache20") = 3 ) Then
-               strDirective = strDirective & "PHPIniDir """ & strPHPPath & 
"""" & vbCrLf
-               strDirective = strDirective & "LoadModule php6_module """ & 
strPHPPath & "php6apache2.dll""" & vbCrLf
-       End If
+    If ( Session.FeatureRequestState("apache20") = 3 ) Then
+        strDirective = strDirective & "PHPIniDir """ & strPHPPath & """" & 
vbCrLf
+        strDirective = strDirective & "LoadModule php6_module """ & strPHPPath 
& "php6apache2.dll""" & vbCrLf
+    End If
         
-       If ( Session.FeatureRequestState("apache13") = 3 ) Then
-               strDirective = strDirective & "PHPIniDir """ & strPHPPath & 
"""" & vbCrLf
-               strDirective = strDirective & "LoadModule php6_module """ & 
strPHPPath & "php6apache.dll""" & vbCrLf
-       End If
+    If ( Session.FeatureRequestState("apache13") = 3 ) Then
+        strDirective = strDirective & "PHPIniDir """ & strPHPPath & """" & 
vbCrLf
+        strDirective = strDirective & "LoadModule php6_module """ & strPHPPath 
& "php6apache.dll""" & vbCrLf
+    End If
     
     strDirective = strDirective &  "#END PHP INSTALLER EDITS - REMOVE ONLY ON 
UNINSTALL" & vbCrLf
     
@@ -98,9 +98,9 @@
     objFile.WriteLine strText
     objFile.Close
     
-end sub
+End Sub
 
-sub unconfigApache
+Sub unconfigApache
 
     Dim objFSO
     Dim objFile
@@ -143,11 +143,12 @@
     objFile.WriteLine strNewText
     objFile.Close
 
-end sub
+End Sub
 
-sub configIIS4
+Sub configIIS4
 
     Dim WebService
+    Dim WebService1
     Dim Paths
     Dim Nodes()
     Dim NumExtensions
@@ -159,7 +160,10 @@
     Dim J
     Dim K
     Dim MapNode, ScriptMaps, OutMaps(), Map, MapBits
- 
+    Dim fAddScriptMap
+    Dim DefaultDocuments
+
+    fAddScriptMap = TRUE
     strPHPPath = Session.TargetPath("INSTALLDIR")
     If ( right(strPHPPath,1) <> "\" ) then 
         strPHPPath = strPHPPath & "\"
@@ -171,17 +175,7 @@
         PHPExecutable = strPHPPath & "php6isapi.dll"
     End If
     If ( Session.FeatureRequestState("iis4FastCGI") = 3 ) Then
-       Exit Sub
-    End If
-    
-    If ( FormatNumber(GetWindowsVersion) < FormatNumber("5.2") ) Then
-        'use short path syntax here
-        Set objFSO = CreateObject("Scripting.FileSystemObject")
-        Set objFile = objFSO.GetFile(PHPExecutable)
-        PHPExecutable = objFile.ShortPath
-    Else
-        'use quotes and long name syntax
-        PHPExecutable = """" & PHPExecutable & """"
+        fAddScriptMap = FALSE
     End If
     
     'it could all go dreadfully wrong - so set error handler for graceful exits
@@ -192,42 +186,74 @@
         FatalError ("Error trying access the local web service: GetObject 
Failed.")
         Exit Sub
     End If
-    'I may be doing the wrong thing with inheritance here - it seems to work, 
however!
-    Paths = WebService.GetDataPaths("scriptmaps", IIS_DATA_INHERIT)
-    If Err.Number <> 0 Then Paths = WebService.GetDataPaths("scriptmaps", 
IIS_DATA_NO_INHERIT)
-    If (Err.Number <> 0) Then
-        FatalError ("Error trying to find the nodes containing scriptmaps 
:GetDataPaths Failed.")
-        Exit Sub
+
+    ' Add index.php to default documents list at server level
+    DefaultDocuments = WebService.DefaultDoc
+    If ( InStr(DefaultDocuments,"index.php") = 0 ) Then
+        DefaultDocuments = DefaultDocuments & ",index.php"
+        WebService.DefaultDoc = DefaultDocuments
+        WebService.SetInfo
+    End If
+
+    ' Add index.php to default documents list of SiteId 1
+    Set WebService1 = GetObject("IIS://LocalHost/W3SVC/1")
+    If (Err.Number = 0) Then
+        DefaultDocuments = WebService1.DefaultDoc
+        If ( InStr(DefaultDocuments,"index.php") = 0 ) Then
+            DefaultDocuments = DefaultDocuments & ",index.php"
+            WebService1.DefaultDoc = DefaultDocuments
+            WebService1.SetInfo
+        End If
     End If
-    For Each FullPath In Paths
-        Set MapNode = GetObject(FullPath)
-        ReDim OutMaps(0)
-        J = 0
-        For Each Map In MapNode.ScriptMaps
-            'split the extension from the scriptmap entry
-            MapBits = Split(Map, ",")
-            If MapBits(0) <> ".php" Then
-                'if the extension doesn't match any of our php ones, preserve 
it
-                ReDim Preserve OutMaps(J)
-                OutMaps(J) = Map
-                J = J + 1
-            End If
-        Next
 
-        ReDim Preserve OutMaps(J + 1 - 1)
+    If ( fAddScriptMap = TRUE ) Then
+        If ( FormatNumber(GetWindowsVersion) < FormatNumber("5.2") ) Then
+            'use short path syntax here
+            Set objFSO = CreateObject("Scripting.FileSystemObject")
+            Set objFile = objFSO.GetFile(PHPExecutable)
+            PHPExecutable = objFile.ShortPath
+        Else
+            'use quotes and long name syntax
+            PHPExecutable = """" & PHPExecutable & """"
+        End If
+    
+        'I may be doing the wrong thing with inheritance here - it seems to 
work, however!
+        Paths = WebService.GetDataPaths("scriptmaps", IIS_DATA_INHERIT)
+        If Err.Number <> 0 Then Paths = WebService.GetDataPaths("scriptmaps", 
IIS_DATA_NO_INHERIT)
+        If (Err.Number <> 0) Then
+            FatalError ("Error trying to find the nodes containing scriptmaps 
:GetDataPaths Failed.")
+            Exit Sub
+        End If
+        For Each FullPath In Paths
+            Set MapNode = GetObject(FullPath)
+            ReDim OutMaps(0)
+            J = 0
+            For Each Map In MapNode.ScriptMaps
+                'split the extension from the scriptmap entry
+                MapBits = Split(Map, ",")
+                If MapBits(0) <> ".php" Then
+                    'if the extension doesn't match any of our php ones, 
preserve it
+                    ReDim Preserve OutMaps(J)
+                    OutMaps(J) = Map
+                    J = J + 1
+                End If
+            Next
+
+            ReDim Preserve OutMaps(J + 1 - 1)
 
-        'add our php extensions to OutMaps
-        OutMaps(J) = ".php" & "," & PHPExecutable & ",1"
+            'add our php extensions to OutMaps
+            OutMaps(J) = ".php" & "," & PHPExecutable & ",1"
    
-        'write the Outmap to the current node
-        MapNode.Put "ScriptMaps", (OutMaps)
-        'setinfo to make it so
-        MapNode.SetInfo
-    Next
+            'write the Outmap to the current node
+            MapNode.Put "ScriptMaps", (OutMaps)
+            'setinfo to make it so
+            MapNode.SetInfo
+        Next
+    End If
     
 End Sub
 
-sub unconfigIIS4
+Sub unconfigIIS4
 
     Dim WebService
     Dim Paths
@@ -241,12 +267,15 @@
     Dim J
     Dim K
     Dim MapNode, ScriptMaps, OutMaps(), Map, MapBits
+    Dim fRemoveScriptMap
  
+    fRemoveScriptMap = TRUE
+
     'it could all go dreadfully wrong - so set error handler for graceful exits
     On Error Resume Next
 
     If ( Session.FeatureRequestState("iis4FastCGI") = 2 ) Then
-       Exit Sub
+        fRemoveScriptMap = FALSE
     End If
  
     Set WebService = GetObject("IIS://LocalHost/W3SVC")
@@ -254,35 +283,38 @@
         FatalError ("Error trying access the local web service: GetObject 
Failed.")
         Exit Sub
     End If
-    'I may be doing the wrong thing with inheritance here - it seems to work, 
however!
-    Paths = WebService.GetDataPaths("scriptmaps", IIS_DATA_INHERIT)
-    If Err.Number <> 0 Then Paths = WebService.GetDataPaths("scriptmaps", 
IIS_DATA_NO_INHERIT)
-    If (Err.Number <> 0) Then
-        FatalError ("Error trying to find the nodes containing scriptmaps 
:GetDataPaths Failed.")
-        Exit Sub
-    End If
-    For Each FullPath In Paths
-        Set MapNode = GetObject(FullPath)
-        ReDim OutMaps(0)
-        J = 0
-        For Each Map In MapNode.ScriptMaps
-            'split the extension from the scriptmap entry
-            MapBits = Split(Map, ",")
-            If MapBits(0) <> ".php" Then
-                'if the extension doesn't match any of our php ones, preserve 
it
-                ReDim Preserve OutMaps(J)
-                OutMaps(J) = Map
-                J = J + 1
-            End If
-        Next
 
-        'write the Outmap to the current node
-        MapNode.Put "ScriptMaps", (OutMaps)
-        'setinfo to make it so
-        MapNode.SetInfo
-    Next
+    If ( fRemoveScriptMap = TRUE ) Then
+        'I may be doing the wrong thing with inheritance here - it seems to 
work, however!
+        Paths = WebService.GetDataPaths("scriptmaps", IIS_DATA_INHERIT)
+        If Err.Number <> 0 Then Paths = WebService.GetDataPaths("scriptmaps", 
IIS_DATA_NO_INHERIT)
+        If (Err.Number <> 0) Then
+            FatalError ("Error trying to find the nodes containing scriptmaps 
:GetDataPaths Failed.")
+            Exit Sub
+        End If
+        For Each FullPath In Paths
+            Set MapNode = GetObject(FullPath)
+            ReDim OutMaps(0)
+            J = 0
+            For Each Map In MapNode.ScriptMaps
+                'split the extension from the scriptmap entry
+                MapBits = Split(Map, ",")
+                If MapBits(0) <> ".php" Then
+                    'if the extension doesn't match any of our php ones, 
preserve it
+                    ReDim Preserve OutMaps(J)
+                    OutMaps(J) = Map
+                    J = J + 1
+                End If
+            Next
+
+            'write the Outmap to the current node
+            MapNode.Put "ScriptMaps", (OutMaps)
+            'setinfo to make it so
+            MapNode.SetInfo
+        Next
+    End If
 
-end sub
+End Sub
 
 Sub FatalError(Message)
     MsgBox Message & " You will need to manually configure the web server.", 
vbExclamation, "Error"

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

Reply via email to