• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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