yock Posted September 8, 2009 Share Posted September 8, 2009 I am running an exec() function which calls FFmpeg to run through converting a video, which it does successfully. A problem I am running into is on certain servers a mysql_query which follows right after exec does not run. Somehow skips it. Any suggestions here? I have included the portion of code i'm referring to. //Convert Video exec("".$ffmpeg_path." -pass 1 -passlogfile ".$logfile." -i ".$video_embed." -y -f flv -ar 44100 -ab 128 -ac 1 -acodec mp3 -deinterlace -nr 500 -me_range 20 -b 350k ".$video_full_min.".flv"); exec("".$ffmpeg_path." -pass 2 -passlogfile ".$logfile." -i ".$video_embed." -y -f flv -ar 44100 -ab 128 -ac 1 -acodec mp3 -deinterlace -nr 500 -me_range 20 -b 350k ".$video_full_min.".flv"); check_online($fifteen_thumb, $video_online, $video_id); check_online function //check for thumbnail 15 - if no thumb declare video in error, else declare video ok function check_online($fifteen_thumb, $video_online, $video_id){ if(!file_exists($fifteen_thumb)) { $video_online = 'E'; } if( $video_online == 'S' ){ $video_online = 'N'; } elseif ( $video_online == 'E' ){ $video_online = 'E'; } else { if($video_date <= $date_today){ $video_online = 'Y'; } else { $video_online = 'F'; } } mysql_query("UPDATE bls_posts SET online = '$video_online' WHERE ID = '$video_id'"); } Thanks. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted September 8, 2009 Share Posted September 8, 2009 First off, change exec to shell_exec, or you might start to run into problems later. Second, have you checked if the correct values are getting passed to your check_online() function? Quote Link to comment Share on other sites More sharing options...
yock Posted September 8, 2009 Author Share Posted September 8, 2009 First off, change exec to shell_exec, or you might start to run into problems later. Second, have you checked if the correct values are getting passed to your check_online() function? Yeah I actually tried the check_online function further up in the app and it works perfectly. I will swap out exec for shell_exec, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.