install PEAR to PLESK over UBUNDU

#apt-get install lynx

#lynx -source http://pear.php.net/go-pear | php

press 1 and change the path to /usr/share

After with pear

pear install XML_Serializer

Using PEAR

This section discusses some of the common uses of PEAR. For more detailed instructions on using PEAR see the PEAR Manual

* Get a list of software available using PEAR

pear remote-list

* Install a package

pear install <package_name>

* List packages installed

pear list

* List files belonging to an installed package

pear list-files <package_name>

* Uninstall a PEAR package

pear uninstall <package_name>

* Upgrade PEAR installer (needed for installing certain packages)

pear upgrade PEAR

After go to the

cd /var/www/vhosts/mt-example.com/conf/

and create file vhost.conf

add this code

<Directory "/var/www/vhosts/domain.gr/httpdocs">
php_admin_value open_basedir none
php_admin_value open_basedir off
php_admin_value open_basedir "/var/www/vhosts/domain.gr/httpdocs:/usr/share/PEAR:/tmp"
php_admin_value include_path ".:/usr/share/PEAR"
php_admin_value safe_mode Off
</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=mt-example.com

Finally you must restart apache, this can be done through Plesk or by executing the following commands:

/etc/init.d/apache2 stop

/etc/init.d/apache2 start

Thanks

https://help.ubuntu.com/community/PhpPear

http://kb.mediatemple.net/questions/514/Enabling+PEAR+by+setting+your+open_basedir+and+include_path

http://pear.php.net/manual/en/installation.getting.php

Leave a comment