Upgraded PHP today and had all sorts of issues getting it to work with Apche again.
The main one being “Cannot load C:/php/php5apache2.dll into server”
- download PHP 5.x from PHP.net you want this file: php-5.x.xx-Win32.zip (where x relates to the latest stable version number)
- Extract the contents of this file and move the contents to where you intend to use PHP such as C:\phpNavigate to the PHP folder and edit the php.ini-recommended. FIND the extension_dir directive and change so that it properly locates the EXT folder:
extension_dir = “C:\php\ext”
NOTE the backslashes
Save the file as php.ini - Edit the PATH ENVIRONMENT (System Properties | Advanced | Environment Variables | System variables | Path or hold the Win key and press Pause key) to add the path to the php install folder:
Example:
Variable value: C:\php5;%SystemRoot%\system32;…..
- Finally, this should be the last step, edit the Apache CONF file (httpd.conf) with:LoadModule php5_module “c:/php/php5apache2_2.dll”
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir “c:/phpNOTE the forward slashes
NOTE we are referencing php5apache2_2.dll:
COMMENTS: NONE YET FOR THIS POST
POSTED BY admin ON July 29th, 2009. PERMALINK