Contact Form SMTP Server Error 500 Code

9 replies · opened Jul 31, 2020

DdemidnightJul 31, 2020

Hi Support,

I have setup the form.php and test with a sample contact page, when click Send, it's not responding due to an Error code 500. Please advise, thank you.

http://18.220.125.137/contact.html

SSemicolon WebSTAFFJul 31, 2020

Hello,

We have tried checking out your Link but it doesn't appears to be working for us correctly. Can you please provide us with an alternate Live URL so that we can check out the exact issue and provide you with more assistance on this. Thanks for your Patience.

Additionally, you can try checking some of the common troubleshooting steps below:

Firstly, please make sure that your PHP Version is more than 5.6 or preferably the Latest Version.

Secondly, it might be possible that the PHP mail() Function is blocked by your Web Hosting Provider in order to to prevent SPAM. So, it is Highly Recommended to use SMTP Functionality for Forms as it ensures that the Mails are delivered securely.

Please check these 2 issues above and if you are still facing further issues, the please consider adding the .customjs Class to the .form-widget Element and then following code at the very top of your include/form.php File:

error_reporting(E_ALL);

which should display all the possible errors. Please notify us about the Error Message you see, after going through the process above, so that we can provide you with more assistance on this.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

DdemidnightJul 31, 2020

Hi,

Server is running on PHP/7.2.30
Email handling is via SMTP

Following is the alert message received.
{ "alert": "error", "message": "An unexpected error occured. Please Try Again later." }

Please screw down on the above link to see the contact form. Thank you,

SSemicolon WebSTAFFJul 31, 2020

Hello,

Please try submitting the Form instead of viewing the PHP File directly and let us know the error message you receive.

Additionally, we are unable to view the Page. We get a connection timed out error.

Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

DdemidnightJul 31, 2020

Can you please try the link again?

Thank you,

SSemicolon WebSTAFFJul 31, 2020

Hello,

The Form is receiving a 500 Internal Server Error on Submitting. There can be many possible reasons for this:

  1. This could be related to your Server Configurations.

  2. SMTP connection fails.

  3. There is an Error in the PHP Code.

To resolve this, you will need to first Enable your PHP Configuration to display all errors. Then after you can see further details on the error upon submitting the form again, you can either resolve this according to the error, else, you can let us know the error you are getting so that we can check further. If this is related to the Servers, then you will need to contact your Web Hosting Providers for further assistance.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

DdemidnightJul 31, 2020

Hi,

This is the Error message I have received:

Fatal error: Uncaught Error: Call to undefined function mb_convert_case() in /var/www/html/dnc/include/form.php:247 Stack trace: #0 {main} thrown in /var/www/html/dnc/include/form.php on line 247

SSemicolon WebSTAFFJul 31, 2020

Hello,

Thanks for reporting this!

Appears like the mb_string PHP Extension is not installed on your servers. Consider replacing the following code in the include/form.php File:


$name = mb_convert_case( $name, MB_CASE_TITLE, "UTF-8" );

with this:


$name = ucwords( $name );

This should fix this error. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

DdemidnightJul 31, 2020

Hi, that has resolved my problem. Thank you,

SSemicolon WebSTAFFAug 1, 2020

Hello,

Glad that your issues were resolved. Thanks for your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard