in reply to system call

Chances are that the httpd user doesn't have write permission for the directory where you try to create the file. You can either change permissions, or else look into suExec (if Apache httpd).

What does your error log say?

After Compline,
Zaxo