bestrong Posted May 20, 2009 Share Posted May 20, 2009 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 More sharing options...
PFMaBiSmAd Posted May 20, 2009 Share Posted May 20, 2009 Based on the path separator : being used, you are likely on an operating system that is case sensitive. Is your file name Mail.php or is it mail.php? Link to comment https://forums.phpfreaks.com/topic/158936-failed-opening-required-fail/#findComment-838249 Share on other sites More sharing options...
bestrong Posted May 20, 2009 Author Share Posted May 20, 2009 Thanks for the reply! Yes, I am using CentOS 5, which is case sensitive, however, the file is Mail.php...so that is not the issue. could there possibly be some sort of protection deal? The folder is set to read for all users...so I don't know Thanks Link to comment https://forums.phpfreaks.com/topic/158936-failed-opening-required-fail/#findComment-838271 Share on other sites More sharing options...
bestrong Posted May 20, 2009 Author Share Posted May 20, 2009 I tried copying the pear.php and Mail.php to a folder under htdocs (the actual website folder) ... I was able to include the mail.php file, but it generated other errors... I would prefer to include the proper location, but I still cant get it to work!! Link to comment https://forums.phpfreaks.com/topic/158936-failed-opening-required-fail/#findComment-838336 Share on other sites More sharing options...
bestrong Posted May 20, 2009 Author Share Posted May 20, 2009 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? Link to comment https://forums.phpfreaks.com/topic/158936-failed-opening-required-fail/#findComment-838375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.