Enable Pear (php) for a Domain on Plesk

Written by Pravin on October 10, 2008 – 4:02 am -

Installing php-pear

First we will have to install the php-pear module on the server. This can be done using yum.

yum install php-pear*

We must also configure pear in php config at /etc/php.ini.


Restart apache on the server.

/etc/init.d/httpd stop
/etc/init.d/httpd start

Enable PEAR for a domain.

Create a file called vhost.conf in /var/www/vhosts/domain.com/conf with the following contents:

<Directory /var/www/vhosts/domain.com/httpdocs>
php_admin_value include_path “/var/www/vhosts/domain.com/httpdocs/:/usr/share/pear/”
php_admin_value open_basedir “none”

Reconfigure your webserver so it will look for your new vhost.conf file by doing this:

/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=domain.com

Finally  restart apache service:

/etc/init.d/httpd stop
/etc/init.d/httpd start

Tags: , , , ,
Posted in linux, Linux VPS Hosting, Plesk For Linux, VPS hosting | 3 Comments »

3 Comments to “Enable Pear (php) for a Domain on Plesk”

  1. Flo Says:

    Thanks for this howto. It helped me very much.

    Only had to fix the quotation marks and the arguments for /usr/local/psa/admin/sbin/websrvmng need to have two –
    Probably WordPress changed them.

  2. techie talks Says:

    Nice, if you want try your pear after installation just user the command /pear . I used /usr/local/pear/bin/pear.

  3. Ryan Says:

    /usr/local/psa/admin/sbin/httpdmng –reconfigure-domain domain.com

    some times works a bit better

Leave a Comment


  • Subscribe Me

  • Tag Cloud

  • Archives