pear, plesk, and open_basedir

Support/Development for PHP
premierhosting
Forum Regular
Forum Regular
Posts: 257
Joined: Wed Aug 04, 2010 2:52 pm

pear, plesk, and open_basedir

Unread post by premierhosting »

Hi Guys,

I've been banging my head against a wall for hours and can't seem to get over this hurdle.

PEAR dumps into /usr/share/pear. Plesk's locked down secure PHP seems to make it very difficult to open up the "open_basedir" restriction.

I've tried the vhost.conf like this:
<Directory "/var/www/vhosts/xxxxxx.com/subdomain">
php_admin_value open_basedir "/var/www/vhosts/xxxxxx.com/subdomain:/usr/share/pear:/tmp"
php_admin_value include_path ".:/usr/share/pear"
</Directory>


And like this:

<Directory "/var/www/vhosts/xxxxxx.com/subdomain">
php_admin_flag safe_mode 0
php_admin_value open_basedir "/var/www/vhosts/xxxxxx.com/subdomain:/usr/share/pear:/tmp"
php_admin_value include_path ".:/usr/share/pear"
</Directory>

I've done these type of commands lots of times after every edit:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=xxxxxx.com
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=subdomain.xxxxxx.com

Any thoughts or suggestions? Anyone successfully using PEAR with Plesk?
paulie
Forum User
Forum User
Posts: 76
Joined: Tue Apr 20, 2010 2:49 am

Re: pear, plesk, and open_basedir

Unread post by paulie »

I think you need to use :

<Directory "/var/www/vhosts/xxxxxx.com/subdomains/subdomain_name/httpdocs">

(Ie Add httpdocs and flesh out the path), otherwise you're not overloading the original directives in the httpd.include .
premierhosting
Forum Regular
Forum Regular
Posts: 257
Joined: Wed Aug 04, 2010 2:52 pm

Re: pear, plesk, and open_basedir

Unread post by premierhosting »

subdomains don't go in httpdocs. /var/www/vhosts/domain.com/sub/ <-- that is where you dump your docs.
paulie
Forum User
Forum User
Posts: 76
Joined: Tue Apr 20, 2010 2:49 am

Re: pear, plesk, and open_basedir

Unread post by paulie »

This is Plesk 10?

2 secs....

Ok, I can see how that works... where are you putting your vhost.conf? In /var/www/vhosts/domain/conf/ or in /var/www/vhosts/domain/subdomains/sub/conf/ ?

Ironically in Plesk 10 you can put your httpdocs equivalent for the subdomain where you like, but the vhost.conf needs to go where it always used to.

I've successfully added pear to the include path using the subdomains/sub/conf/vhost.conf and a websrvmng -v -a . Same principles should apply for the open_basedir.
premierhosting
Forum Regular
Forum Regular
Posts: 257
Joined: Wed Aug 04, 2010 2:52 pm

Re: pear, plesk, and open_basedir

Unread post by premierhosting »

/var/www/vhosts/domain/subdomains/sub/conf/

Did not know that existed. :) Will try this and respond.
premierhosting
Forum Regular
Forum Regular
Posts: 257
Joined: Wed Aug 04, 2010 2:52 pm

Re: pear, plesk, and open_basedir

Unread post by premierhosting »

Bingo. Gracias paulie.
Post Reply