I had a bit of time on the weekend and I thought I'd give hybinet's script a run on Debian Lenny.
First thing that came up was I didn't have permission to access
/fcgi-bin/wrapper/test.php on the server. After a day and a bit, I found I had to change the following bit of code from this:
Code:
<Location /fcgi-bin/>
SetHandler fcgid-script
Options +ExecCGI
</Location>
to this:
Code:
<Location /fcgi-bin/>
SetHandler fcgid-script
Options +ExecCGI
Order allow,deny
Allow from all
</Location>
I don't know why it didn't work. No one else in this tread reported a problem with not having the Order and Allow. (might just be my server setup or a Lenny thing)
Next it spat errors in suexec.log. Something about terminating. Tracked that one down to the spaces in front of the wrapper text in the build script:
Code:
cat > $dirn/cgi-bin/php5-fcgi-wrapper/wrapper <<- _EOF1_
#!/bin/sh
export PHPRC=$dirn/conf
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=5000
exec /usr/bin/php5-cgi
_EOF1_
Changing the script to this fixed it:
Code:
cat > $dirn/cgi-bin/php5-fcgi-wrapper/wrapper <<- _EOF1_
#!/bin/sh
export PHPRC=$dirn/conf
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=5000
exec /usr/bin/php5-cgi
_EOF1_
The last thing that turned up was:
Code:
/etc/init.d/apache2 reload
needed to be:
Code:
/etc/init.d/apache2 restart
Really nice script now that I have it working.
If anyone knows the answer to why I found what I did when no one else did, let me know.