convert using ffmpeg without exec

后端 未结 8 2278
北海茫月
北海茫月 2021-01-03 14:16

I have Windows XP, Apache, PHP 5.3 and ffmpeg working fine. I need to convert flv to avi or vice versa without using the exec() command. Is this possible?

8条回答
  •  我在风中等你
    2021-01-03 14:45

    Another option would be to utilize Suhosin. You could then at least limit where exactly the system call can from and in turn limit access to that directory.

    Here's an basic example of a vhost.conf config where shell_exec is blocked everywhere in your domain except ffmpeg-folder utilizing Suhosin

    
    ServerName your.server
    DocumentRoot "/var/your/public_html"
    php_admin_value suhosin.executor.func.blacklist "shell_exec, passthru, show_source, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
    
    
    php_admin_value suhosin.executor.func.blacklist "passthru, show_source, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
    
    
    

提交回复
热议问题