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 Code (markup): 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 Code (markup): 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
Could be due to the fact the Mail.php isn't located in that directory. If it is in another directory, make sure you add that to the require's path. I am available via messenger if you need me.
Make sure you restart apache each time you edit the php.ini file. Something's definitely not working correctly because of the "failed to open stream: No such file or directory in /var/www/vhosts/bluebeanstalk.com/httpdocs/admin/sendmail.php on line 7" error.
Thanks for the reply! Im sorry, how do I do that? Id love to...Im just not sure what that means? I made sure the file is '/usr/share/pear/Mail.php' So I tried: require "/usr/share/pear/Mail.php"; Code (markup): 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 Code (markup): Does that shed any light on the problem? Thanks, Ben