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. Problem is, I always get a Permission Denied error in FFmpeg when it attempts to get at the files within the folder. This is while being on Windows 7.
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. 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. 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'm at the end of my rope here. 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...
Please help me! :(
Update (Additional Points):
The error is through FFmpeg, not PHP. 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).
FFmpeg will execute just fine if it's run normally through the command line instead of through the script. However, this does not help the problem of me having to resize hundreds of photos by hand!
I'm just running this script in the normal terminal using the CLI engine. 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...
FFmpeg spits out the same error regardless of which PHP function is used to execute it. It happens for shell_exec, exec, passthru, and system.