Hi,
I was out of the house for two days ... do you still have this issue ? There was an error in my last post ... I meant AddHandler in httpd.conf ... not php.ini, sorry 🙂
I tested the following configuration on Windows and it worked without any problems.
Here are the steps required (on my system, including support for MySQL, using the zipped PHP package ... not the installer version,PHP as Apache 2 module, html files parsed as PHP code):
- clean up httpd.conf => make sure that there are no configuration directives related to PHP
- copy php5ts.dll to system32
- copy libmysql.dll to system32
- copy additional dlls from the PHP root directory (e.g. c:\php5) to system32 if you want to use PHP modules that depend on that dlls.
- make sure you have a valid php.ini in your windows directory
- Add a LoadModule directive to httpd.conf, e.g.
LoadModule php5_module "C:/php5/php5apache2.dll"
- Add the AddType directive(s), like e.g.
AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps
- Edit php.ini:
a) Adjust the extension_dir to e.g.
extension_dir=C:\php5\ext\
b) enable the MySQL extension
extension=php_mysql.dll
- Restart apache
This way it worked on my Windows server: Do not any Action or AddHandler directives for PHP. Make sure that you add the AddType directives somewhere in the global scope of httpd.conf, outside any Directory directive or something like that.
Thomas