Upload Nginx php-fpm

I get this error when trying to upload a file to Nextcloud

2016/12/07 14:28:17 [error] 5643#0: *137434 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class 'OC' not found in /media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/apps/files/ajax/upload.php on line 37" while reading response header from upstream, client: 192.168.1.102, server: , request: "POST /apps/files/ajax/upload.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/fpm-d4b65bbd-6560-4410-8da9-65e656db7a9f.sock:", host: "192.168.1.200:90"

This already happened.

But I can not solve it. Checked my Config multiple times… And even the linked config doesn’t work.

My config: Pastebin
It should be the one from docs if I remember correct.

Running NC 10.0.1
NC behind reverse proxy.
NC is working fine

Reverse Proxy config looks like this

location ^~ / {
   # Set max. size of a request (important for uploads to ownCloud)
   client_max_body_size 1G;

   #Besides the timeout values have to be raised in nginx' owncloud config, these values have to be raised for the proxy as well
   proxy_connect_timeout 300;
   proxy_send_timeout 300;
   proxy_read_timeout 300;
   send_timeout 300;

   proxy_set_header Host $host;
   proxy_set_header X-Real-IP $remote_addr;
   proxy_pass http://127.0.0.1:90;
   proxy_redirect off;
}

Since I couldn’t find any more hints, I just installed NC 11 RC1 and now my uploads are working!
Miracle…