Have a situation where I can't get my control panel (and I have full control of the server) to allow my PHP to loosen it's grip on the open_basedir no matter what I do, and I've followed all the control panel vendors instructions, no dice, they're baffled as well.
Yes, safe mode is disabled and with the other changes made, it still defaults open_basedir to:
/var/www/vhosts/example.com/httpdocs:/tmp
Ideally, what I wanted was a structure like this:
/var/www/vhosts/example.com/httpdocs
/var/www/vhosts/example.com/privatedata
Where the PHP code could run in httpdocs and read/write to privatedata which is outside the scope of the web server but still within the confines of a jailed FTP account, etc.
The only solution I've found so far, which appears to be about as secure as it gets without working around the open_basedir issue, is use a public directory and deny access from all via .htaccess
Ended up with a structure like this:
/var/www/vhosts/example.com/httpdocs
/var/www/vhosts/example.com/httpdocs/privatedata
And placed the following .htaccess file in /httpdocs/privatedata:
deny from all
PHP can still read and write /httpdocs/privatedata just fine but the web server can't touch it whatsoever from the outside world via the .htaccess deny all.
Seems a bit of a kluge, has anyone else ever run into this situation and found a more elegant solution or is this as good as it gets in a control panel environment?