I can't send emails from PHP, but it works from the command line

ramz

New member
Joined
Dec 11, 2015
Messages
2
Hello. I've been struggling with this for more than one week and I'm not able to solve it.

I migrated my site from a shared hosting to a VPS. It runs CentOS 6 and the MTA is Exim. I can send perfectly from any email client, as Thunderbird or Apple Mail. The problem is when I try to send an email from PHP. It always returns false. I've tried it with different PHP scripts that were working before. The current one is the most simple mail example.

From the unix command line I can send emails. I can also connect by telnet to ports 25 and 465.

I have a SSL certificate and I configured it in the main exim configuration file. It's the only modification that I have done to that file.
In the exim log, located in /var/log/exim/main.log it only shows:

HTML:
2015-12-11 20:37:20 Failed to get user name for uid -1

In the panic.log it shows exactly the same information

If I change the Webuzo setting to suPHP it works, but I need to keep using Apache 2.0.

Could you help me with this please?

Thanks in advance.
 
I finally contacted to my hosting company. They have solved it switching the PHP handler to suPHP. Also they detected that the problem was with the mod_ruid module. They commented the lines 'RMode stat' and 'RUidGid r' on the file /usr/local/apps/apache/etc/conf.d/webuzoVH.conf and now it was perfectly.
 
Back
Top