ejay Posted June 6, 2012 Share Posted June 6, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/263774-strange-file-access-issue/ Share on other sites More sharing options...
requinix Posted June 6, 2012 Share Posted June 6, 2012 Just to be sure, what's the code around that call to file_exists()? Quote Link to comment https://forums.phpfreaks.com/topic/263774-strange-file-access-issue/#findComment-1351711 Share on other sites More sharing options...
ejay Posted June 6, 2012 Author Share Posted June 6, 2012 thanks for the quick reply. here's the code (I'm debugging atm) if (file_exists($thumb)) { echo "<pre>thumb exists</pre>"; } else { echo "<pre>thumb can not be accessed</pre>"; } and I always get "thumb can not be accessed" Quote Link to comment https://forums.phpfreaks.com/topic/263774-strange-file-access-issue/#findComment-1351714 Share on other sites More sharing options...
ejay Posted June 6, 2012 Author Share Posted June 6, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/263774-strange-file-access-issue/#findComment-1351730 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.