I am fighting with 500 errors. help me!

Hi!
Owncloud does not support php version 7.2 and the update is too slow to move to Nextcloud.

However, I can not log in to Nextcloud after installation.

My installation environment is
Nginx v1.11.5 + php 7.2.0-dev + Zend Engine v3.2.0-dev + mysqld v10.0.29-MariaDB

When I try to log in, I get 500 error message.

My Nginx Virtual Config

upstream php-handler {
  server 127.0.0.1:9000;
#server unix:/var/run/php5-fpm.sock;
}
server {
	listen 80;
	server_name my-address.com;
    return 302 https://$server_name$request_uri;
}

server {
  listen 443 ssl http2;
  server_name my-address.com;
  root /Private-Path/nextcloud/;

  include /usr/local/nginx/conf/taking-ssl_include.conf;  

# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this topic first.
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;

# set max upload size
client_max_body_size 10G;
fastcgi_buffers 64 4K;

location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
}

# Disable gzip to avoid the removal of the ETag header
   gzip off;

  rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
  rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
  rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;

	# Only use index.php for the index page
	index index.php;

	# Use pretty error pages
  error_page 403 /core/templates/403.php;
  error_page 404 /core/templates/404.php;

  access_log /Private-Path/log/nextcloud_access.log combined buffer=32k;
  error_log /Private-Path/log/nextcloud_error.log;
 
	# Main location block
	# Most requests will fall into this block
	location / {
#try_files $uri $uri/ index.php;
		rewrite ^ /index.php$uri;
#		try_files $uri/ $uri /index.php?$query_string;
	}

  location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
	  return 404;
  }
  location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
     return 404;
  }	
  
	# Pass PHP files to PHP-FPM for processing
	location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
		include fastcgi_params;
		fastcgi_split_path_info ^(.+\.php)(/.*)$;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	    fastcgi_param PATH_INFO $fastcgi_path_info;
		fastcgi_param HTTPS on;	
    	fastcgi_param modHeadersAvailable true;
		fastcgi_param front_controller_active true;
		fastcgi_pass php-handler;
		fastcgi_request_buffering off;
	    fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
    
	}
  location ~ ^/(?:updater|ocs-provider)(?:$|/) {
      try_files $uri $uri/ =404;
      index index.php;
  }

    # Adding the cache control header for js and css files
    # Make sure it is BELOW the PHP block
    location ~* \.(?:css|js)$ {
        try_files $uri /index.php$uri$is_args$args;
        add_header Cache-Control "public, max-age=7200";
        add_header Strict-Transport-Security "max-age=15552000; includeSubDomains; preload;";
        add_header X-Content-Type-Options nosniff;
        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Robots-Tag none;
        add_header X-Download-Options noopen;
        add_header X-Permitted-Cross-Domain-Policies none;
        # Optional: Don't log access to assets
        access_log off;
    }

    location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
        try_files $uri /index.php$uri$is_args$args;
        # Optional: Don't log access to other assets
        access_log off;
    }	
  
  #include /usr/local/nginx/conf/staticfiles.conf;
  include /usr/local/nginx/conf/php.conf;
  #include /usr/local/nginx/conf/drop.conf;
  #include /usr/local/nginx/conf/errorpage.conf;
  #include /usr/local/nginx/conf/vts_server.conf;
}

error log

bump ! :sweat:

I am not sure if nextcloud supports/works with PHP7.2. Does somebody else get this running successfully?

oh my god…
Do not support nextcloud php 7.2 version?

I would not wonder, at least in some configurations. As far as I can see PHP7.2 is still in beta phase everywhere. PHP7.1 also has still issues in rare cases. I personally use PHP7.0 which perfectly works.

@michalng Thank you very much.
Upon hearing MichaIng’s advice, I downgraded my PHP version to 7.0.0.
And I was able to run Nextcloud normally!

Thank you !