PHP: PEAR Library and Plesk

I was having an issue with setting up PEAR Library with PHP on my Linux box that runs Plesk, so after some research and a little help from the support team at HostMySite.com I came up with the following.

To run PEAR you obviously have to have it installed, so once you have done that, you will need to create a vhost.conf file for the domain that you wish the library to work with on the Plesk box.  This should look something like the following, and should be put into <account root>/conf/vhost.conf

 

<Directory /var/www/vhosts/my_domain_name.com/httpdocs>
       php_admin_value open_basedir "none"
       php_admin_value include_path "/var/www/vhosts/my_domain_name.com/httpdocs:/usr/local/PEAR:/tmp:"
</Directory>

 

Once you’ve created the vhost.conf file you have to run the following command.  I use Putty, but any SSH/Telnet client should work great.  This tells Plesk to rebuild the configuration files which will update with changes in the vhost.conf.  

  • /usr/local/psa/admin/sbin/websrvmng -v -a

And finally restart apache;

  • service httpd restart

These steps should get you to the right place.  At least they do for me.

 

 

Post Navigation
«
»

Warning: file_put_contents(): Only 0 of 37871 bytes written, possibly out of free disk space in /home/tobyandj/public_html/dawes-content/advanced-cache.php on line 956

Fatal error: Uncaught exception 'Exception' with message 'Quick Cache: failed to write cache file for: `/2009/05/31/php-pear-library-and-plesk/`; possible permissions issue (or race condition), please check your cache directory: `/home/tobyandj/public_html/wp-content/cache/cache`.' in /home/tobyandj/public_html/dawes-content/advanced-cache.php:960 Stack trace: #0 [internal function]: quick_cache\advanced_cache->output_buffer_callback_handler(' <!DOCTYPE html...', 9) #1 /home/tobyandj/public_html/wp-includes/functions.php(2935): ob_end_flush() #2 [internal function]: wp_ob_end_flush_all('') #3 /home/tobyandj/public_html/wp-includes/plugin.php(470): call_user_func_array('wp_ob_end_flush...', Array) #4 /home/tobyandj/public_html/wp-includes/load.php(573): do_action('shutdown') #5 [internal function]: shutdown_action_hook() #6 {main} thrown in /home/tobyandj/public_html/dawes-content/advanced-cache.php on line 960