PHP mail() doesn’t work . HestiaCP, exim4

21 декабря 2022 г.

php mailError when sending emails via php mail() in exim logs:

root@hostname:/var/log# tail -f /var/log/exim4/paniclog
2022-12-21 14:58:28 unable to set gid=1001 or uid=0 (euid=0): forcing real = effective
2022-12-21 15:11:14 unable to set gid=1001 or uid=0 (euid=0): forcing real = effective

That means to add user rights under UID=1000 (admin in HestiaCP) for mpm_prefork of the Apache module:

# vi /etc/apache2/mods-available/mpm_prefork.conf
<IfModule mpm_prefork_module>
  ......
        LimitUIDRange 0 1010
</IfModule>

Then restart Apache and Exim4
# systemctl restart exim4 apache2
Example for Ubuntu

Теги: рубрика PHP