Using php5-fcgi
I suppose one of the things that was hacking me off about php5-fcgi was that it was ignoring the .htaccess file (rightfully so) and required a bit of tweaking of a custom php.ini for the php fastcgi to utilise so that one would get certain settings going prior to utilising my normal auto-prepend file.
For the past few weeks I've had to have quite a bit of stuff towards the top of my php scripts:
<?php
if ($_SERVER['SERVER_ADDR'] == 'XXX.XXX.XXX.XXX') {
ini_set ('include_path', '*snip*');
ini_set ('magic_quotes_gpc', 'off');
ini_set ('magic_quotes_runtime', 'off');
ini_set ('register_globals', 'off');
ini_set ('display_errors', 'on');
ini_set ('display_startup_errors', 'on');
require_once 'powertrip-prepend.php';
}
Using the custom php.ini for the php5-fcgi one can manually edit the custom php.ini and set various settings which you would have normally have set in your .htaccess or httpd.conf depending on your environment.
Anyway I changed the line from:
PHPRC="/usr/local/etc"
to
PHPRC="/home/jacques/etc/php5"
which sorted out a couple of "issues" I was having. I have in the past always prefered using the apache configuration file for storing various settings for the virtual host including php specific settings.