Page 1 of 1

SMTP | Warning: require_once(): open_basedir restriction in effect. File(/usr/share/pear/System.php) is not within ...

Posted: Tue Mar 24, 2020 1:30 am
by bobmeetin
I am a novice with SMTP, found some instructions to both install SMTP and PEAR. The install looks good. When I get around to testing to see if they work I have a short test script with these includes:

Code: Select all

require_once 'System.php';
var_dump(class_exists('System', false));
require_once "Mail.php";

System is supposed to show a true response and doesn't. If I include the Mail.php line it breaks the balance of the page.

I get several error lines if I enable php errors like:

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/testing/web/develtesting.com/public_html:/home/testing/tmp) in /home/testing/web/develtesting.com/public_html/smtp/check-installation.php on line 43
How would you go about resolving this problem?

Re: SMTP | Warning: require_once(): open_basedir restriction in effect. File(/usr/share/pear/System.php) is not within .

Posted: Thu Apr 02, 2020 1:31 pm
by bobmeetin
I updated the php.ini file setting open_basedir as follows and restarting Apache:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/

Warning: require_once(): open_basedir restriction in effect. File(/usr/share/pear/System.php) is not within the allowed path(s): (/home/testing/web/develtesting.com/public_html:/home/testing/tmp) in /home/testing/web/develtesting.com/public_html/smtp/check-installation.php on line 53

Suggestions please.