Page 1 of 1

HELP!! PHP Forms send blank emails after migrating servers

Posted: Fri Sep 01, 2006 9:23 am
by dpuerto
http://www.sitepoint.com/forums/showthr ... ost3023560



We have hundreds of PHP forms which are now inactive which we believe to be the result of migrating our websites from one server to another.

They are currently running the same versions of PHP however the original O/S was Redhat (linux kernal 3.2.3-20) and now the sites are deployed on Fedora Core 4.

The form sends, however there is not any information. They are simple forms which had been working before the server migration such as:

{



$email = "Name:\t$faq_name\nPhone Number:\t$faq_phonenumber\nEmail:\t$faq_email\nProblem location:\t$faq_location\nDescription:\t$faq_description\nComments:\t$faq_comm ents\n\n";

$to = "test@test.com";

$subject = "Problem with the Building Request Form";

mail($to, $subject, $email);

include("thanks.php");

}


Any ideas?!? All questions, comments, suggestions, fixes greatly appreciated!!!

HELP!!!!

Posted: Fri Sep 01, 2006 9:25 am
by malcolmboston
first things first:

1) error_reporting (E_ALL); at top of script
2) Confirm with your host that the mail () function is setup correctly

Posted: Fri Sep 01, 2006 9:27 am
by Todd_Z
I believe if you can use the linux command mail successfully, you will be able to use mail() in your php script

Test that out, and I'm sure it'll spit out the problem if it doesn't work

Posted: Fri Sep 01, 2006 9:41 am
by dpuerto
Okay, I wasn't clear I guess... It sends mail, but where the text box is the users input is not sent... it has worked this way for 2 years no problems until now... we have changed our O/S and servers...

Posted: Fri Sep 01, 2006 11:43 am
by Chris Corbyn
register_globals.... look it up and start guessing ;)