Weird behaviour with sendmail, Apache and PHP
I've installed sendmail with
apt-get install sendmail
It installed without any problems and auto-configured everything.
The weirdness starts here. I've created a simple php file to test it.
The contents are as follows:
Now, the mail successfully arrives at the destination, no problem there. But the php script never gets terminated. It just keeps running and running until the process is automatically killed. Then the page displays a "500 Internal Server Error".
I do know a few things about sendmail, but never encountered an error like this before. Any ideas? Thanks!
1 Reply
The problem was that I haven't set an FQDN (Fully Qualified Domain Name) in /etc/hosts. The file's first two lines were like this:
127.0.0.1 localhost
127.0.0.1 [your host name]
I've changed it to this:
127.0.0.1 localhost localhost.localdomain [your host name]
127.0.0.1 [your host name]
Then I've executed sendmailconfig and voila! Everything worked flawlessly!