Вы находитесь на странице: 1из 39

Installation de IIS 6/PHP et MySQL sous Windows Serveur 2003

Devant installer un serveur web dans un OS impos (Windows 2k3) qui nest plus tout fait jour mais encore fort utilis dans le monde de lentreprise avec une technologie web ferm (IIS 6.0) Le tout non en ASP (.net) mais bien en PHP, pour moi cest exactement contraire ma religion mon choix mais bon ici je ne grais pas laspect technique et maintenance Jai donc install IIS 6.0, Fast CGI, PHP5 et MySQL et pour tre franc, cela na pas t aussi facile que tout le monde le croit. Jai mme eu dur installer le Web Platform sur le 2003 un vrai crasse ! Aprs de longues recherches, les fichiers .php ntaient pas interprt par le serveur et celui-ci affichait une erreur 404 (Sur internet jai trouv plein de trucs&astuces mais tous datant de 2005-6 et parlant encore de .dll isapi qui ne sont plus existantes dans les nouvelles versions ou de PATH modifier puis jai prouv pas mal de problmes avec lextension PHP LDAP Voici donc tape par tape les oprations raliser pour que votre serveur web soit fonctionnel. (A jour en date du 17 fvrier 2011!)

1. Installer le rle IIS :

Rendez-vous dans le Manage You Server

Add or Remove a role

Next

Slectionnez Application server (IIS,ASP.NET)

A vous de slectionner si vous voulez le FrontPage et ASP.NET (cest optionnel au bon fonctionnement mais bon)

Next (On commence avoir lhabitude!)

Ce pauvre Windows vous demande des sources pour installer le role, il suffit de mettre le CD ou davoir copier le dossier I368 sur votre HDD!

Et voil cest enfin fini (Reste plus qu tester si cela est pleinement fonctionnel) => 9 tapes pour faire un apt get install apache2 ou yum install apache2

Start -> All Programs -> Administive Tools -> Internet Information Services IIS Manager

Rendez-vous dans Web Sites -> Default Web Site -> Et activer le (La touche Play) et testez en vous rendant sur http://localhost Si cela affiche Under Construction cest que vos IIS fonctionnent bien ! (Cest dj un bon point!) Conseil : Pensez toujours faire les mises jour Windows Jusquici rien de compliqu lIIS !

2. Installer Fast CGI 1.5 pour IIS6:


Jai rencontr des problmes (Erreur404) en installant le PHP sans le Fast CGI, celuici acclrant le display des pages Disponible ici : http://www.iis.net/download/fastcgi On va donc linstaller et je vous conseille fortement de le faire sinon cest pas certain que a marchera !

Il vous suffit de lancer lexcutable suivant et dappuyer sur Install

3. Installer PHP5. pour IIS6:


Dans mon cas je vais utiliser la dernire en date : la version 5.3.5 , Pour Windows il faut la VC9 et je vous conseille la NTS (Non Thread Safe)

Lancez le php-5.3.5-nts-Win32-VC9-x86.msi que vous trouverez sur windows.php.net

Next

Cochez : I accept the terms in the Licence Agreement -> Next

Choisissez le chemin dinstallation (moi jai laiss C:\Program Files\PHP\ )

Comme dans ce tuto nous avons install le IIS FastCGI car sans a, a ne fonctionnait pas, donc nous le cochons!

Ici installez TOUTES Les extensions donc vous avez besoin, car si vous ne les cochez pas, les dll ne se copieront pas dans le dossier ext/ et pour installer linstaller il ne vous suffira pas de lactiver par le fichier php.ini (exemple : extension=php_ldap.dll) -> Perso jai besoin du LDAP

Start -> All Programs -> Administive Tools -> Internet Information Services IIS Manager-> Web Service Extension -> Add a new Web extension

Entrez dans Extension name : Fichier PHP et rajoutez (ADD) lexcutable php-cgi.exe qui se trouve ici C:\Program Files\PHP\phpcgi.exe Personnellement jai essay avec le php.exe , php-win.exe voir php5isapi.dll, php5nsapi.dll ou encore php5ts.dll SANS SUCCS (Attention ne prenez pas des dll de version EasyPHP,Wamp,Xampp,Mamp, car les dll sont prvue pour du Apache !)

Clic droit sur Fichier PHP -> Allow

Rendez vous dans longlet Default Web Site -> Clic droit > Properties

Onglet Home Directory -> Configuration

Add

Entre dans le champ Executable : C:\Program Files\PHP\php-cgi.exe (Avec les guillemets car nous avons une espace dans ProgramFiles ) Et dans lextension : .php (sans les guillemets cette fois) OK

Start -> Execute -> cmd -> iisreset (pour redmarrer lIIS) Et crer dans le C:/Inetpub/wwwroot/ un index.php et crivez dedans <?php phpinfo() Et lancez IE et allez sur http://localhost/index.php et a fonctionne : a affiche le phpinfo !

4. Installer MySQL :
Nous allons utiliser la technologie mysql pour le stockage de base de donne (cest bien souvent un standard)

La version actuelle au moment ou je vous parle est la 5.5.8 pour win32/64 trouvable ici : http://dev.mysql.com/downloads/mysql/

Lancez linstaller mysql-5.5.8-win32.msi -> Next

Cochez I accept the terms in the Licence Agreement (Noubliez pas de lire les 63 Pages !)

Nous allons linstaller normalement en Typical (ne compliquons pas les choses)

Install

Next

Next

Cochez Lauch the Mysql Instance Configuration Wizard -> Finish

Next

Detailed Configuration -> Next

Pour ma part cest une machine qui va rentrer en production donc je slectionne le Server Machine -> Next

Multifunctionnal Database -> Next

Si vous avez une partition ou un disque diffrent pour le stockage de la base de donnes. -> Next

Decision Support (DSS)/OLAP -> Next

(Pour cette partie je vous conseille de dsactiver votre Firewall/Antivirus) Et rajoutez toujours Add Firewall exception for this port le port par dfaut est le 3306 -> Next

Standard Character Set -> Next

Installez le comme service pour que celui-ci dmarre avec Windows (Lauch the MySQL Server automatically)

Inscrivez un mot de passe complexe (Majuscule-MinusculeCaractre Spciaux-chiffre!) Et si vous devez attendre la DB en remote slectionnez le! Et voila, linstallation va se faire. Des fois linstallation, bloque linstallation du service , je vous conseille de dsinstaller linstance , puis dsinstaller le mysql server , lancer un Ccleaner (fichier/registre) puis relancer linstallation de mysql server from scratch!

5. Installer PHPMyADMIN:
Pour administrer la base de donnes, je vais utiliser PHPMyadmin qui permet de crer des tables , utilisateurs , dumper des SQL, Tlcharger le zip sur http://www.phpmyadmin.net/home_page/downloads.php version 3.3.9.2

Copiez et Dcompressez le contenu du zip dans le C:/Inetpub/wwwroot/ et renommez le dossier en phpmyadmin

Rendez-vous sur http://localhost/phpmyadmin et loguer vous en root votre mot de passe a t dfinis pendant linstallation de MySQL server

Et voila maintenant vous pouvez administrer les Database en en crant de nouvelle

Ajout daccs (Privilges), Import Export , Cependant des fois si vous importez une SQL un peu trop grande la page charge et sarrte ou affiche un erreur en cours de route

Il faut modifier des valeur PHP pour augmenter les valeurs de temps limite dexcution , maximum de la ram utilisable , lenvoie maximum de fichier ,

Le fichier a modifier est PHP.ini Les valeurs a augmenter sont : max_execution_time max_input_time memory_limit upload_max_filesize post_max_size Voila maintenant vous savez tout !

Microsoft IIS 5.1 et IIS 6.0


Cette section contient les instructions pour une installation manuelle sous IIS (Internet Information Services) 5.1 et IIS 6.0 de PHP sous Microsoft Windows XP et Windows Server 2003. Pour des instructions sur la configuration sous IIS 7.0 et suprieur sous Windows Vista, Windows Server 2008, Windows 7 et Windows Server 2008 R2, reportez-vous la section Microsoft IIS 7.0 et suivant.

Configuration sous IIS pour traiter les requtes PHP


Tlchargez et installez PHP suivant les instructions dcrites dans les tapes d'installation manuelle. Note: La version PHP non thread-safe est recommand lors de l'utilisation d'IIS. Ces versions sont disponibles sur la page PHP pour Windows : Binaires et sources. Configurez les options CGI- et FastCGI du fichier php.ini comme ceci : Exemple #1 Options de configuration de CGI et FastCGI du fichier php.ini
fastcgi.impersonate = 1 fastcgi.logging = 0 cgi.fix_pathinfo=1 cgi.force_redirect = 0

Tlchargez et installez l'extension Microsoft FastCGI pour IIS 5.1 et 6.0. L'extension est disponible pour les plate-formes 32-bit et 64-bit - slectionnez le bon paquet pour votre plate-forme.. Configurez l'extension FastCGI pour grer les requtes spcifiques PHP en excutant la commande ci-dessous. Remplacez la valeur du paramtre "-path" avec le chemin absolu vers le fichier php-cgi.exe. Exemple #2 Configuration de l'extension FastCGI pour grer les requtes PHP
cscript %windir%\system32\inetsrv\fcgiconfig.js -add -section:"PHP" ^ -extension:php -path:"C:\PHP\php-cgi.exe"

Cette commande va crer un mapping des scripts IIS pour les extensions de fichiers *.php, ce qui aura pour effet la gestion de toutes les URLs se terminant par .php par l'extension FastCGI. De plus, la commande configurera l'extension FastCGI lui demandant d'utiliser l'excutable php-cgi.exe pour traiter les requtes PHP. Note:

A ce point, les tapes d'installation et de configuration ncessaires sont termines. Les instructions qui suivent dans cette section sont optionnelles mais vivement recommandes afin d'atteindre des fonctionnalits et des performances optimales de PHP sous IIS.

Usurpation d'identit et accs au systme de fichiers


Il est recommand d'activer l'usurpation d'identit pour FastCGI en PHP lors de l'utilisation avec IIS. Ce mode est contrl par la directive fastcgi.impersonate du fichier php.ini. Lorsque ce mode est activ, PHP effectuera toutes les oprations du systme de fichiers avec le compte utilisateur qui a t choisi pour l'authentification IIS. Ceci assure que, mme si le mme processus PHP est partag avec diffrents sites web IIS, les scripts PHP de ces sites web ne pourront pas accder aux autres fichiers tant que diffrents comptes utilisateurs sont utilises pour l'authentification IIS de chaque site web. Par exemple, IIS 5.1 et IIS 6.0, dans leurs configurations par dfaut, ont d'activ l'authentification anonyme avec le compte interne IUSR_<MACHINE_NAME> utilis comme identit par dfaut. Ceci signifie que, afin de permettre IIS d'excuter des scripts PHP, il est ncessaire de donner les droits de lecture au compte IUSR_<MACHINE_NAME> pour ces scripts. Si les applications PHP doivent effectuer des oprations en criture sur certains fichiers ou crire des fichiers dans des dossiers, le compte IUSR_<MACHINE_NAME> doit avoir les permissions en criture sur ces diffrents lments. Pour dterminer quel est le compte utilisateur utilis par l'authentification anonyme IIS, suivez ces tapes : 1. Dans le menu de dmarrage de Windows, choisissez : "Run:", tapez "inetmgr" et cliquez sur "Ok"; 2. Dpliez la liste des sites Web sous le nud "Web Sites" de l'arbre, fates un clic droit sur un site web utilis et slectionnez "Properties"; 3. Cliquez sur l'onglet "Directory Security"; 4. Prenez note du champ "User name:" dans le dialogue "Authentication Methods"

Pour modifier la configuration des permissions sur des fichiers ou des dossiers, utilisez l'explorateur Windows ou la commande icacls. Exemple #3 Configuration des permissions d'accs
icacls C:\inetpub\wwwroot\upload /grant IUSR:(OI)(CI)(M)

Dfinition du fichier index.php comme document par dfaut sous IIS


Les documents par dfaut IIS sont utiliss pour les requtes HTTP qui ne spcifie pas de nom de document. Avec les applications PHP, index.php agit gnralement comme document par dfaut. Pour ajouter index.php la liste des documents par dfaut IIS, suivez ces tapes : 1. Dans le menu de dmarrage Windows, choisissez "Run:", tapez "inetmgr" et cliquez sur "Ok"; 2. fates un clic droit sur le nud "Web Sites" de l'arbre et slectionnez "Properties"; 3. Cliquez sur l'onglet "Documents"; 4. Cliquez sur le bouton "Add..." et entrez "index.php" comme "Default content page:".

Configuration du recyclage FastCGI et PHP


Configurez l'extension IIS FastCGI pour le recyclage des processus PHP en utilisant la commande ci-dessous. La directive instanceMaxRequests de FastCGI contrle le nombre de requtes a trait par un seul processus php-cgi.exe avant l'extinction de l'extension FastCGI. La variable d'environnement PHP PHP_FCGI_MAX_REQUESTS contrle le nombre de requtes qu'un seul processus php-cgi.exe peut grer avant de ce recycler lui-mme. Assurez-vous que la valeur spcifie pour la directive InstanceMaxRequests FastCGI est infrieure ou gale la valeur spcifie pour la directive PHP_FCGI_MAX_REQUESTS. Exemple #4 Configuration du recyclage FastCGI et PHP
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^ -InstanceMaxRequests:10000 cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^ -EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000

Configuration du dlai d'expiration FastCGI


Augmentez le dlai d'expiration pour l'extension FastCGI s'il y a des applications dont les scripts PHP mettent beaucoup de temps s'excuter. Les 2 configurations qui contrlent les dlais d'expiration sont ActivityTimeout et RequestTimeout. Referez-

vous la configuration de l'extension FastCGI pour IIS 6.0 pour plus d'informations sur ces configurations. Exemple #5 Configuration du dlai d'expiration FastCGI
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^ -ActivityTimeout:90 cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^ -RequestTimeout:90

Modification du dossier contenant le fichier php.ini


PHP recherche le fichier php.ini dans diffrents endroits et il est possible de modifier ces endroits de recherche du fichier php.ini en utilisant la variable d'environnement PHPRC. Pour demander PHP de charger le fichier de configuration depuis un dossier personnalis, excutez la commande ci-dessous. Le chemin absolu du dossier contenant le fichier php.ini doit tre spcifi sous la variable d'environnement PHPRC. Exemple #6 Modification du dossier contenant le fichier php.ini
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^ -EnvironmentVars:PHPRC:"C:\Some\Directory\"

Microsoft IIS 7.0 et suivants

Microsoft IIS

[edit] Last updated: Fri, 16 Mar 2012


add a note User Contributed Notes Microsoft IIS 5.1 et IIS 6.0 bjorn dot tornroth at nettitonttu dot fi 12-Feb-2012 09:45 If you receive: Input Error: There is no script engine for file extension ".js". When executing: cscript %windir%\system32\inetsrv\fcgiconfig.js -add -section:"PHP" extension:php -path:"C:\PHP\php-cgi.exe" Include the switch: /e:jscript Like this: cscript /e:jscript %windir%\system32\inetsrv\fcgiconfig.js -add section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe" Worked on freshly installed XP Pro ENG SP3(updated).

Anonymous 10-Feb-2012 02:53


I am using Win 2003 Server SP2, IIS 6, Installing PHP 5.3.10 as FastCGI

If you continue to receive FastCGI could not proccess your request Access Denied Error -5 check to make sure the IIS_WPG Group has Read, Read/Execute permission to the PHP installation directory and is inherited to the php-cgi.exe file. Also, in researching this problem during my installation, I also found that you should have an entry in the IIS Web Extensions for the php-cgi.exe.

koen dot bauwens at fracarita dot org 08-Sep-2011 12:42


When executing: cscript %windir%\system32\inetsrv\fcgico nfig.js -add -section:"PHP" ^ More? -extension:php -path:"C:\PHP\php-cgi.exe" You get this response: Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. C:\WINDOWS\system32\inetsrv\fcgiconfig.js(1348, 5) (null): 0xFFFFFFDF Then check if in the C:\WINDOWS\system32\inetsrv\fcgiext.ini file the next text is present: [Types] php=c:\php\php-cgi.exe [c:\php\php-cgi.exe] QueueLength=999 MaxInstances=20 InstanceMaxRequests=10000 IdleTimeout=90 RequestTimeout=90 If not, add it, worked for me!

gsaarenvirta at makeplain dot com 13-Mar-2011 04:49


A note for your reference ... I was getting error 404 "file not found when trying to browse .php" files in \inetpub\wwwroot although .html files worked fine... messed around for hours until I tried this on advice of a friend. FYI ... Operating system Windows Server 2003 SP2 x64 IIS v6.0 PHP v 5.3.5 nts windows x86 Microsoft C++ 2008 redistributable no fastcgi Followed all the manual PHP configuration instructions very carefully, set php.ini directives, gave appropriate permissions to "IUSR_(machine)", set up web extensions etc. etc. The final fix that made everything work... renamed 'php.ini' to 'phpcgi-fcgi.ini' Hope this saves someone hours...

crab dot crab at gmail dot com 18-Nov-2010 11:40

I am using Win 2003 Server, IIS 6, PHP 5. If you see "You are not authorized to view this page" error when running your PHP page. Try one more thing: 1. Right-click {C:\php} (or your PHP installation root) and select {Properties} 2. Select {Security} tab and click {Add} button 3. Enter {ComputerName/IUSR_ComputerName} as object name and press {OK} 4. Select {Read & Execute} as permissions 5. Click {Advanced} button and select {Allow inheritable permissions from the parent...} checkbox 6. Press {OK}

Anonymous 12-Oct-2010 01:49


Facts: WinXp Pro, IIS 5.1, add extension ".php" to default web site, Ok button disabled from application configuration mapping after setting the path to executable Solution: Click inside the textbox after setting the path will enable ok button Source: http://support.microsoft.com/?id=317948

Anonymous 14-Sep-2010 10:29


i`ve the same trouble after the install php 5.2.14-nts on IIS6 (Win2003Server)- try to open-dialog when php-file is opening... I`ve to manual add .php in "Application configuration" ... \system32\inetsrv\fcgiext.dll (even this option selected in installation - "Script executable") this solved the problem :)

Neil Plumridge 24-Aug-2010 07:00


Using WinXP/SP3, IIS5.1, I found that following the instructions added the .PHP file association to the 'Web Sites' level in the IIS Manager, but when I tried to access a PHP page my browser tried to download it. I had to add the same .PHP file association to the 'Default Web Site' configuration too.

joseph dot dew at metso dot com 28-Jun-2010 09:44


Using PHP 5.3.2 non thread safe VC9 I had to copy the php.ini to phpcgi-fcgi.ini otherwise I just got 404 errors.

tapes pour une installation manuelle


Cette section contient les instructions pour installer manuellement et configurer PHP sous Microsoft Windows. Si vous recherchez la faon dont doit tre utilis l'installeur PHP pour installer et configurer PHP et un serveur Web sous Windows, rfrez-vous l'installeur Windows (PHP 5.2 et suivants).

Slection et tlchargement de PHP


Tlchargez l'archive PHP depuis PHP pour Windows: Binaires et sources. Il y a plusieurs versions de l'archive zip - choisissez la version correspondante au serveur web que vous utilisez :

Si PHP est utilis avec IIS, alors choisissez PHP 5.3 VC9 Non Thread Safe ou PHP 5.2 VC6 Non Thread Safe; Si PHP est utilis avec IIS7 ou suprieure et PHP 5.3+, alors les binaires VC9 de PHP doivent tre utiliss. Si PHP est utilis avec Apache 1 ou Apache 2, alors choisissez PHP 5.3 VC6 ou PHP 5.2 VC6.

Note: Les versions VC9 sont compiles avec le compilateur Visual Studio 2008 et sont optimises en terme de performance et de stabilit. Les versions VC9 ncessitent d'avoir Microsoft 2008 C++ Runtime (x86) ou Microsoft 2008 C++ Runtime (x64) d'install.

La structure et le contenu du paquet PHP


Dcompressez le contenu de l'archive zip dans le dossier de votre choix, par exemple C:\PHP\. La structure des dossiers et des fichiers extraits depuis l'archive zip ressemble ceci : Exemple #1 Structure d'un paquet PHP 5
c:\php | +--dev | | | |-php5ts.lib safe | +--ext | | | |-php_bz2.dll | | | |-php_cpdf.dll | | | |-... | +--extras

-- php5.lib en version non thread -- bibliothques DLLs pour PHP

-- vide

| +--pear -| | |-go-pear.bat -| |-... | |-php-cgi.exe -| |-php-win.exe -un prompt de commande ouvert | |-php.exe -(CLI) | |-... | |-php.ini-development -php.ini | |-php.ini-production -php.ini | |-php5apache2_2.dll -non thread safe | |-php5apache2_2_filter.dll -non thread safe | |-... | |-php5ts.dll -php5.dll en version non thread safe) | |-...

copie initiale de PEAR script d'installation de PEAR

excutable CGI excution de scripts sans avoir excutable de ligne de commande

configuration par dfaut du configuration recommande du n'existe pas dans la version n'existe pas dans la version

bibliothque DLL coeur de PHP (

Voici la liste des modules et des excutables inclus dans l'archive zip de PHP :

go-pear.bat - le script de configuration de PEAR. Rfrez-vous l' installation de PEAR pour plus de dtails. php-cgi.exe - excutable CGI qui peut tre utilis lors de l'excution de PHP sous IIS via CGI ou FastCGI. php-win.exe - l'excutable PHP pour l'excution de scripts PHP sans fentre de ligne de commande (par exemple, des applications PHP qui utilisent un GUI Windows). php.exe - l'excutable PHP pour l'excution de scripts PHP dans une interface de ligne de commande (CLI). php5apache2_2.dll - module Apache 2.2.X. php5apache2_2_filter.dll - filtre Apache 2.2.X.

Modification du fichier php.ini


Aprs l'extraction du contenu du paquet PHP, copiez le fichier php.ini-production dans le fichier php.ini du mme dossier. Si ncessaire, il est galement possible de

placer le fichier php.ini dans le dossier de votre choix mais cela ncessite d'autres tapes de configuration dcrites dans la configuration de PHP. Le fichier php.ini indique PHP la faon doit il doit se configurer, mais aussi la faon dont il doit travailler avec l'environnement sur lequel il s'excute. Voici quelques concfigurations du fichier php.ini qui aide PHP fonctionner d'une meilleure faon sous Windows. Quelques-unes sont optionnelles. Il y a bien d'autres directives utiles pour votre environnement - rfrez-vous la liste des directives du php.ini pour plus d'informations. Directives ncessaires :

extension_dir = <chemin vers le dossier des extensions> - extension_dir doit pointer vers le dossier contenant les fichiers des extensions PHP. Le chemin peut tre absolu (e.g. "C:\PHP\ext") ou relatif (e.g. ".\ext"). Les extensions listes ci-dessous dans le fichier php.ini doivent se trouver dans le dossier extension_dir. extension = xxxxx.dll - Pour chaque extension que vous voulez activer, vous avez besoin d'une directive "extension=" qui indique PHP quelles extensions du dossier extension_dir doivent tre charges au dmarrage. log_errors = On - PHP a une fonctionnalit permettant d'historiser les erreurs, pouvant tre utilise pour envoyer les erreurs dans un fichier, ou vers un service (i.e. syslog) et fonctionne en conjonction de la directive error_log cidessous. Lors de l'excution sous IIS, log_errors devrait tre active, avec une valeur valide de error_log. error_log = <chemin vers le fichier d'historisation des erreurs> - error_log doit spcifier le chemin absolu ou relatif vers un fichier o les erreurs PHP doivent tre crites. Le fichier doit tre accessible en criture par le serveur web. L'endroit commun de ce fichier est le dossier TEMP, par exemple, "C:\inetpub\temp\php-errors.log". cgi.force_redirect = 0 - Cette directive est ncessaire pour le fonctionnement sous IIS. Elle est relative la scurit et est ncessaire par bons nombres de serveurs web. Cependant, son activation sous IIS fera chouer le moteur PHP sous Windows. cgi.fix_pathinfo = 1 - Cette directive permet PHP d'accder aux informations concernant le chemin rel suivi par la spcification CGI. Cette directive est ncessaire lors de l'implmentation de FastCGI sous IIS. fastcgi.impersonate = 1 - FastCGI sous IIS supporte la possibilit de rendre impersonnels les lments relatifs la scurit lors d'un appel client. Ceci permet IIS de dfinir le contexte de scurit sur lequel la demande est effectue. fastcgi.logging = 0 - L'historisation FastCGI doit tre dsactiv sous IIS. S'il est activ, alors tous les messages de toutes les classes seront traits par FastCGI comme des conditions d'erreur, ce qui fera qu'IIS gnrera des exceptions HTTP 500.

Directives optionnelles

max_execution_time = ## - Cette directive demande PHP un maximum de temps afin d'excuter un script donn. Par dfaut, c'est 30 secondes.

Augmentez la valeur de cette direction si l'application PHP prend plus de temps s'excuter. memory_limit = ###M - La mmoire maximale disponible pour le processus PHP, en mga-octets. Par dfaut, c'est 128, ce qui est parfait pour la plupart des applications PHP. Pour des applications plus complexes, il peut tre ncessaire d'augmenter cette valeur. display_errors = Off - Cette directive indique PHP si les messages d'erreur doivent tre inclus dans le flux retourn au serveur web. Si dfini "On", alors PHP les enverra, suivants les classes d'erreur que vous avez dfinies avec la directive error_reporting, au serveur web comme partie du flux d'erreur. Pour des raisons de scurit, il est recommand de dfinir "Off" cette directive sur les serveurs de production afin de ne pas rvler les informations concernant la scurit, qui sont inclues dans les messages d'erreur. open_basedir = <chemins vers les dossiers, spars par un point virgule>, e.g. openbasedir="C:\inetpub\wwwroot;C:\inetpub\temp". Cette directive spcifie le chemin vers le dossier o PHP est autoris effectuer des oprations sur le systme de fichiers. Toute opration en dehors de ces chemins retournera une erreur. Cette directive est spcialement utile pour cantonner l'installation de PHP dans des environnements partags afin d'viter que les scripts PHP accdent tout fichier se trouvant en dehors du dossier racine du site web. upload_max_filesize = ###M et post_max_size = ###M - La taille maximale autorise, respectivement, d'un fichier tlcharg et des donnes de type POST. Les valeurs de ces directives devraient tre augmentes si les applications PHP doivent effectuer de gros tlchargements, comme des images ou des fichiers vidos.

PHP est maintenant configur pour votre systme. La prochaine tape est de choisir un serveur web et de la configurer pour y faire fonctionner PHP. Choisissez un serveur web depuis la table de contenus. En plus de faire fonctionner PHP via un serveur web, PHP peut tre excut depuis la ligne de commande, la faon des scripts .BAT. Reportez-vous au chapitre sur la ligne de commande PHP sous Microsoft Windows pour plus d'informations.

Microsoft IIS

Installeur Windows (PHP 5.2 et suivant)

[edit] Last updated: Fri, 16 Mar 2012

add a note User Contributed Notes tapes pour une installation manuelle

WindowsPHPuser at example dot com 25-Jan-2012 07:51


Regarding this: "On this page and the FAQ they point out that to reset the Windows PATH variable to include your php dir, you need to completely restart

the machine." Note that this is not the case in Windows 7. (I'm not sure about Vista).

v_moral at hotmail dot com 24-Feb-2011 04:13


Problems setting up PHP as an Apache module under Windows? To install php+apache+win32+mysql with PHP as an Apache module consider the following hints : - download the 'VC6 x86 Thread Safe' zip file from http://windows.php.net/download/ . Couldn't make the Non Thread Safe version to work as a loadable module from Apache. - if you set extension=php_mysql.dll and still have problems, copy the file libmysql.dll (shipped with php's zip) to your WINDOWS\System32\ directory. The apache-mysql module fails trying to find this library.

pragal86 at gmail dot com 02-Feb-2011 03:36


step 1 : clear port 80. ( my computer->manager ->services and application ->services ->iis ->disable ) step 2 : install Apache by exe. (check if green color is display near apache otherwise some problem in Apache installation). step 3 : Copy php folder and past it into 'c directory' . step 4 : Give class path = c:\php;c:\php\ext; (mycomputer->properties->advance->environmentalproperties->path = c:\php;c:\php\ext; ). step 5 : Open httpd.conf, that is located in Apache web server installation folder, under conf directory i.e., Apache Installation folder > conf > httpd.conf Add these lines.... LoadModule php5_module "c:/php/php5apache2_2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/php" Step 6: goto php installation directory, there u'll find a file named php-ini-recommended, rename it to, 'php.ini'.

Step 7: Now time to modify php-ini, file... open the file in notepad, look for extension=php_mysql.dll, uncomment it, i.e., delete ";" thats prefixed...also look for "extension_dir=" append "C:\php\ext" incase ur php installation directory is php else "C:\%installation dir%\ext" sterp 8 : find directory index in http.conf and add index.php with index.html Step 9: Copy libmysql.dll to c:\windows\system32 step 10 : run mysql exe to install it. step 11 : download phpmysql and place that in htdocs and rename it to phpmyadmin.s

check php and apache installation by give 'local host' in address bar in any browser, If 'Its work' is displayed then its installed correctly and check the green color in Apache. Php and apache installation is done ......:):)

jp at pulgadascubicas dot com 05-Dec-2010 12:43


Trying to install PHP 5.3.3 VC9 Non-Thread-Safe on Windows 2008 Server running IIS 7.5. Followed the instructions carefully but still got a 500 error trying to open the classig phpinfo page. After a lot of searching I discovered that everything worked fine after changing the php.ini directive fastcgi.logging from 0 to 1, contrary to what the directions said. I wonder if it was a typo on the instructions or if something changed after a few versions. Hope this saves someone a couple of hours of searching.

Anonymous 22-Apr-2010 08:07


It should be noted that even before starting PHP installation, you should research extension requirements for those you plan to use. For a list of common extensions and dll requirements and prerequisites, see the table on this php.net page: http://www.php.net/manual/en/install.windows.extensions.php Commonly used extensions are listed in alphabetical order in the default php.ini file that comes with the windows packages. Some extensions must be loaded before others or else the server may crash

with an unhelpful, seemingly unrelated dll error. For example, in your php.ini file, you must manually place 'extension=php_exif.dll' after- 'extension=php_mbstring.dll' if you wish to use the exif and mbstring extensions or else your server may crash. The msi installer may or may not automatically have correct load order, but for manual installs, it does not. Do not attempt to uncomment extension lines in the default php.ini file that comes packaged with php install or zip packages without knowing what you're doing. Before loading extensions in this manner, be sure you have met the prerequisites for load order and have ready any missing dll files listed in the above link.

rich at corephp dot co dot uk 02-Jul-2009 05:02


The part about adding the Path to the System Environment Variables is different on Vista. On XP you DO need to reboot for the Path change to be picked-up correctly. On Vista however you do not, the change is instant.

dkflbk at nm dot ru 19-Jun-2009 06:46


There is a way to install PHP with nginx-server under windows (current version is 0.7.60) Step-1 (install nginx server) Just extract nginx-0.7.60.zip in C:\nginx-0.7.60 In C:\nginx-0.7.60\conf\nginx.conf uncomment and edit following lines location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME C:/nginx0.7.60/html$fastcgi_script_name; #this is the one line for edition include fastcgi_params; } and run C:\nginx-0.7.60\nginx.exe (the server is started) Step-2 (install PHP5) Just extract php in C:\PHP5 Create (or modify) php.ini extension_dir="ext/" ;for extensions And run C:\PHP5\php-cgi.exe -b 127.0.0.1:9000

txyoji 17-Apr-2009 07:36


php 5.1.6 zip package for windows does not include a module for apache2.2.

Use apache2.0.x or 1.3.x instead.

dee at example dot com 04-Feb-2009 01:57


I did a clean install of Apache 2.2 and PHP 5.2.6 due to conflicts with the old httpd.conf file I had and ran into the "Call to undefined function mysql_connect()" error when trying to run a script that connects to MySQL. To resolve it I had to copy libmysql.dll from my PHP installation directory to the "bin" folder of my Apache install directory. I checked the forums.mysql.com as someone else suggested which lead me to this site with the missing step I needed (http://www.artfulsoftware.com/php_mysql_win.html). I spent a good part of the afternoon trying set this up. Hopefully it helps someone out.

chhabra_gurpreet at yahoo dot com 11-Jan-2009 11:34


Hi everyone, well i've been trying to configure, install, this setup i.e., Apache, php and mysql, well the prb wat i faced was that most of the installation instructions were quite outdated as they used quite old softwares... well these are the simple steps install and configure this entire setup, hope it will help u....(this is for windows) Software versions: Apache - 2.2.11 Mysql - 5.1.30-community Php - PHP Version 5.2.8 Step 1: Default installation of Apache Step 2: Default installation of mysql Step 3: Download php zip file, extract it to ur C: drive under c:\php Step 4: Add these paths to ur classpath, "C:\php", "C:\php\ext", incase ur installation directory is php, else watever is the name of ur php installation directory use that instead of php Step 5: Open httpd.conf, that is located in Apache web server installation folder, under conf directory i.e., Apache Installation folder > conf > httpd.conf Add these lines.... >LoadModule php5_module "c:/php/php5apache2_2.dll" >AddType application/x-httpd-php .php Step 6: goto php installation directory, there u'll find a file named php-ini-recommended, rename it to, php-ini. Step 7: Now time to modify php-ini, file... open the file in notepad, look for extension=php_mysql.dll, uncomment it, i.e., delete ";" thats prefixed...also look for "extension_dir=" append "C:\php\ext" incase ur php installation directory is php else "C:\%installation dir%\ext" Step 8: Copy libmysql.dll to c:\windows\system32 done.......... ;)

philmee95 at gmail dot com 27-Jul-2008 02:52


64 bit windows issues. PHP is 32 bit, and w3svc can only run under 32 or 64...not both. You will have to set 32 bit compat mode. http://www.iisadmin.co.uk/?p=14

supportatradiormidotcom 12-Mar-2008 04:44


Im running Win 2003 PHP 5 with the isapi.dll thanks to this sipmle tutorial hope it will help someone.Cerdit goes to Peterguy. http://www.peterguy.com/php/install_IIS6.html Follow the instructions, PHP install made easy

bill at onemeg dot com 19-Feb-2008 03:48


Your PHP.INI file is not required to be in the C:\WINDOWS folder in XP. The trick is to make sure that the PHP.INI can be found. If you fail to reboot after adding the PHP folder to the path and creating the PHPRC environment variable, the file will likely not be found. If you can't reboot, then try creating the registry entries as described in the following document: http://www.php.net/manual/en/configuration.php When you execute "phpinfo();" pay special attention to the data returned in "Loaded Configuration File". If it does not show a path and a the PHP.INI file name, the file is not being loaded. The path of C:\WINDOWS in the Configuration File Path section is the default location where PHP looks for the INI file and does not mean that the file must be located there; in fact, the following document suggest that you leave the configuration file in the C:\PHP folder: http://www.php.net/manual/en/install.windows.manual.php

ik2008 at sipvantage dot com 18-Jan-2008 12:34


In windows XP, the php.ini file must be in c:\windows directory. Or else most of the functions will work except mysql functions. The very first mysql command mysql_connect will fail with the following message "Call to unsupported or undefined function mysql_connect(); "

fgabrieli at gmail dot com 09-Jul-2007 08:55


Problem: Error in my_thread_global_end(): 1 threads didn't exit It seems that php 5.2.3 libmysql.dll does not work as expected, because Apache shows this error in the logs when we use mysql_*() functions Solution: I found it here:

http://forums.mysql.com/read.php?10,153077,155121#msg-155121 which is to replace 'libmysql.dll' file in your PHP installation directory (also in winnt/system32 if you copied it there) with the Dll from PHP 5.2.1 You can download the second one from here: http://www.php.net/get/php-5.2.1-Win32.zip/from/a/mirror Regards, Fernando Gabrieli

sam b 29-Jun-2007 01:53


I ran across the same problem listed below, using IIS6 instead of Apache on Windows Server 2003. It seemed that I could run a PHP script on the command line just fine, and lines such as: <? if(function_exists("mysql_connect")) echo "MySQL is present."; ?> ran without error, and printed as expected. Loading the file via IIS (using Firefox from my Ubuntu workstation), it wouldn't print anything, indicating that the MySQL extension hadn't been loaded. Fix: rename/delete all "libmysql.dll" except for the one in "C:\PHP\ext" or equivalent. ... Same fix as listed below, but I wanted to point out: it's relevant to IIS as well.

adozolj at yahoo dot com 28-Jun-2007 09:41


I got the 'Fatal Error: call to unindentified function mysql_connect()' and resolved it after many hours of troubleshooting. The problem has to do with the libmysql.dll file residing in multiple directories. It SHOULD only be in the php directory. So, erase the copy in mysql bin and the apache bin and restart apache. I hope this helps someone. if this doesn't help check out forums.mysql.com and search "Call to undefined function mysql_connect". (i got the solution to this problem from here)

Shivan at Freenet dot de 27-Jun-2007 01:57


I had the same problem on IIS6 with php 5.2.3, that I got a blank page and nothing more, but the phpinfo(); worked. The cause wasn't the not-set doc_root, but after enabling "show errors" I got an error message, that my script used more than 8 MB... ;) After enlarging memory it worked :))))

jussi dot korhonen at evtek dot fi 30-May-2007 04:27


With MySQL 5.0.41 & Apache/2.2.4 & PHP/5.2.2 on Windows XP SP2 php_mysql.dll failed to load. All configurations, including php extension dir and windows path seemed to be correct. After hours of tinkering, I found that my MySQL bin/-directory contained a libmysql.dll too. Because MySQL bin/-directory was before c:\php-directory in PATH, PHP tried to use MySQL version of libmysql.dll and failed miserably. By putting c:\php in PATH before MySQL everything worked like a charm!

andyfrazer at gorillasites dot com 24-May-2007 10:18


I was trying to start Apache 2.2.4 using PHP5.2.2 on Windows XP. When I added the following command to the Apache httpd.conf file: LoadModule php5_module "c:/php/php5apache2.dll" Apache would not start. When I removed that command, it started fine. Based on a suggestion in http://www.apachelounge.com/forum/viewtopic.php?t=570, I tried this instead: LoadModule php5_module "c:/php/php5apache2_2.dll" and it started up immediately. I wasted two evenings trying to get this work before I found the link to the ApacheLounge forum. I hope this helps someone else.

dr dot juanc at yahoo dot com 17-Apr-2007 07:18


Installing PHP5.2.1 in IIS 6.0 bring me some troubles too. First i need to use full tag to make it your php script works and second the IIS didn't want to load the extension in the ext folder. I cheked the configuration a couple of thousand of time and everything seen to be ok. I fixed up given read access in the "ext" folder to de "IUSER/PCNAME" user or to everyone/PCNAME user to the same folder. Just in case i did the same in the rest of the folder inside the php folder. I wish nobody loose an all day in the same thing, like me. excuse my english please

shane 20-Mar-2007 02:17


IIS Windows 2003 server. You have upgraded to PHP5 from PHP4. phpinfo- works fine. You cannot however communicate with mysql (for example) through phpMyAdmin as it

throws up an error stating it cannot load the mysqli extension and/or you get the 'bad handshake' warning. Solution: update your libmySQL.dll file in your system32 folder. This requires you to stop all internet services on your computer i.e IIS. Full details below. ############################# Background: my server is set up as follows: php files folder == C:\PHP I have configured my php.ini file opening up the required extensions etc I have mapped the necessary extension to IIS I have configured my website extension(s) I have mapped my windows path ';C\PHP;C\PHP\ext' I have registered my ini file I have tested my phpinfo() and it works I have installed phpMyAdmin and it refuses to work I have tried simple mysql connection scripts ...nada I have checked everything 50 times I am bald. Then I did this: ############################## 1) Copy 'libmySQL.dll' from C:\PHP (or the folder where you have loaded php into) 2) Open 'Windows\system32' folder. Do nothing at the moment, just have this window 'to hand'. 3)Open IIS manager snap in(control panel - administrative tools - IIS manager) Right click server name as shown below: - Internet Information Services - My Computer (local computer) - right click Select 'all tasks' then 'Restart IIS...' Use drop down then select 'stop internet services on XXXXX' and click 'OK' 4) Return to your 'Windows\system32' folder. Paste 'libmySQL.dll' (it is already in your clipboard from step 1). It will warn you about overwrite the current one. Select YES. 5) Return to IIS manager. Follow steps as in '3' above except now choose 'Restart Internet Services on XXX' (the default option), click OK.

############################# I hope this works for you.

hkhasgiwale at gmail dot com 05-Feb-2007 10:26


I wasted a lot of time trying to figure out the problem of not being able to display my 'test.php' demo script to work, the file lay in my IIS 5 " C:\inetpub\wwwroot" folder. The file contents of test.php were: <?php> phpinfo(); <?> Windows php installer version was 5.2.0 Problem lay in the minute dumb feature of windows explorer being used t change(rename) text file extension from 'test.txt' to 'test.php'. The resultant name looked by the IIS was still 'test.php.txt'. I used command line to change the filename to 'test.php' and it displayed in my browser. http://localhost/test.php, worked right away.

simon at dna dot co dot nz 23-Jan-2007 02:42


I have found a lot of references to run the below script to test whether PHP is running: <? phpinfo(); ?> Unfortunately this does not work with a php.ini based from php.ini.recommended as that has short tags turned off by default. Use full tags, as recommended anyway, otherwise you will just get a blank page. <?php phpinfo(); ?> This is probably real basic to php old timers but can easily catch us newbies.

Daniel 01-Dec-2006 09:11


Re: Manual Configuration, pathing errors in IIS and ISAPI setup Chris @ 11-Oct-2006 and phpmanual at pbb dot dds dot nl @ 07-Oct-2004 are both correct. Problem is not with PHP but with IIS (mine is v5.1).

Installed PHP into C:\Program Files\PHP, and set environment variable PATH to path as stated. When selecting the installation of php5isapi.dll via IIS Administrator, IIS would insert the path as: "C:\Program Files\PHP\php5isapi.dll" (note the quotes and space in directory name) All scripts ran and produced a HTTP 500 error. Replaced ISAPI path in IIS with: C:\PROGRA~1\PHP\php5isapi.dll (note the removal of the quotes and spaces, and the replacement of the path with 8.3 format names) All scripts ran w/o problems. Thanks to all! I hope someone can report if a similar problem exists with IIS6/7.

Chris 11-Oct-2006 07:58


RE: phpmanual at pbb dot dds dot nl @ 07-Oct-2004 11:29

You are correct. I just had the same issue; I was following the PHP installation instructions and some very helpful WIMP instructions. I was trying to keep things tidy by putting my PHP directory in C:\Program Files\PHP. I set the PATH variable, ISAPI filter config and extension in Application Configuration, but was getting the "Specified module could not be found" error. Changed the PHP directory to C:\PHP and reconfigured everything, did an iisreset, and it started working immediately. Good catch, and thank you!

mega-squall at caramail dot com 23-Jul-2006 02:19


Remember to enter FULL PATH in the extension_dir parameter in php.ini ! Using only "./ext/" or any relative path will have your PHP failing to load extensions when called by Apache. That's quite tricky 'cause extensions are working when PHP is used through command line ...

Jason Greene 04-May-2006 06:06


If you are running websites within an Application Pool (which is now the default for IIS6 under 2K3) you need to make sure that your PHP directory (e.g. C:\PHP) has read permissions for the user assigned to the Application Pool. 1. In the IIS snap-in, choose Application Pools

2. Right-click on DefaultAppPool (or other, if you have one defined) and choose Properties 3. Click the Identity tab 4. Make a note of the user name set as the security account for this application pool (e.g. "Network Service") 5. Browse to your PHP directory and grant that user read permissions for the entire directory. In my case, I had to add permissions for the user "NETWORK SERVICE" to get PHP scripts to work. Otherwise I received 401/403 authorization errors when trying to load them in a remote browser. Note also that first tried adding IUSR permissions to the PHP directory, but that had no effect.

Ben 06-Apr-2006 03:17


In the Note Titled "Windows Server 2003 (x64 bits) + IIS 6.0" in step 1 when adding your new .php extension, it will not work unless after you click on the "Home Directory" you make sure that your "Execute permissions:" are set to "Scripts Only". By default, on my machine, the permissions were set to "None" not allowing php to run. Also, for more security it might be wise to Add the new extension just to your default site instead of the whole Web Sites folder in IIS. This would only apply if you were hosting multiple sites and had a site you didn't want scripts to run on.

Tom 13-Feb-2006 09:54


On this page and the FAQ they point out that to reset the Windows PATH variable to include your php dir, you need to completely restart the machine. If you can't afford to do that (installing on a live server for example), you can use the setx.exe tool from the Windows Resource Kit (google it). Like so: c:\pathtoresourcekit> setx.exe PATH "%PATH%;c:\php" \m

Windows Server 2003 (x64 bits) + IIS 6.0 31-Jan-2006 03:16


1. Add new extension (.php) * Expand the local computer in the left pane * Right-click on "Web Sites" in the left pane, then click "Properties" in the menu that pops up * Flip top the "Home Directory" tab * Click "Configuration" * Flip to the "Mappings" tab * Click "Add..." * Enter the full path to php5isapi.dll in the "Executable"

textbox (Browse... to find it more easily if you need to) * Enter ".php" in the "Extension" textbox * Select radial button "Limit to", enter "GET,POST,HEAD" * Click "OK" all the way out 2. Verify php5isapi.dll is allowed You must verify that the versions of php5isapi.dll that you want to use are allowed. 2.1. In Internet Information Services (IIS) Manager, in the lefthand column, click the Web Services Extensions node and verify php5isapi.dll is allowed and all other Web Service Extensions are prohibited. 2.2. If the version of php5isapi.dll that you want to use does not appear in the list, follow the instructions to enable it and then repeat this procedure: Go into IIS Below all of the websites is a folder: Web Service Extensions In blue, to the lower left, is a choice: Add A New Web Service Extension Add PHP/PHP5ISAPI.dll Choose To ALLOW it. 2.3 If the version of php5isapi.dll you want to use appears on the list but is not allowed, right click the version of php5isapi.dll you want to allow and click Allow. 3. Configuring IIS for 32-Bit Emulation Mode (THIS IS MOST IMPORTANT!!!!) 3.1. If you are installing IIS on x64-based editions of Windows Server 2003 or Windows Server 2003 R2, IIS must be configured to run in 32 bit emulation mode. Perform the following procedure on each front-end Web server running an x64-based edition of Windows Server 2003. Configure Internet Information Services (IIS) for 32-bit mode 1. Click Start, and then click Run. 2. In the Open box, type cmd, and then click OK. 3. In the command prompt window, navigate to the %drive%:\Inetpub\Adminscripts folder, where %drive% is the drive in which Windows Server 2003 is installed. 4. In the Adminscripts folder, type the following command: cscript adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1 Note The value "1" for Enable32bitAppOnWin64 specifies 32-bit whereas the value "0" specifies 64-bit mode. Press ENTER. Type iisreset and then press ENTER. Close the command prompt window.

mode, 5. 6. 7.

8. Re-star System. Note The Run WWW service in IIS 5.0 isolation mode check box is only selected if you have upgraded to IIS 6.0 on Windows Server 2003 from IIS 5.0 on Windows 2000. New installations of IIS 6.0 use IIS 6.0 worker process isolation mode by default.

patatraboum at nospam dot com 26-Dec-2005 06:09


IIS + PHP - The browser can't find your php code like localhost/dir/dir_code.php from any virtual directory (404 error) - You are sure the code exists You may rename it with a .html extension and check if it displays - Process of your php code like localhost/root_code.php is ok from the root directory It may come from the doc_root directive in php.ini whitch should be set to blank : doc_root = Then restart IIS to reload php.ini

some dude @ some place 04-Nov-2005 08:57


on two recent installation attempts on iis6 on win2k3 i followed the php manual and windows configuration steps exactly and php would still not run. on the first install i had to give the USER account (not IUSR) read execute permissions to this file, c:\php\sapi\php4isapi.dll. using filemon i saw that it was being accessed and access was denied. steps: - right click on this file > properties > security > add > location (select the server -not domain if listed) > advanced > find now > Users (usually the last item) > click OK - select Read & Execute > apply also a complete computer restart was required in each install

Bill dot Rook at Gmail dot com 18-Sep-2005 10:09


doc_root = ".;c:\inetpub\wwwroot" does seem to work with virtual websites. This might be a better option then commenting out the line.

Jason 09-Sep-2005 04:54


For me atleast, the steps for installing php 5 on IIS 6 on windows 2003 seemed to get buried with the other setups. I found it difficult to quickly look through and make sure I covered every step. So I

created a clean step by step tutorial with screenshots: http://psdforums.com/article.php?a=9

atomictaco at atomic-taco dot com 10-Jul-2005 09:17


In response to phpmanual at pbb dot dds dot nl: You are absolutly correct. I found this out while trying to install PHP4 with Apache2 on XPPro. Here are 3 general guidelines that I have found to be correct: - Path may not have spaces. Change C:\Program Files to C:\Progra~1 If you don't understand this, go to start-->run->command (not cmd). Type cd\ and hit enter. Then type dir. You should see all your directory names there. - Paths should not be enclosed by quotes. - Use forward slashes (/) and not backslashes (\)

thierry dot bo at nxextxcxoxuxrxrxixexr dot com 20-Dec-2004 04:50


With PHP 4.3.x and apache 1.3.x on windows, PHPRC is used only if php is installed as cgi. With module, no matter using setenv in httpd.conf or PHPRC as windows environment variable, it is not used.

cpz at akik-ffm dot de 19-Dec-2004 10:24


In the above, "the web server's directory" means the directory where the server executable lives, for example for the Apache installation on my XP box this is "\program files\apache group\apache2\bin" and NOT just "\program files\apache group\apache2". But it's probably best to tell your web server where PHP's ini file is stored, for example via PHPIniDir for Apache's http.conf.

chuacheehow at gmail dot com 08-Oct-2004 05:55


My experience with IIS 5.1 is that the doc_root directive be commented in order for virtual directories to recognise PHP files (with PHP installed as CGI).

phpmanual at pbb dot dds dot nl 07-Oct-2004 06:29


Okay, I'm a total newbie to this, so my findings may be wrong, but this is what I found out. The manual says "do not have spaces in the path (like C:\Program Files\PHP) as some web servers will crash if you do". Indeed, when using this with PHP5 on WinXP, I got the error message "The specified module could not be found." However, the problem seems not to lie in the SPACE in the pathname, but in the QUOTES that Windows adds when a space is in the pathname! This is what I found:

"C:\Program Files\php5\php5isapi.dll" -- doesn't work C:\php5\php5isapi.dll -- works "C:\php5\php5isapi.dll" -- doesn't work C:\Progra~1\php5\php5isapi.dll -- works "C:\Progra~1\php5\php5isapi.dll" -- doesn't work C:\Program Files\php5\php5isapi.dll -- doesn't work, because it's not accepted by Internet Information Services I don't know if this all is a problem with Internet Information Services or with PHP, but it would be nice if it was more documented in the PHP manual.

php dot user dot com 29-Aug-2004 01:43


After having the same problem as specifed below with "No input file specified". I changed the doc_root as mentioned. This is fine if all php scripts are going to be run from the c:\inetpub\wwwroot directory. To enable it for multiple websites where the root directories are all different simply leave the doc_root attribute in the php.ini file blank. This is for the isapi version not cgi implementation. It also means you don't have to set IUSR or IWAM access to the PHP root directory.

Вам также может понравиться

  • Gestion Des Comptes Et Profils D'utilisateurs
    Gestion Des Comptes Et Profils D'utilisateurs
    Документ30 страниц
    Gestion Des Comptes Et Profils D'utilisateurs
    lydia_lamia
    Оценок пока нет
  • Boules de Neige
    Boules de Neige
    Документ1 страница
    Boules de Neige
    lydia_lamia
    Оценок пока нет
  • Confiture de Citrouille
    Confiture de Citrouille
    Документ2 страницы
    Confiture de Citrouille
    lydia_lamia
    Оценок пока нет
  • (Ebook - FR) - (Informatique) - Administrer Et Gerer Un Environement Microsoft Windows Serveur 2003
    (Ebook - FR) - (Informatique) - Administrer Et Gerer Un Environement Microsoft Windows Serveur 2003
    Документ0 страниц
    (Ebook - FR) - (Informatique) - Administrer Et Gerer Un Environement Microsoft Windows Serveur 2003
    ابراهيم لطرش
    Оценок пока нет
  • PHP PDF
    PHP PDF
    Документ129 страниц
    PHP PDF
    djaho guillaume
    Оценок пока нет
  • Barquettes À La Confiture de Fraises
    Barquettes À La Confiture de Fraises
    Документ1 страница
    Barquettes À La Confiture de Fraises
    lydia_lamia
    Оценок пока нет
  • Biscuits A La Confiture
    Biscuits A La Confiture
    Документ23 страницы
    Biscuits A La Confiture
    lydia_lamia
    Оценок пока нет
  • Configuration Reseau
    Configuration Reseau
    Документ6 страниц
    Configuration Reseau
    lydia_lamia
    Оценок пока нет
  • Web (IIS 7.0)
    Web (IIS 7.0)
    Документ51 страница
    Web (IIS 7.0)
    lydia_lamia
    Оценок пока нет
  • DHCP
    DHCP
    Документ2 страницы
    DHCP
    lydia_lamia
    Оценок пока нет
  • FTP
    FTP
    Документ7 страниц
    FTP
    lydia_lamia
    Оценок пока нет
  • Utilisation PHP
    Utilisation PHP
    Документ44 страницы
    Utilisation PHP
    lydia_lamia
    Оценок пока нет
  • Securiser Apache
    Securiser Apache
    Документ14 страниц
    Securiser Apache
    lydia_lamia
    Оценок пока нет
  • Utilisation PHP Avancee
    Utilisation PHP Avancee
    Документ24 страницы
    Utilisation PHP Avancee
    lydia_lamia
    Оценок пока нет
  • Utilisation PHP Mysql
    Utilisation PHP Mysql
    Документ15 страниц
    Utilisation PHP Mysql
    lydia_lamia
    Оценок пока нет
  • Examen 4 CCNA2
    Examen 4 CCNA2
    Документ5 страниц
    Examen 4 CCNA2
    lydia_lamia
    Оценок пока нет
  • Augmenter La Vitesse de Chargement de Votre Site Joomla.
    Augmenter La Vitesse de Chargement de Votre Site Joomla.
    Документ7 страниц
    Augmenter La Vitesse de Chargement de Votre Site Joomla.
    lydia_lamia
    Оценок пока нет
  • ERouting Chapter 2
    ERouting Chapter 2
    Документ7 страниц
    ERouting Chapter 2
    عبد العظيم أحمد محمد
    Оценок пока нет
  • Formulaires PHP
    Formulaires PHP
    Документ22 страницы
    Formulaires PHP
    lydia_lamia
    Оценок пока нет
  • CCNA 2 Module Final A v4
    CCNA 2 Module Final A v4
    Документ30 страниц
    CCNA 2 Module Final A v4
    kajolitta
    Оценок пока нет
  • Guide Demarrage Web Entrepreneur
    Guide Demarrage Web Entrepreneur
    Документ11 страниц
    Guide Demarrage Web Entrepreneur
    lydia_lamia
    Оценок пока нет
  • Examen 3 CCNA2
    Examen 3 CCNA2
    Документ5 страниц
    Examen 3 CCNA2
    lydia_lamia
    Оценок пока нет
  • ERouting Chapter 8
    ERouting Chapter 8
    Документ6 страниц
    ERouting Chapter 8
    عبد العظيم أحمد محمد
    Оценок пока нет
  • ERouting Chapter 5
    ERouting Chapter 5
    Документ8 страниц
    ERouting Chapter 5
    عبد العظيم أحمد محمد
    Оценок пока нет
  • ERouting Chapter 6
    ERouting Chapter 6
    Документ6 страниц
    ERouting Chapter 6
    عبد العظيم أحمد محمد
    Оценок пока нет
  • ERouting Chapter 7
    ERouting Chapter 7
    Документ6 страниц
    ERouting Chapter 7
    عبد العظيم أحمد محمد
    Оценок пока нет
  • ERouting Chapter 10
    ERouting Chapter 10
    Документ5 страниц
    ERouting Chapter 10
    عبد العظيم أحمد محمد
    Оценок пока нет
  • Examen 9 CCNA2
    Examen 9 CCNA2
    Документ6 страниц
    Examen 9 CCNA2
    lydia_lamia
    Оценок пока нет
  • Module 11
    Module 11
    Документ9 страниц
    Module 11
    Bader-eddine Hakmaoui
    Оценок пока нет
  • Le Noyau Linux
    Le Noyau Linux
    Документ9 страниц
    Le Noyau Linux
    ZAIDAN DIDI
    Оценок пока нет
  • Les Commandes de Base Pour Aix
    Les Commandes de Base Pour Aix
    Документ4 страницы
    Les Commandes de Base Pour Aix
    Fouad Barout
    Оценок пока нет
  • Chapitre 3-1
    Chapitre 3-1
    Документ22 страницы
    Chapitre 3-1
    simon ODOH
    Оценок пока нет
  • Logical Volume Management (LVM) : Serveur Linux Centos
    Logical Volume Management (LVM) : Serveur Linux Centos
    Документ26 страниц
    Logical Volume Management (LVM) : Serveur Linux Centos
    ChristopheProust
    Оценок пока нет
  • Notesmemo Unix
    Notesmemo Unix
    Документ48 страниц
    Notesmemo Unix
    Hanar Sabt
    Оценок пока нет
  • Gestion Des Processus
    Gestion Des Processus
    Документ159 страниц
    Gestion Des Processus
    Safae Belkhyr
    100% (1)
  • Mini VNAs
    Mini VNAs
    Документ27 страниц
    Mini VNAs
    Venu Gopal Rao Aggress
    Оценок пока нет
  • TD3 Semaphores
    TD3 Semaphores
    Документ5 страниц
    TD3 Semaphores
    meezto1
    Оценок пока нет
  • Erreurs Bios
    Erreurs Bios
    Документ152 страницы
    Erreurs Bios
    falx999
    Оценок пока нет
  • Commande Shell
    Commande Shell
    Документ1 страница
    Commande Shell
    Kawtar Moukhaliss
    Оценок пока нет
  • CBD TP
    CBD TP
    Документ6 страниц
    CBD TP
    zemer
    Оценок пока нет
  • MacWay Tour CDDVD
    MacWay Tour CDDVD
    Документ7 страниц
    MacWay Tour CDDVD
    alcyon74
    Оценок пока нет
  • 02 - Installation Des Logiciels Sous Linux
    02 - Installation Des Logiciels Sous Linux
    Документ23 страницы
    02 - Installation Des Logiciels Sous Linux
    Diaby Bakary
    Оценок пока нет
  • TP 3 Hive v0.1
    TP 3 Hive v0.1
    Документ5 страниц
    TP 3 Hive v0.1
    rad
    Оценок пока нет
  • Présentation Et Découverte de GNU-Linux
    Présentation Et Découverte de GNU-Linux
    Документ22 страницы
    Présentation Et Découverte de GNU-Linux
    Kécouta Sow
    Оценок пока нет
  • Liste CMD
    Liste CMD
    Документ3 страницы
    Liste CMD
    kassimi
    Оценок пока нет
  • Projet Ordonnancement Des Tâches Avec Arduino
    Projet Ordonnancement Des Tâches Avec Arduino
    Документ9 страниц
    Projet Ordonnancement Des Tâches Avec Arduino
    alin
    Оценок пока нет
  • P8P67-P8H67 Series BIOS Update FR
    P8P67-P8H67 Series BIOS Update FR
    Документ1 страница
    P8P67-P8H67 Series BIOS Update FR
    nico59_2
    Оценок пока нет
  • Gestion Des Transactions
    Gestion Des Transactions
    Документ11 страниц
    Gestion Des Transactions
    zaki nygma
    Оценок пока нет
  • Polycopie Shell
    Polycopie Shell
    Документ14 страниц
    Polycopie Shell
    david Abotsitse
    Оценок пока нет
  • VT Admin Guide
    VT Admin Guide
    Документ65 страниц
    VT Admin Guide
    Vincent Bun
    100% (1)
  • Shell Programming
    Shell Programming
    Документ123 страницы
    Shell Programming
    Végéta
    Оценок пока нет
  • Chapitre 2 SGF Isamm
    Chapitre 2 SGF Isamm
    Документ15 страниц
    Chapitre 2 SGF Isamm
    sarra jouini
    Оценок пока нет
  • Mise en Place Wds
    Mise en Place Wds
    Документ35 страниц
    Mise en Place Wds
    api-358371123
    Оценок пока нет
  • Manipulations Sur HDFS
    Manipulations Sur HDFS
    Документ2 страницы
    Manipulations Sur HDFS
    hiba
    Оценок пока нет
  • Document 6
    Document 6
    Документ4 страницы
    Document 6
    Othman Moujab
    Оценок пока нет
  • 06-07 Gestion Avancee Fichiers Unix
    06-07 Gestion Avancee Fichiers Unix
    Документ8 страниц
    06-07 Gestion Avancee Fichiers Unix
    Jihen Khalfallah
    Оценок пока нет
  • All NEW 4.6a
    All NEW 4.6a
    Документ283 страницы
    All NEW 4.6a
    aplatoon
    Оценок пока нет
  • Comparatif de Différents Logiciels de Compression
    Comparatif de Différents Logiciels de Compression
    Документ5 страниц
    Comparatif de Différents Logiciels de Compression
    rabesa
    Оценок пока нет
  • Rapport TP 3
    Rapport TP 3
    Документ2 страницы
    Rapport TP 3
    zaki
    100% (1)