• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

How I can enable PEAR in PHP ??

B

BillieGDJoe

Guest
Hi folks,




My customers need to use PEAR framework which by default is installed in /usr/share/pear. My problem is how to tell to PHP to allow access to that directory (open_basedir) if I can't change http.include file inside domain configuration directory. Also tried vhost.conf file, but now works too. Thanks in advice.
 
Hi

can you post the solution please, i have the same problem i think?

Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/share/pear/post.php) is not within the allowed path(s): (/var/www/vhosts/marco-schultewolter.de/subdomains/blog/httpdocs:/tmp) in /var/www/vhosts/marco-schultewolter.de/subdomains/blog/httpdocs/wp-content/themes/fasttrack/category.php on line 28

and i create a vhost.conf with the following content but error still exists
<Directory "/var/www/vhosts/marco-schultewolter.de/subdomains/blog/httpdocs">
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/marco-schultewolter.de/subdomains/blog/httpdocs:/tmp:/usr/share/pear/post.php"
</IfModule>

THX
ACID25
 
Use the PEAR directory /usr/share/pear in your open_basedir path instead of the /usr/share/pear/post.php file. Don't forget to run websrvmng and reload apache after creating your vhost.conf.
 
Looking at the error it seems that /usr/share/pear has not been added to the open_basedir path.
 
Back
Top