I'm trying to do this too, and I don't want to install suphp or any other module if at all possible. The core of the problem seems to be that PHP doesn't look for php.ini files in the 'current working directory' as it' suppused to. A php.ini file in the same directory as the executing script isn't picked up.
I've done some research and it seems that because Plesk arranges things so that php-cgi is called via a wrapper script, PHP thinks the 'current directory' is the wrapper directory when it is invoked. phpinfo shows the wrapper directory as the ENV variable for PWD. Yet if you make a .php file just shell execute and display the PWD it shows that .php script file's directory. So by the time the .php script is actually running, it knows the correct current directory - it's just during invocation when php-cgi is looking for a php.ini that it's confused.
Now if the wrapper file was doing something obviously useful (initialising stuff or setting env vars etc) I could see why it would be a problem bypassing it. But all it seems to do is exec the php-cgi binary. I know I could just edit the wrapper to set a PHPRC path or use a -c option on the php-cgi call. But that would hard code that php.ini for all domains (effectively the same as I have now!)
What I'd like to do is set the apache conf file(s) to point to the php-cgi directly, rather than the wrapper. That way I hope php-cgi will look in my script's directory (on whichever vhost it resides) for a php.ini file. Anyone know which files to edit and how? I've tried some obvious ones - changing the 'path to wrapper' to /usr/bin/php-cgi in the php-cgi.conf file. But didn't seem to work. Also found a path to the wrapper script in zz0_blah plesk apache conf file. But that one has dire warnings about editing it. So I didn't, and came here instead!
Can anoyone point me in the right directiom here? Really want to avoid suphp etc. This should be a simple fix, surely.
Many thanks,
Rich