Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I purchased an unmanaged VPS today. I moved my website on over, and when I try to send an email. It returns a blank page. Not to mention I had to install PHP myself. Apache was there, for some reason, but PHP was installed using, "yum install php - so...I don't know if I'm missing a package or what.

I used, yum install sendmail* - but that didn't affect anything.

Here is a pastebin of my code:

Index.php http://pastebin.com/xxNdhUmC - Page with the form, stripped of unnecessary material.

Send.php http://pastebin.com/NjP0xZn9 - Supposed to send the mail, but get's stuck and returns blank page.

URL: www.jakeandersen.me

share|improve this question
have you tested to send a mail from the command line? f.e. echo " test " | mail -s "testmail from commandline" "your@address.com". also check the apache logs ( sometimes if apache returns a blank page this means an error occured) – Goez Aug 21 '12 at 7:20
@Goez Thanks for the quick reply. I can use the command: '/usr/lib/sendmail addr@host.tld' and it sends it, yes. I wouldn't know what log to check. I am a newb. :b – jdersen Aug 21 '12 at 7:27
in most unix distro's the logs are kept in /var/log. You will probably find a directory there "apache2" or "http". In that dir you will see access.log and error.log. It is the error.log that will contain the errors given by the webservers pages. Check that to see if everything is ok. You can 'follow' the logfile by using 'tail -f /var/log/http/error.log'. then go to the site and submit the form – Goez Aug 21 '12 at 7:53
It's likely that you'll need to configure sendmail first. Do yourself a favor and replace it with postfix, which is much easier to configure. – bahamat Aug 21 '12 at 19:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.