[Pro] Contact form problem

Have had this site running for 3+ years. Just made some changes for new owners and am getting this error msg on Safari and Firefox (Mac) works great in IE 8.

“7 || !strpos($HTTP_SERVER_VARS[‘HTTP_REFERER’], $HTTP_SERVER_VARS[‘HTTP_HOST’])){ header( “Location: “.$notindomain_errorpage ); exit; } else { $msg=“The following information was submitted from a form on “.$HTTP_SERVER_VARS[‘SERVER_NAME’].”:\n\n”; foreach($HTTP_POST_VARS as $key => $val){ //filter out any form items called send or reset //image based submit and reset buttons will be in the format // send_x: 13 // send_y: 10 $myKeySlice = substr(”$key”,0,4); if ($myKeySlice != “send” && $myKeySlice != “rese”){ if ($key == “subject” || $key == “email” || $key == “name”){ //Prevent injection attacks by stripping tags and newlines from the data //Do this only on data that makes it into the e-mail header as newlines in a message body should still be valid $key = strip_tags($key); $val = strip_tags($val); if (eregi(”\r",$key) || eregi(“\n”,$key)){ header( “Location: “.$notindomain_errorpage ); exit; } if (eregi(”\r”,$val) || eregi(“\n”,$val)){ header( “Location: “.$notindomain_errorpage ); exit; } } //replace any underscores in the input names (PHP puts these in!) with spaces $key = str_replace(”“,” “,$key); //if the form item is called “subject” then set this as the subject line of the mail if ($key == “subject”){ $subject=$val; } else { if (is_array($val)){ $msg.=“Item: $key\n”; foreach($val as $v) $msg.=“ÊÊÊ$v\n”; } else { $msg.=”$key: $val\n"; } } } } //set up the default headers $headers = “”; //get the senders name (if specified) if ($HTTP_POST_VARS[“name”]){ $name = $HTTP_POST_VARS[“name”]; } else { $name = “”; } //get the senders email address (if specified) if (isset($HTTP_POST_VARS[“email”])){ $email = $HTTP_POST_VARS[“email”]; if (!preg_match('/^[a-zA-Z0-9.]+@[a-zA-Z0-9-.]+.[a-zA-Z]+(.[a-zA-Z]+)?$/', $email)){ header( “Location: “.$invalidaddress_errorpage ); exit; } } else { //the email is missing! //strip the domain from the address //www.domain.comdomain.com $theaddress = $HTTP_SERVER_VARS[‘SERVER_NAME’]; if (substr($theaddress,0,4) == “www.”){ $theaddress = substr($theaddress,4); } $email = “noreply@”.$theaddress; $msg.=”\n\n------------------------------------------------------------------”; $msg.=”\nPLEASE NOTE: This is a message from the “.$HTTP_SERVER_VARS[‘SERVER_NAME’].” web site"; $msg.=“\nand has been sent from a machine and not a person.”; $msg.=“\nPlease do not reply to this e-mail as it will bounce.”; $msg.=“\n------------------------------------------------------------------”; } $headers .= “From: $name <$email>\r\n”; $headers .= “Reply-To: $email\r\n”.“Return-Path: $email”; error_reporting(0); if (mail($recipient, $subject, $msg, $headers)){// header( "Location: ".$successpage ); } else { header( "Location: ".$server_errorpage ); } } } else { header( "Location: “.$server_errorpage ); } ?>”

What is this?

AlexH


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Alex,
That was much of the content of your -go.php file that the PHP
Feedback Form action creates and uses to process the form data for
you. If you are seeing this when you submit the form it looks a lot
like you are either running the form locally or that the server isn’t
processing PHP any more.
Make sure you are testing the pages on your server and that your host
hasn’t changed anything regarding your PHP setup. You can test that
the server is running PHP by creating a simple text file that contains;

<?php echo("PHP is running!"); ?>

Name this test.php and FTP this into your web space. If when you visit
this page online (http://www.mytestdomain.com/test.php for example)
you see the code rather than the text (PHP is running!) then you know
you need to speak to your host.
Regards,
Tim.

On 31 Oct 2009, at 21:39, AlexH wrote:

Have had this site running for 3+ years. Just made some changes for
new owners and am getting this error msg on Safari and Firefox (Mac)
works great in IE 8.

< lots of code here>

What is this?

FreewayActions.com - Freeware and shareware actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you Tim. The php must be running on the server since it works just fine on a separate (windows) machine. I do have Apache running on this machine would that interfere?

Alex

On 31 Oct 2009, 9:39 pm, AlexH wrote:

Have had this site running for 3+ years. Just made some changes for new owners and am getting this error msg on Safari and Firefox (Mac) works great in IE 8.

On 2 Nov 2009, 8:58 am, Tim Plumb wrote:

Hi Alex,
That was much of the content of your -go.php file that the PHP
Feedback Form action creates and uses to process the form data for
you. If you are seeing this when you submit the form it looks a lot
like you are either running the form locally or that the server isn’t
processing PHP any more.
Make sure you are testing the pages on your server and that your host
hasn’t changed anything regarding your PHP setup. You can test that
the server is running PHP by creating a simple text file that contains;

Name this test.php and FTP this into your web space. If when you visit
this page online (http://www.mytestdomain.com/test.php for example)
you see the code rather than the text (PHP is running!) then you know
you need to speak to your host.
Regards,
Tim.

On 31 Oct 2009, at 21:39, AlexH wrote:

Have had this site running for 3+ years. Just made some changes for
new owners and am getting this error msg on Safari and Firefox (Mac)
works great in IE 8.

< lots of code here>

What is this?

FreewayActions.com - Freeware and shareware actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Alex,
The code the action creates really works best in an Apache environment
and can often break when faced with one of the Windows server
variants. If you’ve got PHP running on trhe server with direct access
to Sindmal then you should be OK.
Regards,
Tim.

On 2 Nov 2009, at 20:51, AlexH wrote:

Thank you Tim. The php must be running on the server since it works
just fine on a separate (windows) machine. I do have Apache running
on this machine would that interfere?

Alex

FreewayActions.com - Freeware and shareware actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options