PDA

View Full Version : Fatal error: Call to undefined function virtual()


johnandpenny361633
11-30-2009, 03:19 PM
When i uploaded my form to the server, i got this error message:

Fatal error: Call to undefined function virtual()

Jason Byrnes
11-30-2009, 03:33 PM
In the Dreamweaver site definition, you have set the "Create links relative to" option to Site, this causes Dreamweaver to use the virtual() synatx. the virtual function can only be used on a small handful of servers.


Change that to Document so Dreamweaver will use the correct require_once syntax.

johnandpenny361633
12-01-2009, 02:51 PM
I have the ContactForm_GMC but when i customize the form using CSS form builder the email does not send to the address specified in the WA Globals? It brings up the thankyou.php but the message does not send?

J Richardson

Jason Byrnes
12-01-2009, 03:44 PM
send a copy of your page please.

johnandpenny361633
12-02-2009, 02:51 PM
http://www.extonweb.com/contactus.php

Jason Byrnes
12-03-2009, 09:18 AM
I'm sorry, I need you to send a copy of the contactus.php page so I can examine the code.

johnandpenny361633
12-03-2009, 11:03 AM
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php require_once('WA_Globals/WA_Globals.php');?>
<?php require_once("WA_Universal_Email/mail_PHP.php"); ?>
<?php require_once("WA_Universal_Email/MailFormatting_PHP.php"); ?>
<?php
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {
//WA Universal Email object="mail"
//Send Loop Once Per Entry
$RecipientEmail = "".($WAGLOBAL_Contact_Email_To) ."";include("WA_Universal_Email/WAUE_contact_1.php");

//Send Mail All Entries
if ("index.php"!="") {
header("Location: thankyou.php");
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Contact Us</title>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<style type="text/css">
.textfieldServerError {
display:block;
margin:0px;
color:#CC3333;
border: 1px solid #CC3333;
}
#container {
width: 824px;
margin-right: auto;
margin-left: auto;
}
#container #header {
padding: 20px 0px 5px 40px;
}
#container #header a, a:visited {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size: 16px;
font-weight: bold;
color: #B6B6B6;
text-decoration: none;
letter-spacing: 1px;
}
#container #header a:hover {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size: 16px;
font-weight: bold;
color: #B6B6B6;
text-decoration: underline;
letter-spacing: 1px;
}
#footer {
color: #666;
font-size: 12px;
line-height: 16px;
padding: 5px;
text-align: center;
}
</style>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" />
<script src="CSSFormBuilder/WA_ServerValidation.js" type="text/javascript"></script>
<link href="CSSFormBuilder/FD_Cool_Default.css" rel="stylesheet" type="text/css" />
</head>

johnandpenny361633
12-03-2009, 11:15 AM
I have txt file....

Jason Byrnes
12-03-2009, 12:13 PM
Your form action is set to post to the thank you page:
<form class="Cool_Default" id="SimpleContact_Cool_Default" name="SimpleContact_Cool_Default" method="post" action="thankyou.php">



leave that blank so universal email has an opertunity to send the email:
<form class="Cool_Default" id="SimpleContact_Cool_Default" name="SimpleContact_Cool_Default" method="post" action="">

johnandpenny361633
12-04-2009, 03:12 AM
Is these extensions one BIG con? I am just please i have not wasted more cash!

Still does not work. Leave what blank? The form automatically fills it in?

Jason Byrnes
12-04-2009, 02:09 PM
Leave the form action blank:
action=""

it had been set to post to the thank you page, which means it will bypass the code that sends the email.


One think I see is that it looks you are adding a new form to the page instead of editing the origianl Contact us solution pack form. The contact from solution pack form uses different form element names that seam top have been changed.


see the following document for instructions on editing an already existing form:
http://assets.webassist.com/how-tos/modifying_custom_form.pdf

johnandpenny361633
12-09-2009, 12:51 PM
I have the form working now but........

It only works if i use the same email address that i use with the same form on one of my other websites.

I am using the Contact Form Solution Pack with CSS form builder. Why does it not work if i choose a different email address to use on a different site?

Jason Byrnes
12-09-2009, 03:32 PM
If the emails are being received for some addresses but not others, there are ussually 2 possibilties:

1) the email is being caught in a spam filter. Check your email programs spam folder to see ifg the email is being treated as spam.

2) The SMTP server is refusing to relay for that particular address. if this is the case, yu will need to work with the host to have that address added to the allowed list.