简体   繁体   中英

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. The last time I touched it was two days ago... it all worked then.

Today, phpinfo() is causing a 503 Service Temporarily Unavailable error. 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). But as soon as I add phpinfo() to show up as the first thing in the <body> block... I get the error.

I've even tried creating a one-line file: <?php phpinfo(); ?> <?php phpinfo(); ?> This dies with a 503 error, too.

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 :

I've restarted Apache and Nginx with no errors. Does anyone have an idea about what service or some such might have died on my machine to cause this?

NGINX Config File

#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

(ie a Fast CGI configuration issue?)

I solved this by logging into 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).

After a re-start, phpinfo() worked fine. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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