I recently created a site that had to be deployed on a GoDaddy server and it took a little playing around with the configuration before I could achieve what I wanted to do.
My main goal was to parse my .html and .php files using PHP5 as well as assigning a value to auto_prepend_file to my prepend file so I didn't have to include it on every page explicitly.
It's simple once you know, but here is how you achieve the two. Hopefully this helps at least one person out.
Godaddy, parse files as PHP
In the root of your site create an .htaccess file. Mine simply contained:
AddType application/x-httpd-php5 .htm .html .php AddHandler x-httpd-php5 .htm .html .php
As you guessed this tells apache to parse .htm, .html, and .php files using PHP5.
Normally I'd include my php settings as PHP_Flag or PHP_Value in my .htaccess file, but godaddy does not allow this. So you need to do this.
Godaddy PHP5 INI settings
Create a file named php5.ini <--- Notice it's php5.ini not just php.ini
auto_prepend_file = /home/content/my/path/to/home/html/includes/prepend.php
You can include your other PHP ini settings in there, however that's all I needed.

One comment to "GoDaddy PHP5 .htaccess and PHP INI settings"
Leave a Comment