Martin1182
2 months ago
218
1
Laravel

File(storage/products/dummy/laptop-1.jpg) is not within the allowed path(s):

Posted 2 months ago by Martin1182

Hi, I'm getting the following error ... Don't know where the error might be?

Facade\Ignition\Exceptions\ViewException file_exists(): open_basedir restriction in effect. File(storage/products/dummy/laptop-1.jpg) is not within the allowed path(s): (/nfsmnt/:/data/:/usr/php74/:/usr/bin/:/apachetmp:/tmp/:/var/tmp/:/dev/urandom:/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/:/usr/local/bin/:/etc/ssl/certs/ca-certificates.crt) (View: /data/8/1/8120c1e3-a8d3-49dd-abe7-d9b8b3a41100/halaj.online/web/resources/views/product.blade.php)

function productImage($path)

{

    return $path && file_exists('storage/'.$path) ? asset('storage/'.$path) : asset('img/not-found.png');

}

Please sign in or create an account to participate in this conversation.