[英]apache prevents php mail() from working (no SELinux)
What's working and what's not: 什么有效,什么无效:
I have a custom sendmail wrapper script which only gets triggered by PHP-Cli but not when executing through Apache php_mod. 我有一个自定义的sendmail包装程序脚本,该脚本仅由PHP-Cli触发,而在通过Apache php_mod执行时则不会触发。
$ php mail.php
everything just works fine, mail() returns true. 当我运行$ php mail.php
一切正常,mail()返回true。 (php.ini) [mail function] mail.log = ...
file. 在这两种情况下,我都在(php.ini) [mail function] mail.log = ...
文件中得到一个条目。 The Question: 问题:
So how would I fix this? 那么我该如何解决呢? I want it to work through both PHP-Cli and Apache php_mod. 我希望它可以通过PHP-Cli和Apache php_mod一起工作。
The Setup: 设置:
sendmail_path
variable in the php.ini file to my custom wrapper script. 我将php.ini文件中的sendmail_path
变量设置为我的自定义包装脚本。 I do not run AppArmor. 我没有运行AppArmor。
PHP Version: 5.5.15 PHP版本:5.5.15
The Config: 配置:
Edit: 编辑:
As it stands the Apache has no access to the php.ini value of sendmail_path
, how would I fix this? 就目前而言,Apache无法访问sendmail_path
的php.ini值,我该如何解决?
The list of disable_functions
in my php.ini is empty. 我的php.ini中的disable_functions
列表为空。
Output of phpinfo()
on: phpinfo()
在以下位置的输出:
Sorry but I'm currently not allowed to use more than 2 links in my question. 抱歉,我目前不允许在我的问题中使用2个以上的链接。
“ mail”是否在php.ini的disable_functions列表中?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.