Open supertorpez opened 6 years ago
I'm having the same Problem
After a bit of hacking.... commented out line 178 in PHPExcel/shared/file.php and lo the file is written. // use ordinary built-in PHP function // There should be no problem with the 5.2.4 Suhosin realpath() bug, because this line should only // be called if we're running 5.2.1 or earlier //myhack // Running PHP 7.0.24 and receiving Error 'File(/tmp) is not within the allowed path(s)' // Commented out the following line and the Error disappears.... why? Who knows. //return realpath(sys_get_temp_dir());
The real cause of the Problem: temp_dir not set in php.ini. If you have no access to php.ini you can try to set the variable on runtime with putenv('TMPDIR=/foo/bar'); (Works only if php not in safe mode)
How i can solve this problem??
File(/tmp) is not within the allowed path(s)
Thanks