The missing link…

posted by Viking
Ago 31

Today I tried to do a very simple thing: install PHP 5 on a Windows Server 2003 system to use it with IIS.
There are many HOW-TOs telling how make things work together and, of course, none of them worked for me. Maybe is only because I’m out of luck today.

DISCLAIMER: I’m not responsible in any way of any damage you could cause to your system doing what I’m writing here.

Okay, now assuming IIS 6 is already up and running using the Default Web Site and that you have already installed PHP 5 with ISAPI (there must be a php5isapi.dll file in the directory you have installed PHP into, e.g. C:\PHP\), there are only two steps to perform.

  1. Open the Internet Information Services Management MMC console and add a new extention in the Web service extentions folder.
    I have called mine “PHP Hypertext Preprocessor” (yes, I lack some fantasy…) with a single required file ( C:\PHP\php5isapi.dll ).
    Check first to see if there isn’t one already (even similar but that points to the same file), maybe with different versions of the installer… you know how it works;
  2. Open the folder Web sites and select Default Web Site. Right click on it and select properties. Go to the Home Directory tab, then click on Configuration…
    Add an extension to the list by clicking Add… and then inserting the extension .php and C:\PHP\php5isapi.dll as executable.
    Always check if there isn’t one already… you know.

Now put a php file (like the classic phpinfo.php) into the directory of your site, open it with your browser and, if you can see phpinfo, then it works!


Oggi ho cercato di fare una cosa semplice: installare PHP 5 su un sistema Windows Server 2003 per utilizzarlo con IIS.
Ci sono molti HOW-TO che spiegano come fare funzionare insieme le cose e, ovviamente, nessuna procedura si è rivelata funzionante nel mio caso. Probabilmente perché sono a corto di fortuna oggi.

DISCLAIMER: Il sottoscritto non è responsabile in alcun modo di qualsivoglia danno che potete causare al vostro sistema facendo ciò che ho scritto.

Okay, dando per scontato che IIS 6 sia già avviato e funzionante utilizzando il Sito web predefinito e che abbiate installato PHP con ISAPI (dovrebbe esserci un file php5isapi.dll nella directory nella quale avete installato PHP, ad esempio C:\PHP\), ci sono solo due operazioni da eseguire.

  1. Aprite la console MMC Gestione Internet Information Services e aggiungete una nuova estensione in Estensioni servizio web.
    Io l’ho chiamata “PHP Hypertext Preprocessor” (sì, mi manca un po’ di fantasia…) con un un’unico file richiesto ( C:\PHP\php5isapi.dll ).
    Controllate prima per vedere che non ce ne sia già una (anche simile ma che punti allo stesso file), magari con versioni differenti dell’installer… sapete come funziona;
  2. Aprite la cartella Siti web e selezionate Sito web predefinito. Cliccate con il tasto destro e selezionate Proprietà. Andate alla scheda Home Directory, quindi cliccate su Configurazione…
    Aggiungete un’estensione alla lista cliccando su Add… e quindi inserite l’estensione .php e C:\PHP\php5isapi.dll come eseguibile.

Adesso mettete un file php (tipo il classico phpinfo.php) nella directory del vostro sito, apritelo con il vostro browser e, se riuscite a vedere phpinfo, allora funziona!

Bye

Tags: ,

Categories: computers ,howtos


Leave a Reply

You must be logged in to post a comment.