
09-05-2011, 07:54 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,295
|
|
Code:
~>man mkstemp
MKSTEMP(3) Linux Programmer's Manual MKSTEMP(3)
NAME
mkstemp - create a unique temporary file
SYNOPSIS
#include <stdlib.h>
int mkstemp(char *template);
DESCRIPTION
The mkstemp() function generates a unique temporary filename from template. The last six characters of template must be
XXXXXX and these are replaced with a string that makes the filename unique. The file is then created with mode read/write
and permissions 0666 (glibc 2.0.6 and earlier), 0600 (glibc 2.0.7 and later). Since it will be modified, template must
not be a string constant, but should be declared as a character array. The file is opened with the open(2) O_EXCL flag,
guaranteeing that when mkstemp() returns successfully we are the only user.
the error message
Code:
2011-09-05 13:20:35.444 [STDERR] Failed to create temp file with mkstemp(): Permission denied
should be from Zend Pdf library, since it looks mkstemp() is not a php function, but a C function.
it depends on the value of variable "template". assume it's "a.XXXXXX". then temporary file will be created at current working directory, not /tmp/. for more information, please check what user lsphp is running as, and the location of the php scripts and the directory permission.
|