PHP Mail function fails after I upgrade my Debian
web server to jessie
. The software versions are,
Apache2 : 2.4
Php : 5.6
Exim4: 4.8
This web server has multiple websites and I use libapache2-mpm-itk
module to run php by different users for each website. So www-data
is not used.
I get below error when try to send emails using php mail function.
unable to set gid=33 or uid=0 (euid=0): forcing real = effective
Sendmail path is,
sendmail_path /usr/sbin/sendmail -t -i
and it points to exim,
/usr/sbin/sendmail -> exim4
I found a solution from http://blog.gaiterjones.com/send-php-mail-ubuntu-upgrade/ and issue resolved when I set below setting with itk
module,
LimitUIDRange 0 2000
But allowing to root
user is not recommended for shared server like mine.
Is there a better solution?
EDIT: I found an unresolved bug report of this. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797653
Thank you!