Forum


Replies: 2   Views: 3227
Php sys_get_temp_dir issue
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by New Zeal  · 29-08-2011 - 02:58

Hi,

This is a fantastic script. Easy to implement and works well. However on our linux server we had a problem with the use of php sys_get_temp_dir() in the createDocx class in which $this->_tempFile was coming back empty. Easily solved by inserting our own temp file solution.

I notice at php.net (http://php.net/manual/en/function.sys-get-temp-dir.php) there are one or two comments regarding this:

This function does not account for virtualhost-specific modifications to the temp path and/or open_basedir.

Maybe a different implementation to that in the class would cover more server configs..

Posted by admin  · 11-04-2013 - 12:13

Hello,

Thanks for the info, we'll check this possible issue. In getTempDir method we check for sys_get_temp_dir function, if it doesn't exist we call getenv.

Regards.