


It happens for shell_exec, exec, passthru, and system.If you were to look up FFmpeg, short for Fast Forward MPEG, you would find out that it's actually one of the most powerful video-audio converters out there. Weird use for PHP, I know, but since I already knew how to work with FFmpeg in PHP (but in Linux!) so I figured I might as well use the code as a normal, stand-alone program.įFmpeg spits out the same error regardless of which PHP function is used to execute it. I'm just running this script in the normal terminal using the CLI engine. However, this does not help the problem of me having to resize hundreds of photos by hand! FFmpeg spits out the permission denied error, the script just continues doing what it does normally (or, at least, it would if it weren't for my die statement that kicks in in the event of FFmpeg failing).įFmpeg will execute just fine if it's run normally through the command line instead of through the script. All I want to do is resize images quickly and automatically so I can put them up on my website, yet this has been a massive headache. I keep searching and searching for a solution, but all of the sites keep throwing out the same things over and over again - things that I've already tried multiple times. I've changed the settings in Avast!, did the attrib command (both as normal and "Run as Administrator") to unmark as read-only, took ownership of the folder both via command line and using that GUI takeown context menu thing everyone keeps throwing around (obviously before my efforts to mark everything as not-read-only), messed with permissions, everything. The big problem is that I've tried every solution that keeps popping up on the interwebs when I search for how to fix it. Problem is, I always get a Permission Denied error in FFmpeg when it attempts to get at the files within the folder.

I have a command-line PHP script that, when given the folder name as an argument when executing the script, will find all images in said folder and resize them using FFmpeg.
