Bug #71796 [Opn->Fbk]: exec cant work when the cmd is too long
| From: | stas@php.net | Date: | Fri, 11 Mar 2016 18:37:56 +0000 |
| Subject: | Bug #71796 [Opn->Fbk]: exec cant work when the cmd is too long | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199761@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71796&edit=1
ID: 71796
Updated by: stas@php.net
Reported by: hehu2012 at gmail dot com
Summary: exec cant work when the cmd is too long
-Status: Open
+Status: Feedback
Type: Bug
-Package: PHP Language Specification
+Package: *General Issues
Operating System: Centos6.7 x86
PHP Version: 7.0.4
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-03-11 12:11:26] g dot sokol99 at g-sokol dot info
Do you use "ffmpeg" instead of "`fmpeg"?
------------------------------------------------------------------------
[2016-03-11 11:35:07] hehu2012 at gmail dot com
Description:
------------
I use
exec("`fmpeg -i
/var/www/ad-1/www/uploads/ad/v/5e/8f/98/88/5e8f98881c4da88fb31a1fe1b93c45d6.mp4 -y -f mjpeg -ss 3 -t
0.001 -s 640x1136
/var/www/ad-1/www/uploads/ad/v/5e/8f/98/88/5e8f98881c4da88fb31a1fe1b93c45d6.jpg")
in php file, it doesn't work. But I use
exec("whoami"), it work well.
When I use
fmpeg -i /var/www/ad-1/www/uploads/ad/v/5e/8f/98/88/5e8f98881c4da88fb31a1fe1b93c45d6.mp4 -y -f
mjpeg -ss 3 -t 0.001 -s 640x1136
/var/www/ad-1/www/uploads/ad/v/5e/8f/98/88/5e8f98881c4da88fb31a1fe1b93c45d6.jpg
in command line it work well. But when I use
exec("`fmpeg -i
/var/www/ad-1/www/uploads/ad/v/5e/8f/98/88/5e8f98881c4da88fb31a1fe1b93c45d6.mp4 -y -f mjpeg -ss 3 -t
0.001 -s 640x1136
/var/www/ad-1/www/uploads/ad/v/5e/8f/98/88/5e8f98881c4da88fb31a1fe1b93c45d6.jpg")
in php it doesn't work.
Test script:
---------------
exec("fmpeg -i /var/www/ad-1/www/uploads/ad/v/5e/8f/98/88/5e8f98881c4da88fb31a1fe1b93c45d6.mp4
-y -f mjpeg -ss 3 -t 0.001 -s 640x1136
/var/www/ad-1/www/uploads/ad/v/5e/8f/98/88/5e8f98881c4da88fb31a1fe1b93c45d6.jpg")
Expected result:
----------------
exec can work well when the cmd is long?
Actual result:
--------------
It return code 127
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71796&edit=1