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.

include_path=”.:/usr/share/pear:/local/PEAR/”

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”
</Directory>

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

Update me when site is updated

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

One Comment 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.

Leave a Comment

RSS

  • Subscribe Me

  • Tag Cloud

  • Archives