Usuário com melhor resposta
PHP 5.2.5 no IIS 6.0

Pergunta
-
Caríssimos!!!
Instalei o PHP 5.2.5 no IIS 6.0., permiti a interpretação da extensão .php mas NÃO configurei o php.ini, sequer renomei-o (mantive os originais php.ini-dist e php.ini-recommended), ou seja, sequer existe um php.ini na minha máquina, ainda assim, o IIS conseguiu interpretar os arquivos .php .
Fiz um teste simples (echo "Hello World") e funcionou perfeirtamente.
Agora tento modificar alguns parâmetros do php.ini mas as modificações não se aplicam (já reiniciei o IIS, já reinicie o Windows,...).
Alguém já passou por esse problema? Como resolvê-lo?Agradeço desde já,
Respostas
-
Solucionei o problema lendo o install.txt que vem no pacote .zip do php 5.2.5 que, resumidamente, diz o seguinte:
General considerations for all installations of PHP with IIS or PWS:-Modify the Windows PATH environment variable to include the PHP directory
-Be sure the extension_dir and doc_root PHP directives are appropriately set in php.ini. These directives depend on the system that PHP is being installed on. In PHP 4, the extension_dir is extensions while with PHP 5 it's ext. So, an example PHP 5 extensions_dir value is "c:\php\ext" and an example IIS doc_root value is "c:\Inetpub\wwwroot
Usando como ISAPI Module:
- Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
Change the Execute Permissions to 'Scripts only'
Click on the 'Configuration' button, and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate ISAPI DLL. An example PHP 5 value is: C:\php\php5isapi.dll Supply .php as the extension. Leave 'Method exclusions' blank, and check the 'Script engine' checkbox. Now,click OK a few times.With IIS 6 (2003 Server)
open up the IIS Manager, go to Web Service Extensions, choose "Add a new Web service extension", enter in a name such as PHP, choose the Add button and for the value browse to either the ISAPI file (php4isapi.dll or php5isapi.dll) then check "Set extension status to Allowed" and click OK
OBS1: O php.ini fica em c:\Windows.
OBS2: Para ter certeza que o php.ini está sendo referenciado pelo IIS, veja no phpinfo(), em Loaded Configuration File, se o valor é c:\windows\php.ini.
Restou somente a seguinte dúvida:
Instalar o PHP como módulo ISAPI (apontar o IIS para php5isapi.dll) ou como CGI (apontar o IIS para php-cgi.exe)?
- Marcado como Resposta Erick AlbuquerqueModerator quinta-feira, 28 de abril de 2011 16:24
Todas as Respostas
-
Marcos,
Como você instalou? Você usou o MSI ou o pacote ZIP?
No meu blog ensino como configurar.
http://pabloweyne.spaces.live.com/blog/cns!B84EED969836338!217.entry -
-
-
-
-
-
Solucionei o problema lendo o install.txt que vem no pacote .zip do php 5.2.5 que, resumidamente, diz o seguinte:
General considerations for all installations of PHP with IIS or PWS:-Modify the Windows PATH environment variable to include the PHP directory
-Be sure the extension_dir and doc_root PHP directives are appropriately set in php.ini. These directives depend on the system that PHP is being installed on. In PHP 4, the extension_dir is extensions while with PHP 5 it's ext. So, an example PHP 5 extensions_dir value is "c:\php\ext" and an example IIS doc_root value is "c:\Inetpub\wwwroot
Usando como ISAPI Module:
- Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
Change the Execute Permissions to 'Scripts only'
Click on the 'Configuration' button, and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate ISAPI DLL. An example PHP 5 value is: C:\php\php5isapi.dll Supply .php as the extension. Leave 'Method exclusions' blank, and check the 'Script engine' checkbox. Now,click OK a few times.With IIS 6 (2003 Server)
open up the IIS Manager, go to Web Service Extensions, choose "Add a new Web service extension", enter in a name such as PHP, choose the Add button and for the value browse to either the ISAPI file (php4isapi.dll or php5isapi.dll) then check "Set extension status to Allowed" and click OK
OBS1: O php.ini fica em c:\Windows.
OBS2: Para ter certeza que o php.ini está sendo referenciado pelo IIS, veja no phpinfo(), em Loaded Configuration File, se o valor é c:\windows\php.ini.
Restou somente a seguinte dúvida:
Instalar o PHP como módulo ISAPI (apontar o IIS para php5isapi.dll) ou como CGI (apontar o IIS para php-cgi.exe)?
- Marcado como Resposta Erick AlbuquerqueModerator quinta-feira, 28 de abril de 2011 16:24
-