If you need to use PEAR library functions in your web applications. Sometimes you may need to set the path to pear files for your domain so that the PEAR library files/classes are accessible to your PHP scripts. While using Plesk Parallels control panel you can do this as given below:
Login to SSH as root.
You need to set the “open_basedir” variable to include the path to PEAR. For this you need to open “vhosts.conf” file in the folder “/var/www/vhosts/your_domain_name/conf/”. It should look like this:
<Directory /var/www/vhosts/your_domain_name/httpdocs>
php_admin_value open_basedir /var/www/vhosts/your_domain_name/httpdocs
:/tmp:<path_to_PEAR_installation>
</Directory> ServerAlias *.your_domain_name
Now open your Plesk control panel, go to – domain name >> Web Hosting Settings, and CLEAR the checkbox next to text saying “PHP ‘safe_mode’ on”.
Now on the SSH restart the Apache using the following command:
# /etc/init.d/apache2 restart
Now go to your browser and refresh. Your website should be able to access the PEAR classes.
Search the site
Popular posts
- Working with Access-Control-Allow-Origin
- Connecting Sony K750 with Windows 7
- Updating Nokia E72 phone software
- Javascript code to convert date to timestamp
- Installing Skype on Fedora 14
- Using AjaxHelper for pagination in CakePHP 1.3
- Apache Keep Alive Directive
- Setting include path for a domain in Plesk
- Displaying UTF characters in the FPDF
- Merge the remote changes before pushing again : Git Message
Random Testimonial
- ~ Elance ID – gtownwebdev
"Nirvaat was responsive, fast, knowledgeable, professional and the price was great. I am thrilled to have found"
- Read more testimonials »
What's the little bird saying?
- New post: Fix Error 0×80070424 on windows http://t.co/bmK0AZpH 257 days ago
- New post: Configuring Horder Vacation Responder in Plesk 9 http://t.co/gcsPNIVv 280 days ago
- New post: Wordpress update issue on Plesk http://t.co/dUxcjpgR 285 days ago
- I’ve just taken the WordPress 2012 User and Developer Survey, have you? http://t.co/G20SmrMr (pass it on!) 312 days ago
- New post: Mobile device emulators to test web page display http://t.co/jmgc0x99 321 days ago

September 2, 2011 in