Forum Moderators: coopster
In order to install Magento i need to prepare my server a little, especially installing required php extensions.
To do so i've decided to use pear in order to install pecl.
My dedicated server (kimsufi/ovh) is running plesk, i've been looking for information since a couple of hours and here is what i found and did.
creation of a vhost.conf file inside /var/www/vhosts/example.com/conf
the vhost.conf file contains the following directive:
<Directory /var/www/vhosts/example.com/httpdocs/>
php_admin_value open_basedir "/var/www/vhosts/example.com/httpdocs:/tmp:/usr/share:/var/www"
</Directory>
I saved the file and executed this shell command
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=example.com
and did an apachectl restart
Guess what ? I still get this bloody error message when i execute pear install pecl_http
"Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/PEAR.php) is not within the allowed path(s): (/var/www/) in pearcmd.php on line 42
Warning: main(PEAR.php): failed to open stream: Operation not permitted in pearcmd.php on line 42
PHP Fatal error: main(): Failed opening required 'PEAR.php' (include_path='/usr/share/pear') in /usr/share/pear/pearcmd.php on line 42
"
If some of you have an idea in order to help me solve this issue i'd really love to read what you have to say about that !
Thanks for your help,
JJ
<Directory /var/www/vhosts/mydomain.com/httpdocs/>
php_admin_value open_basedir none
</Directory>
Apparently this doesn't change anything as i'm still getting this error message
Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/PEAR.php) is not within the allowed path(s): (/var/www/) in pearcmd.php on line 42
Warning: main(PEAR.php): failed to open stream: Operation not permitted in pearcmd.php on line 42
PHP Fatal error: main(): Failed opening required 'PEAR.php' (include_path='/usr/share/pear') in /usr/share/pear/pearcmd.php on line 42
Plesk also has a php safe mode setup restriction in place. In your control panel for that domain you are going to want to click on the "setup" icon and check the box "PHP support" and I believe you might need to uncheck the the box for "(PHP 'safe_mode' on )".