-
Chandini
BAD BOY
-
Posts: 61
Threads: 34
Joined: Dec 2014
Reputation:
0
02-14-2016, 11:26 PM
(This post was last modified: 02-14-2016, 11:28 PM by Chandini.)
This is My local Code is Working fine In Local
PHP Code: $ffmpeg = "C:/ffmpeg/bin/ffmpeg"; $videoFiles = "http://www.fdm.co.in/wannahelp/assets/chat_posts/sample.mp4"; $imageFile = "video_thumb/12.jpg"; $size = "120x90"; $getFromSecond = 5; $cmd = "$ffmpeg -i $videoFiles -an -ss $getFromSecond -s $size $imageFile"; if (!exec($cmd)) { echo "thumb created"; } else { echo "error getting"; }
This is My Server File In CI :
PHP Code: $ffmpeg = FCPATH.'assets/ffmpeg/bin/ffmpeg'; $videoFiles = FCPATH.'assets/chat_posts/sample.mp4'; $imageFile = "public_html/wannahelp/assets/chat_posts/siva.jpg"; $size = "120X90"; $getFromSecond = 5; $cmd = "$ffmpeg -i $videoFiles -an -ss $getFromSecond -s $size $imageFile"; //echo ini_get("disable_functions"); //exec($cmd); if(!exec($cmd)) { $s = "created"; }else { $s = "Not created"; }
Out put Getting Same In Local and Live But video Thumbanail Is Not created in live .... In localhost Thumbnail Is created & working Fine .. Help Me
Manikanta
-
Chandini
BAD BOY
-
Posts: 61
Threads: 34
Joined: Dec 2014
Reputation:
0
02-15-2016, 01:17 AM
(This post was last modified: 02-15-2016, 01:38 AM by Chandini.)
(02-15-2016, 12:17 AM)skunkbad Wrote: What happens if you run this:
PHP Code: $ffmpeg = FCPATH . 'assets/ffmpeg/bin/ffmpeg'; $videoFiles = FCPATH . 'assets/chat_posts/sample.mp4'; $imageFile = "public_html/wannahelp/assets/chat_posts/siva.jpg"; $size = "120X90"; $getFromSecond = 5;
$disabled_funcs = explode( ',', ini_get('disable_functions') ); if( ! in_array( 'exec', $disabled_funcs ) ) { try{ $cmd = "$ffmpeg -i $videoFiles -an -ss $getFromSecond -s $size $imageFile";
exec( $cmd, $output, $return_var );
var_dump( $output );
var_dump( $return_var ); } catch( Exception $e ){ $s = 'caught exception: ' . $e->getMessage(); } } else { $s = 'exec not available: not created'; }
Output :
array(0) {
}
int(127).
I am Getting Empty Result(Thumbmail Not Created) .. . exec Function Is Enabled In My Server ...
Manikanta
-
Chandini
BAD BOY
-
Posts: 61
Threads: 34
Joined: Dec 2014
Reputation:
0
(02-15-2016, 09:12 AM)skunkbad Wrote: You could prove exec function enabled:
If truly enabled, I don't know why you are having problems. Sorry.
I am Getting This Output
thumbcreation
Manikanta
-
skunkbad
Senior Citizen
-
Posts: 1,300
Threads: 63
Joined: Oct 2014
Reputation:
86
So, maybe the exec user does not have permissions that are adequate for creating images in the target directory. Try to run this:
Code: echo exec('whoami');
This will let you know the user and then compare that user to the directory permissions where the image is to be created. That's all I can think would be holding you back.
-
Chandini
BAD BOY
-
Posts: 61
Threads: 34
Joined: Dec 2014
Reputation:
0
(02-16-2016, 12:19 AM)skunkbad Wrote: So, maybe the exec user does not have permissions that are adequate for creating images in the target directory. Try to run this:
Code: echo exec('whoami');
This will let you know the user and then compare that user to the directory permissions where the image is to be created. That's all I can think would be holding you back.
I am getting My domain name : fdm
Manikanta
|