Jump to content

Strange file access issue


ejay

Recommended Posts

Hello,

I'm having a very strange issue which i'm unable to identify/resolve.

 

I'm extracting an image using ffmpeg using following command

$source = '/home/test1/abc.mov';
$thumb = '/home/test1/thumb.jpg';
system('ffmpeg -i "' . $source . '" -ss 6 -vcodec mjpeg -f image2 -s 180x100 ' . $thumb);

This piece of code works fine and I can see the file, thumb.jpg, in the FTP fine. But if I run a

file_exists($thumb);

right after the above piece of code, PHP can't find the file. The image is created as is a valid jpg file (displays fine if downloaded via FTP)

I'm able to access all other files in '/home/test1/' directory using file_get_contents(); and file_exists() without any issues.

Any help would be appreciated.

thanks

 

Link to comment
https://forums.phpfreaks.com/topic/263774-strange-file-access-issue/
Share on other sites

Ok I got it resolved. It had nothing to do with ffmpeg.

Originally the "$thumb" and "$source" strings were different than my original post. The string were in following form (notice the quotes)

//original dev's code format
$source = '"/home/test1/abc.mov"';
$thumb = '"/home/test1/thumb.jpg"';

Something on the server got updated (by admins) and the code stopped working :|

 

I hope it helps somebody somehow.

thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.