I'm working on a mac running OS X Lion and PHP 5.3.6 and have tried both AddType, AddHander, and AllowOverride has been set to ALL in the httpd.conf; however, the PHP codes in HTML/JS/CSS files are still parsed as text. Files ending with .php are all good. I'm now getting really desperate after hours of googling.
Here are the contents of my .htaccess file:
AddType application/x-httpd-php5 .html .js .css
AddType application/x-httpd-php .html .js .css
AddHandler application/x-httpd-php5 .html .js .css
AddHandler application/x-httpd-php.html .js .css
If your site is stored in your user's Sites folder (i.e. /Users/username/Sites/) then you also need to set AllowOveride in the user-specific configuration file in /etc/apache2/users/username.conf. After making the change restart apache by disabling and re-enabling Web Sharing in the Sharing preference pane.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With