Hi,
I managet to get it working per virtual host with this wrapper (I also came up to the idea that it has to be chowned to root/wheel
):
Code:
#!/bin/sh
user=`whoami`
export PHPRC=/home/$user/public_html
exec /usr/local/cpanel/cgi-sys/php5bin
I reworked your wrapper to look like this:
Code:
#!/bin/bash
# This will fake the name & path and hide the /usr/local/cpanel/cgi-sys/php5 path!
export PWD=$DOCUMENT_ROOT
export PHPRC=`dirname $PATH_TRANSLATED`/php.ini
exec /usr/local/cpanel/cgi-sys/php5bin
The PWD has to be exported to hide the path.
I prefer to use the PHPRC, because it will just look in the specified directory for php.ini, because with the '-c' you have to first check does the files exists (as you do in your example).