Sites not sending email unless php-fpm is enabled?

ttremain

Well-Known Member
Feb 16, 2003
279
6
168
cPanel Access Level
Root Administrator
Strange thing.

Multiple sites stopped sending emails. An example error message from WP and Gravity forms was "WordPress was unable to send the notification email. Could not instantiate mail function." This goes away if php-fpm is enabled on the account.

Some setting I'm missing somewhere?

A secondary issue, is if we need PHP-FPM it seems it can only be enabled from root WHM. cPanel users show the option crossed out.

So many problems I'm seeing with PHP-FPM, it doesn't sound worth the headache, but right now we have a headache without it.
 

ttremain

Well-Known Member
Feb 16, 2003
279
6
168
cPanel Access Level
Root Administrator
info page, and other PHP content, yes...

WordPress appears to be working but then cannot send the email, and sticks it in a PHP based queue instead.
 
Last edited:

ttremain

Well-Known Member
Feb 16, 2003
279
6
168
cPanel Access Level
Root Administrator
Do you happen to have a file at /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml on the server?
<code>
---
php_admin_flag_allow_url_fopen: 'off'
php_admin_flag_log_errors:
present_ifdefault: 0
php_admin_value_disable_functions: exec,passthru,shell_exec,system
php_admin_value_doc_root:
present_ifdefault: 0
php_admin_value_error_log:
present_ifdefault: 0
php_admin_value_short_open_tag:
present_ifdefault: 0
php_flag_log_errors:
name: php_flag[log_errors]
present_ifdefault: 1
value: 'on'
php_value_doc_root:
name: php_value[doc_root]
present_ifdefault: 1
value: "\"\""
php_value_error_log:
name: php_value[error_log]
present_ifdefault: 1
value: "[% homedir %]/logs/[% scrubbed_domain %].php.error.log"
php_value_error_reporting: E_ALL & ~E_NOTICE
php_value_short_open_tag:
name: php_value[short_open_tag]
present_ifdefault: 1
value: 'off'
pm_max_children: 5
pm_max_requests: 20
pm_process_idle_timeout: 10

</code>
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,307
2,440
363
cPanel Access Level
Root Administrator
Just for fun, can you rename that file so it can't be read by the system, restart the service, and see if that gets the mail working?

Code:
mv /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml.bak
/scripts/restartsrv_apache_php_fpm