glide icon indicating copy to clipboard operation
glide copied to clipboard

file_exists(): open_basedir restriction in effect.

Open jorenvh1 opened this issue 8 years ago • 2 comments

Hey

I'm using glide to do some image manipulations on an uploaded image (with laravel glide). When testing locally, everything works but when we deploy to a combell shared hosting, I get the following error: file_exists(): open_basedir restriction in effect. File(/data/sites/web/XXXXXX/tmp/phpmkV0Wn/f1b906abc87cd37f44c511f8dd7acc88) is not within the allowed path(s): (/data/sites/web/XXXXXX:/usr/local/php-7.1/lib/php:/usr/bin:/tmp:/data/vendor-scripts:/data/sites/web/disabled:/etc/ssl/certs)

I guess this is trying to check if the file exists in the tmp folder. The problem is that it starts from the basepath, which we don't have access to. The root of our shared hosting in this case is 'XXXXXX'

Any way we can fix this?

jorenvh1 avatar Jun 03 '17 11:06 jorenvh1

Please review: https://github.com/thephpleague/glide/issues/186

This will be fixed in the future.

drhino avatar Jun 04 '17 10:06 drhino

Thanks, i tried the changes made in #165 and set the tmp dir. The problem is that is always throws me the error. XXX is not a local directory...

How would I go about setting the tmp directory to, let's say a laravel project's root folder '/tmp' ?

jorenvh1 avatar Jun 04 '17 11:06 jorenvh1