We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
How do you configure VestaCP to recognize pear and not return an open_basedir error?
How do you configure VestaCP to recognize pear and not return an open_basedir error?
I have a CentOS VestaCP installation and have been trying to get SMTP mail to work so that it can be used with various forms. I checked and pear is installed under /usr/share/pear. I found a guide to check if pear is installed correctly, https://pear.php.net/manual/en/installa ... ecking.php, which is helpful. I followed all the checks and up to including System.php it looked perfect. I enabled error logging. This fails:
The errors:
I added the following line to the file just to see and it did not help:
How would you fix this, get it to see the path? My technical skills are limited; please respond in layman terms.
Code: Select all
require_once ("System.php"); // for pear
Code: Select all
Warning: require_once(): open_basedir restriction in effect. File(/usr/share/pear/System.php) is not within the allowed path(s): (/home/$my_account/web/$my_domain/public_html:/home/$my_account/tmp) in /home/$my_account/web/$my_domain/public_html/smtp/test-pear.php on line 34
Warning: require_once(/usr/share/pear/System.php): failed to open stream: Operation not permitted in /home/$my_account/web/$my_domain/public_html/smtp/test-pear.php on line 34
Fatal error: require_once(): Failed opening required 'System.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/$my_account/web/$my_domain/public_html/smtp/test-pear.php on line 34
Code: Select all
ini_set("include_path", '/usr/share/pear:' . ini_get("include_path") );