close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Contact form not sending

Thread begun 4/22/2011 1:53 pm by markf425338 | Last modified 8/26/2015 11:23 am by Ray Borduin | 10212 views | 17 replies |

markf425338

Contact form not sending

I have the Contact FOrm Soulution Pack installed. I have uploaded the contactus.php into my site at the web host (fatcow).

I have tried addign a variet of email server names to the $WAGLOBAL_Email_Server = "" line in the WA_Gobals.php file. The tech support at fatcow say it should be smtp.fatcow.com. I've tried that but no luck. Also tried smtp.mydomain.com and no luck.

The page and form display just fine. I can fill out the form, enter the captcha and submit. But i don't get any e-mail.

Also searching thru this forum I found reference to a thank you page that might disply. I don't get any thank you or verification that the form submitted. I don't find any mention of a thank you page in any of the docs.

I re-named the supplied contactus.php to contactus-original.php. Then I made a copy and made the changes and saved it as contactus.php. For soem reason when I added contactus.php to the attached zip file it alos included the contactus-original.php file. Maybe this has something to do with my trouble?

Possibly it won't work unless the changes are made to the original file?

Thanks for any help with this.

Sign in to reply to this post

Jason ByrnesWebAssist

if it does not redirect to the thank you page, the either the code to send the email is not executing, a php error is occurring or the validation is failing.

To see if an error is occurring, add the following code at line 1:

php:
<?php 

errors_reporting
(E_ALL);
ini_set('display_errors','on');
?>




to see if the validation is failing, change the following code:

php:
if ($WAFV_Errors != "")  {

    PostResult($WAFV_Redirect,$WAFV_Errors,"contact");
  }


to:

php:
if ($WAFV_Errors != "")  {

    die($WAFV_Errors);
    PostResult($WAFV_Redirect,$WAFV_Errors,"contact");
  }


this will write a coma seperated list of numbers to the page on submit if validation is failing.


it could be that the server has disabled the $_SERVER["HTTP_REFERER"] variable which would cause the email code not to run, change the following line:

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)))     {



to:

php:
if ($_SERVER["REQUEST_METHOD"] == "POST")  {
Sign in to reply to this post

markf425338

reply

Hi Jason. thanks for your reply.

I followed your instructions. When I added the code at line 1 i got an error message saying to contact admin.

When changed the second code I got the comma separated numbers 4,5

Wen I changed the third code I still get the comma separated numbers.

So it's still not working. I have yet to see the thank you page appear. Any other trouble shooting ideas or suggestions?

Thanks for your help!

Sign in to reply to this post

Jason ByrnesWebAssist

Ok, so the comma separated string of numbers means that validation is failing on the form which is preventing it from submitting.

the numbers 4 and 5 refer to the Captcha and Security Question validation.

My guess is that the server is not configured to store session variables.

Try the session test page from the following post to test the servers session management:
showpost.php?p=23826&postcount=2

if the test fails, then you will need to contact the host to have them correct the problem.

most likely it is a bad setting for the session.save_path in the php.ini file.

Sign in to reply to this post

markf425338

Reply

Thank you Jason. I uploaded the sessionTest.php file. When I access that at sessionTest.php in the browser I get a Page Not Found error message.

does this confirm that the problem is with the web host and the way the php is configured on the web host server?

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

you need to use your actual domain instead of mydomain.com

A 404 error means that the page does not exist at the address you typed.

Sign in to reply to this post

markf425338

Thanks Jason. OK my mistake

I should have used sessionTest.php. (I was leaving out th eContactForm part of the path.

So the sessionTest loads and I clicked the first link. Next I click the second link and I get the Session Test = NULL .

So I guess "your server has a problem with session management."

I'm going to call the host (fatcow) tech support and hope they can correct this. I'm somewhat skeptical on the tech support people offering advice on configuring php to work with forms created by others but I'll give it a go.

Sign in to reply to this post

Jason ByrnesWebAssist

Most likely the problem is the session.save_path in the php.ini


at this point, it's not so much:
"tech support people offering advice on configuring php to work with forms created by others"

the problem is that sessions do not work

this will apply to more than just forms. it will apply to plethora of other common php programing tasks like User Authentication.

Sign in to reply to this post

markf425338

Ok Jason you are 100% correct. The session.sav_ path line had to be corrected in the php.ini file.

The form is now working correctly! Thanks!!

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it is working.

Sign in to reply to this post
loading

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...