Hi Stephane, Are you sure that the env[TMP], env[TMPDIR] and env[TEMP] variables are supposed to be relative to the real system root, or relative to the chroot? If I were to guess, I would bet that php is trying to create a file after chrooting itself, and inside the chroot, /var/www/tmp doesn't exist. Try setting those env vars to /tmp and see if that works.
Todd On Tue, Jul 25, 2017 at 09:03:38AM +0200, Stephane HUC "PengouinBSD" wrote: > Hi all. > > I have this error on my,OpenBSD server (6.1) : > > FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: Unable to > create temporary file, Check permissions in temporary files directory. > in Unknown on line 0 > > I use nginx+php70_fpm ! > > The php-fpm.conf for the instance: > > **** file *** > [blog.stephane-huc.net] > prefix = /var/www > > user = user_blog > group = www > > listen.owner = www > listen.group = www > listen.mode = 0660 > > listen = run/php-fpm.$pool.sock > listen.allowed_clients = 127.0.0.1 > > chroot = $prefix > chdir = / > > env[HOSTNAME] = $HOSTNAME > ;env[PATH] = /usr/local/bin:/usr/bin:/bin > env[TMP] = /var/www/tmp > env[TMPDIR] = /var/www/tmp > env[TEMP] = /var/www/tmp > > php_admin_value[upload_tmp_dir] = /tmp > php_admin_value[upload_max_filesize] = 8M > *** EOF *** > > Rights on /var/www/tmp: > > $ ls -al /var/www/ > > > total 68 > drwxr-xr-x 17 root daemon 512 Jul 5 04:59 ./ > drwxr-xr-x 25 root wheel 512 Jul 5 19:50 ../ > drwxr-xr-x 10 www daemon 512 Jul 9 10:31 .ht/ > drwxr-xr-x 11 root daemon 512 Jul 9 10:31 acme/ > drwxr-xr-x 2 root daemon 512 Jun 25 13:51 bin/ > drwx-----T 16 www daemon 512 Jul 9 10:31 cache/ > drwxr-xr-x 2 root daemon 512 Apr 1 21:38 cgi-bin/ > drwxr-xr-x 10 root daemon 512 Jul 9 10:31 conf/ > drwxr-xr-x 3 root daemon 512 Jun 25 13:48 etc/ > drwxr-xr-x 12 root daemon 512 Jul 9 10:29 htdocs/ > drwxr-xr-x 2 root daemon 512 Jun 24 22:59 html/ > drwxr-xr-x 11 root daemon 1024 Jul 23 00:00 logs/ > drwxr-xr-x 2 root daemon 512 Jun 28 18:11 modules/ > drwxr-xr-x 11 root daemon 1024 Jul 25 08:39 run/ > drwxr-xr-x 10 www www 2048 Jul 9 10:31 tmp/ > drwxr-xr-x 3 root daemon 512 Jun 24 20:44 usr/ > drwxr-xr-x 3 root daemon 512 Jun 24 21:17 var/ > > > where is the problem? > > > -- > ~ " Fully Basic System Distinguish Life! " ~ " Libre as a BSD " +=<<< > ---- > <me>Stephane HUC as PengouinBSD or CIOTBSD</me> > <mail>[email protected]</mail> >

