HELP!! PHP Forms send blank emails after migrating servers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dpuerto
Forum Newbie
Posts: 2
Joined: Fri Sep 01, 2006 9:21 am

HELP!! PHP Forms send blank emails after migrating servers

Post 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!!!!
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post 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
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post 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
dpuerto
Forum Newbie
Posts: 2
Joined: Fri Sep 01, 2006 9:21 am

Post 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...
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

register_globals.... look it up and start guessing ;)
Post Reply