Jump to content

Failed opening required FAIL


bestrong

Recommended Posts

Hello everyone!

 

I am having some trouble including the pear mail.php file

 

my code is

 

error_reporting(E_ALL);
ini_set('display_errors', '1');
require_once "Mail.php";

...more code PHP PHP etc

 

This products the error message

Warning: require_once(Mail.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/bluebeanstalk.com/httpdocs/admin/sendmail.php on line 7

Fatal error: require_once() [function.require]: Failed opening required 'Mail.php' (include_path='.:/usr/share/pear/') in /var/www/vhosts/bluebeanstalk.com/httpdocs/admin/sendmail.php on line 7

 

The include path is correct (include_path='.:/usr/share/pear/) and there are the Mail.php, PEAR.php, etc in that folder.

 

I have already tried removing the trailing slash on include_path='.:/usr/share/pear/, and that did nothing different.

 

Thanks so much,

 

Ben

 

Link to comment
https://forums.phpfreaks.com/topic/158936-failed-opening-required-fail/
Share on other sites

OK...I tried this:

 

require "/usr/share/pear/Mail.php";

 

and that produced

 

Warning: require() [function.require]: open_basedir restriction in effect. File(/usr/share/pear/Mail.php) is not within the allowed path(s): (/var/www/vhosts/bluebeanstalk.com/httpdocs:/tmp) in /var/www/vhosts/bluebeanstalk.com/httpdocs/admin/sendmail.php on line 7

 

 

Does that shed any light on the situation?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.