PHP Fatal Error

Issues related to forms.
Post Reply
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

PHP Fatal Error

Post by petejos »

My php form was working fine until today. The following are the error messages from the log file. I have the file in my web server. Just don't know why it suddently stopped working. my website is www.goec.com.au Please help urgently. Thanks.


[20-Feb-2019 15:35:09 Australia/Perth] PHP Fatal error: Class 'PHPMailer\PHPMailer\Exception' not found in /home/goecaumo/public_html/goec2/PHPMailer.php on line 1943
[20-Feb-2019 15:35:45 Australia/Perth] PHP Fatal error: Class 'PHPMailer\PHPMailer\Exception' not found in /home/goecaumo/public_html/goec2/PHPMailer.php on line 1943
[20-Feb-2019 15:36:02 Australia/Perth] PHP Fatal error: Class 'PHPMailer\PHPMailer\Exception' not found in /home/goecaumo/public_html/goec2/PHPMailer.php on line 1943
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PHP Fatal Error

Post by Pablo »

If you did not change anything yourself then maybe your web host has changed something on the server?
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

When I test the form on my website, the following error appear.


This page isn’t working www.goec.com.au is currently unable to handle this request.
HTTP ERROR 500
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PHP Fatal Error

Post by Pablo »

The error indicates that something is wrong either in the settings or in the server configuration.
If you did not change anything yourself then maybe your web host has changed something on the server?
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

I just used the php script from your software pablo.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

hi Pablo,

I noticed you have new update. Do you think it will resolved my problem?
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

I tried create a brand new form with a new php file. It worked without any issue. But my existing php form still having issue. I have change nothing at all since it last work 7 days ago. What could be wrong?
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PHP Fatal Error

Post by Pablo »

Did you contact your host?
Maybe they have changed something?

I do not think this is directly related the software because it has worked previously.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

Yes I have contacted them. They are still investigating. Just want to find out if you have any solutions or anyone else facing the same problem. Thanks.
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PHP Fatal Error

Post by Pablo »

There is not much I can do to help if something on the server is wrong.

Note that the web host probably will first blame the software, but if you did not change anything yourself, then it's usually a server related issue.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

Thanks pablo. So.basically the php mailer in your software has no issue right?
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: PHP Fatal Error

Post by BaconFries »

Thanks pablo. So.basically the php mailer in your software has no issue right?
Correct. When this happens and you see a HTTP 500 error it is a internal server error and something has went wrong on the server. You should contact your host for further help. They will say or imply it is a issue with the software used but 99.999% of the time it is down to them. It may even clear itself. Note once published any issues that occur are that of the server and nothing to do with the program.
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PHP Fatal Error

Post by Pablo »

So.basically the php mailer in your software has no issue right?
There are no known issues, otherwise they would have already been fixed.
Also, if it suddenly (and you did not change anything) then it very unlikely that it's related the PHP Mailer.
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

Hi pablo,

This is their reply. What do you think?

I am writing this email regarding the contact form of the website of goec.com.au. As per our higher level of support, the issue has something to do with the scripting of the PHPMailer used. As much as I want to, we are not allowed to make any changes to the scripts or codes inside the files of the File Manager for security purposes.

We recommend to perform the following steps.

1. Install composer. You may use direct download link: https://github.com/PHPMailer/PHPMailer.
2. Run this command in your project folder of xampp in cmd (Locally) "composer require phpmailer/phpmailer".
3. Then you will get the auto upload file in vendor folder. After that you have to have to add " require 'vendor/auto upload. php' " to your above code..
4. Then use respective file according to the requirements, use 'phpmailer/phpmailer/PHPMailer'; use' phpmailer/phpmailer/Exception';

Moreover, we have confirmed there is no issue with the server used as the concern has something to do with the PHPMailer added on the File Manager.
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PHP Fatal Error

Post by Pablo »

Once again, if you did not change anything yourself then the web host must have changed something on their side.
Did you tell them that it worked previously and you did not change anything yourself?
User avatar
BaconFries
 
 
Posts: 5328
Joined: Thu Aug 16, 2007 7:32 pm

Re: PHP Fatal Error

Post by BaconFries »

As you can see the reply from your host tries to blame the php mailer script and not to there server. Now if as you say your form was working prior to today's date 20th February 2019 and you haven't made any changes then it is safe to say it cannot be a issue with the form or the script used (php mailer) as nothing has changed prior to today's date or today's date .. correct? then it can only be a server issue change. I would contact them again pointing out that it was working prior to today the 20th and you haven't made any changes so how can it be the script used! asking them to explain that...
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

Hi Pablo,

Yes i did tell them i changed nothing. This is their latest reply. Let me know if this make sense to you. What is the PHP version in your software? Thanks

======
Hello peter,

Based on error log below, the class and name space of the script is not support for php 5.6 and above.

[20-Feb-2019 21:18:30 Australia/Perth] PHP Fatal error: Class 'PHPMailer\PHPMailer\Exception' not found in /home/goecaumo/public_html/goec2/PHPMailer.php on line 1943

We have changed the php version to it's original state which is 5.4 and it is now working.
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PHP Fatal Error

Post by Pablo »

So, it looks like they did actually change something, right?

Anyway, if you have the current version of WYSIWYG Web Builder then it includes the latest version of PHP Mailer (6) which is compatible with PHP 7 (PHP 5.6 and newer).
petejos
 
 
Posts: 155
Joined: Wed Aug 22, 2012 11:43 am

Re: PHP Fatal Error

Post by petejos »

Yes i have the current version of your software. But still the same problem even after i uploaded all files into the hosting service.

In fact they didn't change anything. They are changing it now is because they detected that i have an older version of PHP. That is my question why is it that my php version suddenly changed when I have an updated version of your software. That is very strange.
User avatar
Pablo
 
Posts: 21578
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PHP Fatal Error

Post by Pablo »

The software cannot change the PHP version on the server. So, if it previously worked then your host must have changed something.
The current version of PHP Mailer is compatible with PHP 5.5 and newer:
https://github.com/PHPMailer/PHPMailer
Post Reply