Opened 10 years ago

Closed 10 years ago

#630 closed defect (duplicate)

Regression: Blank page (zero-size response) with PHP FPM

Reported by: Dan Dascalescu Owned by:
Priority: blocker Milestone:
Component: nginx-core Version: 1.6.x
Keywords: Cc:
uname -a: Linux localhost 3.15.4-x86_64-linode45 #1 SMP Mon Jul 7 08:42:36 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.6.2
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.6.2/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1.6.2/debian/modules/nginx-dav-ext-module --add-module=/build/buildd/nginx-1.6.2/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.6.2/debian/modules/nginx-upstream-fair --add-module=/build/buildd/nginx-1.6.2/debian/modules/ngx_http_substitutions_filter_module

Description

With nginx 1.6.2, php5-fpm returns zero-byte responses, using the config file below. The error log doesn't show any errors, and the status code is 200 OK. Permissions are set correctly because the same PHP scripts are served correctly by older version of nginx, using the same config file.

server {
    server_name forum.quantifiedself.com;
    
    access_log /var/www/MyBB/logs/qsforum_mybb.access;
    error_log /var/www/MyBB/logs/qsforum_mybb.error error;

    root /var/www/MyBB;

    if ($request_uri ~* ^/index.php$) {
        rewrite ^(.*)$ / permanent;
    }

    location / {
        index index.php;
    }

    location ~* \.(ico|css|js|gif|png|jpe?g)$ {
        access_log off;
        expires max;
        break;
    }

    # pass the PHP scripts to the fpm FastCGI server listening by default on 127.0.0.1:9000
    location ~ \.php$ {
        if (!-f $request_filename) {
            return 404;
        }
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        # fastcgi_pass 127.0.0.1:9000;  # tried using TCP sockets - same bug
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        include fastcgi_params;
    }

If I keep this same config file and downgrading to 1.4.6 or 1.1.19, php5-fpm runs normally. This seems to be a critical regression bug that makes it impossible to use PHP CGI. I haven't seen anything relevant in http://nginx.org/en/CHANGES, and version 1.6.x is the latest in the ppa:nginx/stable repository.

Change History (1)

comment:1 by Valentin V. Bartenev, 10 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.