简体   繁体   English

phpinfo()导致503服务暂时不可用错误

[英]phpinfo() causing 503 service temporarily unavailable error

I'm experiencing the weirdest problem. 我遇到了最奇怪的问题。 I've been working on a file upload problem for the last few days and have been using phpinfo() to track changes to INI settings. 最近几天,我一直在处理文件上传问题,并一直在使用phpinfo()来跟踪对INI设置的更改。 The last time I touched it was two days ago... it all worked then. 我最后一次触摸是在两天前...那时一切正常。

Today, phpinfo() is causing a 503 Service Temporarily Unavailable error. 今天, phpinfo()导致503服务暂时不可用错误。 Here's the weird part: the website works fine! 这是很奇怪的部分: 网站运行良好! I's PHP + MySQL driven and I can move around in it just fine (well... other than the issues I'm working on). 我是PHP + MySQL驱动的,我可以在其中移动(嗯...除了我正在研究的问题以外)。 But as soon as I add phpinfo() to show up as the first thing in the <body> block... I get the error. 但是,一旦我添加phpinfo()来显示为<body>块中的第一件事……我得到了错误。

I've even tried creating a one-line file: <?php phpinfo(); ?> 我什至尝试创建一个单行文件: <?php phpinfo(); ?> <?php phpinfo(); ?> This dies with a 503 error, too. <?php phpinfo(); ?>这也死于503错误。

The error log contains this: 错误日志包含以下内容:

[Fri Sep 15 14:22:31.192593 2017] [proxy_fcgi:error] [pid 2695] (104)Connection reset by peer: [client 67.161.220.240:44230] AH01075: Error dispatching request to : [2017年9月15日星期五14:22:31.192593] [proxy_fcgi:错误] [pid 2695](104)对等方重置连接:[客户端67.161.220.240:44230] AH01075:错误地将请求分发给:

I've restarted Apache and Nginx with no errors. 我已经重新启动了Apache和Nginx,没有任何错误。 Does anyone have an idea about what service or some such might have died on my machine to cause this? 是否有人对我的计算机上的哪种服务或某些服务可能死掉有任何想法?

NGINX Config File NGINX配置文件

#user  nginx;
worker_processes  1;

#error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

#pid        /var/run/nginx.pid;

include /etc/nginx/modules.conf.d/*.conf;

events {
    worker_connections  1024;
}


http {
include       mime.types;
default_type  application/octet-stream;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';

#access_log  /var/log/nginx/access.log  main;

sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;
#tcp_nodelay        on;

#gzip  on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";

server_tokens off;

include /etc/nginx/conf.d/*.conf;
}

# override global parameters e.g. worker_rlimit_nofile
include /etc/nginx/*global_params;

Is it possible that this is the problem: Apache, FastCGI - Error 503 这是否可能是问题所在: Apache,FastCGI-错误503

(ie a Fast CGI configuration issue?) (即快速CGI配置问题?)

I solved this by logging into PLESK. 我通过登录PLESK解决了这个问题。 I went to Tools & Settings -> Services Management. 我去了工具和设置->服务管理。

Then I restarted PHP-FPM 5.6.33 service (this may vary depending on the version of PHP you are running). 然后,我重新启动了PHP-FPM 5.6.33服务(这可能取决于您所运行的PHP版本)。

After a re-start, phpinfo() worked fine. 重新启动后, phpinfo()工作正常。 I'm not sure what the issue was. 我不确定是什么问题。 As you experienced, my website was working fine but it may have been causing other issues I'm not aware of. 如您所见,我的网站运行正常,但是可能导致了其他我不知道的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM