I'm now so confused with how files should be parsed as PHP with
AddHandler in different environments.
Windows 7 / Apache2.2 / PHP 5.2 (
AddHandler x-httpd-php .php # does not work AddHandler x-httpd-php52 .php # does not work AddHandler application/x-httpd-php .php # works
And I just upgraded PHP to 5.3 (switched to
non thread safe)
AddHandler x-httpd-php .php # does not work AddHandler x-httpd-php53 .php # does not work AddHandler application/x-httpd-php .php # does not work <-- works on 5.2 AddHandler php5-script .php # does not work # AddHandler... and I'v tried some of others, none of them works
CentOS / Apache2.2 / PHP 5.3
AddHandler x-httpd-php .php # does not work AddHandler x-httpd-php53 .php # works AddHandler application/x-httpd-php .php # does not work (works prior to 5.2)
AddHandler application/x-httpd-php .phpno longer works on my local server when I updrage PHP to 5.3 non-thread-safe? Are there any other extra work I need to do?
other types of formatbe used? Are these OS / Apache version / PHP version / PHP type dependent?
OK, I'm gonna answer the first question of my own
Running PHP as an Apache Module
# httpd.conf PHPIniDir "C:/PHP" LoadModule php5_module "C:/PHP/php5apache2_2.dll" AddType application/x-httpd-php .php
Running PHP as CGI binary
# httpd.conf ScriptAlias /PHP/ "C:/PHP/" Action application/x-httpd-php "/PHP/php-cgi.exe" AddType application/x-httpd-php .php <Directory "C:/PHP"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
I'm still waiting for someone to explain the second question.