View Single Post
Old 6th September 2011, 17:35
counterpoint counterpoint is offline
Junior Member
Join Date: Jan 2010
Posts: 21
Thanks: 1
Thanked 5 Times in 5 Posts

Thanks very much for this helpful script. I ran into a few small issues along the way, and also found it useful to adapt the final result to suit How To Set Up Apache2 With mod_fcgid And PHP5 On Debian Lenny (which also works fine for Squeeze). I already have a script for creating new sites in that environment.

First I found the script wouldn't run, because the target system still had the Squeeze default of the dash shell. That can be changed to defaulting to bash by running:
dpkg-reconfigure dash
and choosing the "no" option. Alternatively, change the shebang on the first line to specifically select bash:
Then the system did not return anything with 64 in it from uname, so the selection of 32 bit or 64 bit compile was going wrong. For that I simply hacked the script to:
# Override choice of 64 bit
#CHECK=`uname -a | grep 'amd64'`
to choose 64 bit.

It also transpired that make was not installed in the target system. That can be checked by:
aptitude search make
and if necessary installed with
aptitude install make
If the result is to be used in conjunction with a system created using the "how to" mentioned above, then individual web sites can be set up exactly as in the "how to" except that the php-fcgi-starter file is changed to:
export PHPRC
exec /usr/bin/php52/php-cgi
(although I actually use different values for the configuration parameters)
Reply With Quote