image upload empty file, open_basedir restriction
-
If I upload an image to a gallery using the latest version of nextgen-gallery (2.0.40) it succeeds without any error, but the resulting image file at the server is empty (0 bytes).
Looking at the php_errors.log reveals:[10-Dec-2013 10:40:34 UTC] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: open_basedir restriction in effect. File(C:\Windows\Temp\phpEDD9.tmp) is not within the allowed path(s): (C:\Windows\TEMP;C:\Web;C:\Program Files (x86)\hMailServer\PHPWebAdmin) in C:\Web\<domain>\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_data\class.ngglegacy_gallerystorage_driver.php on line 224 [10-Dec-2013 10:40:34 UTC] PHP Warning: file_get_contents(C:\Windows\Temp\phpEDD9.tmp) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: Operation not permitted in C:\Web\<domain>\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_data\class.ngglegacy_gallerystorage_driver.php on line 224 [10-Dec-2013 10:40:35 UTC] PHP Warning: Division by zero in C:\Web\<domain>\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_data\class.gallerystorage_driver_base.php on line 963 [10-Dec-2013 10:40:35 UTC] PHP Warning: imagecreatetruecolor() [<a href='function.imagecreatetruecolor'>function.imagecreatetruecolor</a>]: Invalid image dimensions in C:\Web\<domain>\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_data\class.ngglegacy_thumbnail.php on line 567 [10-Dec-2013 10:40:35 UTC] PHP Warning: imagecopyresampled() expects parameter 1 to be resource, boolean given in C:\Web\<domain>\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_data\class.ngglegacy_thumbnail.php on line 1026
I’f just replaced the actual domain name with <domain> as a place holder.
It looks lige the plugin first tries to store the upload to C:\Windows\Temp and will move them to the blogdir afterwards. But the error message “open_basedir restriction in effect. File(C:\Windows\Temp\phpEDD9.tmp) is not within the allowed path(s): (C:\Windows\TEMP;C:\Web;C:\Program Files (x86)\hMailServer\PHPWebAdmin)” is obviously wrong because “C:\Windows\Temp” is part of the allowed paths. I also tried adding “C:\Windows\Temp” to open_basedir just to exclude case sensitivity. But it doesn’t help.
Environment: Windows 2008 Server R2, PHP 5.3.27.
Any ideas what’s wrong here?
- The topic ‘image upload empty file, open_basedir restriction’ is closed to new replies.