Warning: require_once(): open_basedir restriction in effect?!

I’m running some code that sends mail via my server using SMTP. Everything is in place (dependices etc.) and it even works on my other Plesk domain, but NOT my new one. No matter what PHP basedir or include folder settings I try, I keep getting these errors:

Warning: require_once(): open_basedir restriction in effect. 
File(/opt/plesk/php/7.4/share/pear/PEAR.php) is not within the allowed path(s): 
(/var/www/vhosts/xxxx.com/:/tmp/) in 
/var/www/vhosts/xxxx.com/httpdocs/xxx/includes/Mail/RFC822.php on line 208

Warning: require_once(/opt/plesk/php/7.4/share/pear/PEAR.php): failed to open stream: Operation 
not permitted in /var/www/vhosts/xxxx.com/httpdocs/xxxx/includes/Mail/RFC822.php on line 208

Fatal error: require_once(): Failed opening required 'PEAR.php' 
(include_path='.:/opt/plesk/php/7.4/share/pear') in 
/var/www/vhosts/xxx.com/httpdocs/xxxx/includes/Mail/RFC822.php on line 208

Plese help, very frustrated! Thanks!

Okay I chmodded all files in the includes folder (under httpdocs) to 644, and the includes folder itself to 645 and now get a single error:

**Fatal error** : Uncaught Error: Call to undefined method PEAR_Error::send() in /var/www/vhosts/synapsedecay.com/httpdocs/thesaga/forgotpassword.php:58 Stack trace: #0 {main} thrown in **/var/www/vhosts/xxxy.com/httpdocs/xxxxx/forgotpassword.php** on line **58**

This is line 58 of that file:

 $mail = $smtp->send($to, $headers, $email_body);

Anyone have any ideas?

Sponsor our Newsletter | Privacy Policy | Terms of Service