JamesHeinrich / phpThumb

phpThumb() - The PHP thumbnail generator
Other
315 stars 141 forks source link

Failure on Symbolic folder/link issue on 1.7.16 #176

Closed kenliefl-hm closed 3 years ago

kenliefl-hm commented 3 years ago

I tried the latest version 1.7.16, everything is fine but not work for symbolic folder or file e.g. an symbolic folder "/files2/" which is symlink from "/test_image/", and I place the image (e.g. test.jpg) into "documents" both are accessible on public url (mydomain.com/files2/test.jpg and mydomain.com/test_image/test.jpg) but phpthumb only work on the true one, but not /files2/

From the debug, below is observed

Unable to create image, neither filename nor image data suppplied in SourceImageToGD() [4013] in file "phpthumb.class.php" on line 4269

kenliefl-hm commented 3 years ago

Finally, I just set $PHPTHUMB_CONFIG['allow_src_above_docroot'] to be true, and now it is working on linux centos But the interested thing is the default is false, and running well in local windows env with xamp,