tags:

views:

20

answers:

1

The PHP function tempnam is failing to create a temporary file in the directory i'm passing to the function and falling back to /tmp/

I have error reporting turned on but no errors are actually being thrown, what should i check?

Thanks.

+1  A: 

Make sure the directory is writable by the appropriate user. If you're doing this on a web server, it's the web server user: www or apache or whatever.

Scott Saunders
this is on an ubuntu web server - the directory is currently set to the ftpuser, i've tried switching to nobody:nobody which is what i have used on other servers and i get `chown: invalid user nobody:nobody`
seengee
just realised it needs to be www-data - d'oh
seengee