New on LowEndTalk? Please Register and read our Community Rules.
How to fix " Fatal error: require(): Failed opening required "
How i fix this issue?
Warning: require(/phpmailer/PHPMailerAutoload.php): failed to open stream: No such file or directory in /home/mysitedic/public_html/mailer.php on line 2
Fatal error: require(): Failed opening required '/phpmailer/PHPMailerAutoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mysitedic/public_html/mailer.php on line 2
and
Message could not be sent.Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
My SMTP settings are right but i don't know why this error coming
Comments
The error means the file it is looking for does not exist, it is currently looking in the root / and not its current location.
There is normally a config file or entry that you set to tell it the location of the script such as "/home/mysitedic/public_html/"
It means that the file (PHPMailerAutoload.php) doesn't exist. Maybe the file is located in phpmailer/PHPMailerAutoload.php instead of /phpmailer/PHPMailerAutoload.php? If that's the case, the correct code would be:
Basically, just include the correct path for the file and I believe it would work afterwards.
@Verelox Thank you very much.. Now coming
Message could not be sent.Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Did the fatal error go away? If so, I would check the SMTP settings - perhaps enabling debug mode might help as well. To do so, insert the following code before attempting to send the message (replace $smtp with the correct variable):
Have you opened your port. If not, that would be the case.
@Verelox and @sdglhm Here is code im using
Still not working,., same error
as far as I know mandrill requires dkim and spf setup, php mailer should not work, I think ;P
This same settings working in shared Host
but not working in my New VPS host
That's saying that the file PHPMailerAutoload.php is in a subdirectory called phpmailer.
Is it?
If not, fix the path so you script can find the PHPMailerAutoload.php file.
Please disable the API key you have posted here "$mail->Password = 'WJFu-3T1GFYS-17zTGGsA'; " in Mandrill. Some else can use it and you might get into trouble.
Disable and create a new one............
i have fixed that problem... This same settings working in shared Host
but not working in my New VPS host
@bytechef Tahnk you for reply.. don't worry i have put Wrong password and username
Googled similar issues with the resolution (regarding path)
http://community.sitepoint.com/t/phpmailer-require-fatal-error/191448/21
So is it working now or not? If not, what is the error?
->
Have you configured the Dkim and SPF
Dear " " Fatal error: require(): Failed opening required " " The problem is solved now... But now showing " Message could not be sent.Mailer Error: SMTP connect() failed. "
Not yet.. I Don't Know What It Is, but this problem is coming to new host.. Shared Host working this code well and when i refresh page email is going to inbox.. but not working for VPS
I am sure you might have done most of the troubleshooting listed in the following page, if not try some of them:
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Especially set the smtp debug mode to 3 or 4...
@bytechef @sdglhm @sleddog @Clouvider Thank you for help.. i think host SMTP my own host...i already bought VPS for it but i don't know how i setup..
@2014 managing your mail server is not only about setting it up. Use Mandrill if you have no prior experience with that.
shared hosting comes with mail server? ;P
Thanks.. but i don't know how to fix " Message could not be sent.Mailer Error: SMTP connect() failed. "
He is using Mandrill as I see there
$mail->Host = 'smtp.mandrillapp.com';
i don't know, but i host all phpmailer file to my shared host... and its working
Yes.. After i moved all files to new host, this error coming
guess you probably need a mail server, vps doesn't have it out of the box, only sendmail
did your host block port 25?
Then you should be using the Mandrill API....
Follow the instructions in this link:
https://mandrillapp.com/api/docs/index.php.html
I have done this couple of times and works neat....
Created a function as follows:
I have Removed " $mail->IsSMTP(); " line, now showing " Message has been sent " but now coming any message for my mail
@bytechef Here is error Logs