0

I upgrade my ubuntu server from 14.04 to 16.04. A few of the packages like:

  • php
  • nginx
  • mysql

were updated, I have a small site running on there which was working fine. I was first receiving a 502, which has been corrected as php5 was removed and php-fpm is now php7.0-fpm.

However all I see now is a blank page. I have looked at the nginx error logs but there is nothing to indicate an error. Nor is there an error in the php7.0-fpm log.

I added a test.php to echo a simple value out but that also shows a blank page. It looks like php is not being invoked.

I have updated the /etc/php/7.0/fpm/poo.d/www.conf to listen on: localhost:9000 The nginx config for my site has not changed.

Any thoughts on where it maybe going awry?

Edit 1:

Enabled access logs via /etc/php7/fpm/pool.d/www.conf and can see requests are being sent to fpm:

127.0.0.1 - 15/Jan/2017:14:38:53 +0000 "- " 200 127.0.0.1 - 15/Jan/2017:14:39:13 +0000 "- " 200 127.0.0.1 - 15/Jan/2017:14:39:27 +0000 "- " 200 

Edit 2:

Running:

php index.php 

Does render the site from the terminal. So it is not a php incompatibility issue

4
  • A blank page is usually a php error. Look at your error log, turn on or increase error reporting if nessecary. Commented Jan 15, 2017 at 19:42
  • Most probably your php scripts use functions that have been deprecated for years and have been removed in php7. Commented Jan 15, 2017 at 19:43
  • @gerald-scheider According to wordpress's site, wordpress is compatible with php7 Commented Jan 16, 2017 at 3:53
  • Error logs are clear, I have turned up the error logging as well. I think I saw a config setting where you could dump the error in the browser. Might be easier to diagnose that way Commented Jan 16, 2017 at 3:54

1 Answer 1

0

Found the issue. Not sure what version of nginx was previously installed, but I had the following in my /etc/nginx/sites-enabled/wordpress server:

location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass localhost:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_read_timeout 300; fastcgi_buffer_size 128k; fastcgi_buffers 256 16k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } 

And changed to:

location ~ \.php$ { include snippets/fastcgi-php.conf; # With php7.0-cgi alone: fastcgi_pass 127.0.0.1:9000; } 

Wordpress now rendering

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.