Contact Form HTTP Error 500

4 replies · opened Nov 14, 2023

Aanthonychen2410Nov 14, 2023

Hi there so the contact form for my site I am building for a client is hosted by godaddy and is returning an HTTP Error 500. I contacted them and they ran a test script saying everything works from their end. Also, they said that it works fine with either PHP or SMTP and that the issue revolves around the contact form script. I'm not sure what the issue could be as I followed the https://docs.semicolonweb.com/docs/forms/form-setup/

Here is the code for the contact form and form.php:


										

										

											
												
													
												
											

											
												
													Name *
													
												

												
													Email*
													
												

												
													Message *
													
												

												
													
												

												
													 Send Message
												
											

											

										
									
 'marylandib@gmail.com', // Your Email Address
	'name' => 'Jordan' // Your Name
//);

/*-------------------------------------------------
	Sender's Email
---------------------------------------------------*/

$fromemail = array(
	'email' => 'no-reply@website.com', // Company's Email Address (preferably currently used Domain Name)
	'name' => 'Company Name' // Company Name
);

/*-------------------------------------------------
	reCaptcha
---------------------------------------------------*/

// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = ''; // Your reCaptcha Secret

/*-------------------------------------------------
	hCaptcha
---------------------------------------------------*/

// Add this only if you use hCaptcha with your Contact Forms
$hcaptcha_secret = ''; // Your hCaptcha Secret

/*-------------------------------------------------
	PHPMailer Initialization
---------------------------------------------------*/

$mail = new PHPMailer();

/* Add your SMTP Codes after this Line */
    
$mail->IsSMTP();
$mail->Host = "mail.yourdomain.com";
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Port = 26;
$mail->Username = "yourname@yourdomain.com";
$mail->Password = "yourpassword";

// End of SMTP
SSemicolon WebSTAFFNov 14, 2023

Hello,

Since your Form File: include/form.php (https://marylandinvestigationbureau.com/include/form.php) is returning a 500 Internal Server Error, it is an indication that this is a Server Configuration issue or a PHP Error.

Please consider adding the .customjs Class to the .form-widget DIV and then the following code at the very top of your include/form.php File just after the opening php tags:
[ch_pre type="php"]error_reporting(E_ALL);[/ch_pre]

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 further assistance on this. 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.

Aanthonychen2410Nov 14, 2023

So I've added the classes to the correct locations as mentioned above. This might a dumb question but where will I test to see the potential errors I get? For example, if I test on the live godaddy server host, where would I see the error message?

Aanthonychen2410Nov 14, 2023

I tested on the live server using only PHP and no SMTP and got a success message but still haven't received anything in my Gmail email. I don't if this will help speed up the issue or not.

SSemicolon WebSTAFFNov 17, 2023

Hello,

Thanks for your Patience!

If the SMTP Details have been added correctly, everything should work fine. Would it be possible for you to provide us with FTP Access, so that we can check this for you and fix it? Please make sure you provide the FTP Credentials in a Private Reply. 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.

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