Fuxi
Fuxi

Reputation: 7599

php - php Thumb file not writeable

i'm using ffmpeg for extracting a video frame from which i want to create a thumbnail using php thumb. creating the video frame works, but when trying to save the thumbnail file (under a different name - same directory) i'm getting this error:

PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'File is not writeable, and could not correct permissions: d:/Webs/bla.jpg' in D:\Webs\phpThumb\lib\GdThumb.inc.php:656

it can't be a permission problem as i can already store the videoframe into the same folder.

any ideas what could be wrong?

Upvotes: 0

Views: 1251

Answers (1)

Rick de Graaf
Rick de Graaf

Reputation: 958

I had the same issue. I solved it with saving the file with document_root:

$phpthumb->adaptiveResize(100, 100)->save($_SERVER["DOCUMENT_ROOT"].'/public/uploads/thumbs/filename.jpg');

Found the answer in this question: https://stackoverflow.com/a/17684098/317326

Upvotes: 1

Related Questions