close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

PHP8.0 has caused form to e-mail to stop working

Thread began 3/09/2023 3:13 am by Nathon Jones Web Design | Last modified 3/23/2023 5:08 pm by Nathon Jones Web Design | 672 views | 6 replies

Nathon Jones Web Design

PHP8.0 has caused form to e-mail to stop working

This script, which previously worked, is now causing an HTTP 500 error:

<?php 
if ("" === "") {
$WAFV_Redirect = "contact.php?v=1";
$_SESSION['WAVT_thankyou_166_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateAN(((isset($_POST["FORMname"]))?$_POST["FORMname"]:"") . "",true,true,false,true,"'-,",true,1);
$WAFV_Errors .= WAValidateAN(((isset($_POST["FORMphone"]))?$_POST["FORMphone"]:"") . "",false,false,true,true,"()-+",false,2);
$WAFV_Errors .= WAValidateEM(((isset($_POST["FORMemail"]))?$_POST["FORMemail"]:"") . "",true,3);
$WAFV_Errors .= WAValidateAN(((isset($_POST["FORMenquiry"]))?$_POST["FORMenquiry"]:"") . "",true,true,true,true,",.;:'\r\n-!&quot;£$%&()?",true,4);
$WAFV_Errors .= WAValidateAN(((isset($_POST["FORMsubject"]))?$_POST["FORMsubject"]:"") . "",true,true,true,true,",.;:'@-+!&quot;£$%&()",true,5);
$WAFV_Errors .= WAValidateRT(((isset($_POST["FORMenquiry"]))?$_POST["FORMenquiry"]:"") . "","http://|http://, https://|https://, bitcoin|bitcoin, @|@",true,6);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"thankyou_166");
}
}
?>
<?php require_once("webassist/email/WA_Email.php"); ?>
<?php
if ("" === "") { //WA Universal Email
$Email = new WA_Email("waue_thankyou_1");
$Email->Redirect = "contact.php?m=1";
$Email->From = "" . $rsDIR->getColumnVal("NJdirTITLE") ." <". $formemail .">";
$Email->Importance = "1";
$Email->ReplyTo = "".((isset($_POST["FORMemail"]))?$_POST["FORMemail"]:"") ."";
$Email->BurstSize = "200";
$Email->BurstTime = "1";
$Email->WaitTime = "1";
$Email->Method = "smtp";
$Email->Host = "smtp.livemail.co.uk";
$Email->Port = "587";
$Email->SMTPAuth = true;
$Email->SMTPSecure = "tls";
$Email->Username = "". $formemail ."";
$Email->Password = "". $emailpw ."";
$Email->addTo("". $formemail ."");
$Email->addBCC("info@nathonjones.com");
$Email->BodyFile = "emailreceipt.php";
if (function_exists("rel2abs") && $Email->Redirect) $Email->Redirect = $Email->Redirect?rel2abs($Email->Redirect,dirname(__FILE__)):"";
for ($emailGroup=0; $emailGroup<sizeof($Email->To); $emailGroup++) {
$Email->Subject = "" . $rsDIR->getColumnVal("NJdirTITLE") ." - Website Enquiry";
$Email->send($emailGroup);
}
$Email->close();
}
?>



The error logs came back with this:

[Wed Mar 08 14:08:35.107062 2023] [fcgid:warn] [pid 128772] [client 86.158.250.229:17285] mod_fcgid: stderr: #0 /home/storage/700/4042700/user/htdocs/webassist/form_validations/wavt_scripts_php.php(58): SaveFormToSession(',7', 'thankyou_166'), referer: https://silverfoxweddingcars.co.uk/contact.php?v=1
[Wed Mar 08 14:08:35.107068 2023] [fcgid:warn] [pid 128772] [client 86.158.250.229:17285] mod_fcgid: stderr: #1 /home/storage/700/4042700/user/htdocs/thankyou.php(25): PostResult('contact.php?v=1', ',7', 'thankyou_166'), referer: https://silverfoxweddingcars.co.uk/contact.php?v=1
[Wed Mar 08 14:08:35.107081 2023] [fcgid:warn] [pid 128772] [client 86.158.250.229:17285] mod_fcgid: stderr: #2 {main}, referer: https://silverfoxweddingcars.co.uk/contact.php?v=1
[Wed Mar 08 14:08:35.107085 2023] [fcgid:warn] [pid 128772] [client 86.158.250.229:17285] mod_fcgid: stderr: thrown in /home/storage/700/4042700/user/htdocs/webassist/form_validations/wavt_scripts_php.php on line 38, referer: https://silverfoxweddingcars.co.uk/contact.php?v=1



Any idea what could be causing this? Thank you.
Regards
NJ

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...