note 50302 added to install.windows.iis

From: Date: Thu, 24 Feb 2005 09:34:14 +0000
Subject: note 50302 added to install.windows.iis
Groups: php.notes 
Request: Send a blank email to php-notes+get-85473@lists.php.net to get a copy of this message
Hint registered to IIS 6 as ISAPI without using GUI. (It is a machine translation from Japanese to English. ) [Method of addition to Web enhancing] 'IISEXT.VBS' is attached to IIS 6. <addition example> iisext /AddFile C:\PHP\php5isapi.dll 1 PHP 1 "PHP: Hypertext Preprocessor" <deletion example> iisext /RmFile C:\PHP\php5isapi.dll [Method of adding extension to Application Mappings] To our regret, there is no good method in the standard. :-( The source code of C# program that is registered and deleted is presented in the mapping. (It is hoped that someone writes VBScript or the JScript version) <addition example> iis6isapimap add .PHP C:\PHP\php5isapi.dll < deletion example> iis6isapimap delete .PHP C# source code (Add 'System.DirectoryServices' to the reference) ------------------------------------------------------------ using System; using System.Collections; using System.DirectoryServices; namespace IIS6ISAPIMAP { class StartClass { public static void print_man() { Console.WriteLine("IIS6ISAPIMAP [view|add|delete] <.ext> <ISAPI DLL PATH> (METHOD LIST)"); } [STAThread] static void Main(string[] args) { if ( args.GetLength(0) < 1 ) { print_man(); return; } System.DirectoryServices.DirectoryEntry dent = new DirectoryEntry("IIS://localhost/W3SVC/1/root"); ArrayList orglist = new ArrayList( dent.Properties["ScriptMaps"] ) ; if ( args[0].ToLower() == "view" ) { foreach(string s in orglist) { Console.WriteLine(s); } } else if ( args[0].ToLower() == "add" ) { if ( args.GetLength(0) < 3 ) { print_man(); } else { ArrayList newlist = new ArrayList(); string ext = args[1]; string path = args[2]; string methods = args.GetLength(0) < 4 ? "" : args[3]; string newmap = ext + "," + path + ",5," + methods; foreach(string s in orglist) { string [] tokn = s.Split(','); if ( tokn[0].ToLower() != ext.ToLower() ) { newlist.Add( s ); } } newlist.Add( newmap ); dent.Properties["ScriptMaps"].Value = newlist.ToArray(); dent.CommitChanges(); } } else if ( args[0].ToLower() == "delete" ) { if ( args.GetLength(0) < 2 ) { print_man(); } else { ArrayList newlist = new ArrayList(); string ext = args[1]; foreach(string s in orglist) { string [] tokn = s.Split(','); if ( tokn[0].ToLower() != ext.ToLower() ) { newlist.Add( s ); } } dent.Properties["ScriptMaps"].Value = newlist.ToArray(); dent.CommitChanges(); } } else { print_man(); } dent.Dispose(); } } } ---- Manual Page -- http://www.php.net/manual/en/install.windows.iis.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50302 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50302&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50302&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50302&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50302&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50302&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50302&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85473) next »