Can't write image data to path
any ide haw to fix?
Code:
Can't write image data to path (/var/www/html/public/files/img/user.png) {"userId":3,"exception":"[object] (Intervention\\Image\\Exception\\NotWritableException(code: 0): Can't write image data to path (/var/www/html/public/files/img/user.png) at /var/www/html/vendor/intervention/image/src/Intervention/Image/Image.php:143) |
Verify if you have the folder /var/www/html/public/files/img/ , and make sure you have write permission 755.
|
not work just try!
|
this should work write permission 0777 as 0755 not work
|
/var/www/html/vendor/intervention/image/src/Intervention/Image/Image.php
edit this file change this : if (is_null($path)) { throw new Exception\NotWritableException( "Can't write to undefined path." ); } $data = $this->encode(pathinfo($path, PATHINFO_EXTENSION), $quality); $saved = @file_put_contents($path, $data); if ($saved === false) { throw new Exception\NotWritableException( "Can't write image data to path ({$path})" ); } // set new file info $this->setFileInfoFromPath($path); return $this; }` to this : $pathInfo = pathinfo($path); $data = $this->encode($pathInfo['extension'], $quality); if(!\File::exists($pathInfo['dirname'])){ \File::makeDirectory($pathInfo['dirname']); } |
not work 777 and 755 !
laraval logo: Code:
[stacktrace] |
i would look for something else as this not good for u.. the host not good
|
not work 777 and 755 !
laraval logo: The error is not from laravel script itself,it is from a third party module in this case 'Intervention/image' edit the code in the image.php. |
just tryt dont work! i got same error!
Quote:
|
Quote:
public function save($path = null, $quality = null, $format = null) to: public function save($path = null, $quality = null) |
All times are GMT +2. The time now is 00:53. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.