martinphp11 Posted July 27, 2017 Share Posted July 27, 2017 This is my first time using phpmailer, and I keep getting this error Warning: require_once(vendor/autoload.php): failed to open stream: No such file or directory in /home/sites/1a/8/8cf45fef31/public_html/contact.php on line 3 Fatal error: require_once(): Failed opening required 'vendor/autoload.php' (include_path='.::/usr/share/php') in /home/sites/1a/8/8cf45fef31/public_html/contact.php on line 3 I was hoping someone can help me resolve this error issue , thank you Martin. Quote Link to comment https://forums.phpfreaks.com/topic/304431-newbie-needs-phpmailer-help/ Share on other sites More sharing options...
Jacques1 Posted July 27, 2017 Share Posted July 27, 2017 What are you trying to do? Or what are the installation instructions you're following? The error message indicates that you're trying to include PHPMailer through an existing Composer environment, but this environment either doesn't exist or is defective. Which one is it? Or did you just copy and paste the code without actually knowing what it does? Then you should instead read the instructions on how to use the PHPMailer autoloader. 1 Quote Link to comment https://forums.phpfreaks.com/topic/304431-newbie-needs-phpmailer-help/#findComment-1548945 Share on other sites More sharing options...
martinphp11 Posted July 27, 2017 Author Share Posted July 27, 2017 I installed phpmailer with Composer. and created a Json file. , and a composer.lock was created in a folder I created called vendor. I am trying to send a contact form , I created in bootstrap. I uploaded my website to a web server company, and I get the following error on line 3 of the example provided by PhPMailer example. Quote Link to comment https://forums.phpfreaks.com/topic/304431-newbie-needs-phpmailer-help/#findComment-1548977 Share on other sites More sharing options...
ginerjm Posted July 27, 2017 Share Posted July 27, 2017 So? What have you done to locate this file? We certainly can't "find" it for you. Do some legwork. Quote Link to comment https://forums.phpfreaks.com/topic/304431-newbie-needs-phpmailer-help/#findComment-1548978 Share on other sites More sharing options...
Jacques1 Posted July 27, 2017 Share Posted July 27, 2017 You do not create a vendor directory, nor should there be a composer.lock in it. The directory is created by Composer while it resolves the dependencies and places the libraries in that directory. You obviously haven't done that step. So once again: Which instructions are you following? Because they definitely aren't the official ones. Quote Link to comment https://forums.phpfreaks.com/topic/304431-newbie-needs-phpmailer-help/#findComment-1548979 Share on other sites More sharing options...
martinphp11 Posted July 27, 2017 Author Share Posted July 27, 2017 Thanks for the replies , I had to do some more research and grow legs, I want to thank you geeks for the push Martin Quote Link to comment https://forums.phpfreaks.com/topic/304431-newbie-needs-phpmailer-help/#findComment-1548984 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.