Installazione di Apache 2.2 e PHP 5 su Windows

From RVM Wiki
Jump to navigation Jump to search
  • Installare Apache 2.2.x

http://mirror.tomato.it/apache/httpd/binaries/win32/apache_2.2.14-win32-x86-openssl-0.9.8k.msi

  • Testarlo
  • Scaricare PHP 5.2.x (la thread safe, la non thread safe serve per IIS)

http://windows.php.net/downloads/releases/archives/php-5.2.10-Win32-VC6-x86.zip

  • Scompattare in C:\php-5
  • Configurare apache per PHP
httpd.conf
...
DocumentRoot "e:/www"
...
LoadModule php5_module "c:/php-5/php5apache2_2.dll"
PHPIniDir "C:/php-5"
...
<IfModule mime_module>
    ...
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    ...
</IfModule>
...
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>
...
Include conf/conf.d/*.conf
Include e:/svn/apache-config/*.conf
Include e:/trac/apache-config/*.conf
  • Creare la dir per le config da includere:

mkdir "c:\Program Files\Apache Software Foundation\Apache2.2\conf\conf.d"


  • Copiare la DLL di PHP in %WINDIR%
copy c:\php-5\php5ts.dll %WINDIR%
  • Sistemare php.ini
c:
cd \php-5
copy  php.ini-recommended php.ini 
  • Editarlo:
...
extension_dir = "c:\php-5\ext"
...
extension=php_mbstring.dll
extension=php_mcrypt.dll
...
extension=php_mysql.dll
extension=php_mysqli.dll
  • Riavviare apache
net stop apache2.2 && net start apache2.2
  • Testare phpinfo.php

Riferimenti