- 积分
- 18
- 威望
-
- 金钱
-
- 注册时间
- 2017-6-10
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2017-6-15 15:05:00
|
显示全部楼层
原帖由 licess 于 2017-6-15 14:06 发表
开php-fpm慢日志和错误日志看一下
php-fpm 日志
[15-Jun-2017 14:57:39] WARNING: [pool www] child 28550, script '/home/wwwroot/rainknowfirst/phpmailer/index.php' (request: "GET /phpmailer/index.php") executing too slow (122.529232 sec), logging
[15-Jun-2017 14:57:39] NOTICE: child 28550 stopped for tracing
[15-Jun-2017 14:57:39] NOTICE: about to trace 28550
[15-Jun-2017 14:57:39] NOTICE: finished trace of 28550
[15-Jun-2017 14:58:13] WARNING: [pool www] child 28550, script '/home/wwwroot/rainknowfirst/phpmailer/index.php' (request: "GET /phpmailer/index.php") execution timed out (155.863062 sec), terminating
[15-Jun-2017 14:58:13] WARNING: [pool www] child 28550 exited on signal 15 (SIGTERM) after 166.671172 seconds from start
[15-Jun-2017 14:58:13] NOTICE: [pool www] child 28553 started
慢日志:
[15-Jun-2017 14:57:39] [pool www] pid 28550
script_filename = /home/wwwroot/rainknowfirst/phpmailer/index.php
[0x00007f4b8e572620] stream_socket_client() /home/wwwroot/rainknowfirst/phpmailer/class.smtp.php:294
[0x00007f4b8e571288] connect() /home/wwwroot/rainknowfirst/phpmailer/class.phpmailer.php:1660
[0x00007f4b8e570208] smtpConnect() /home/wwwroot/rainknowfirst/phpmailer/class.phpmailer.php:1540
[0x00007f4b8e56fcb0] smtpSend() /home/wwwroot/rainknowfirst/phpmailer/class.phpmailer.php:1335
[0x00007f4b8e56faa8] postSend() /home/wwwroot/rainknowfirst/phpmailer/class.phpmailer.php:1213
[0x00007f4b8e56f628] send() /home/wwwroot/rainknowfirst/phpmailer/index.php:32
好像是说 stream_socket_client() 这个函数连不上 smtp 服务器。默认php.ini 里的 disable_functions 里有这个函数。
我从里面删除后,重启 php-fpm 测试还是不行?看到一篇文章好像很符合我的情况 http://www.linuxdiyf.com/linux/26343.html
可是lnmp1.4下找不到相应的目录。军哥能帮忙看看吗?还有用官方 stream_socket_client() 例子试了,这个函数可以正常工作。但是连接 smtp 就是不行。
[ 本帖最后由 linda89757 于 2017-6-15 17:14 编辑 ] |
|