i got it working already, but my problem now is how will i save it to the database?
On Oct 23, 3:04 pm, Alexandre SALOME <alexandre.sal...@gmail.com> wrote: > You should isolate your system call, for example making an interfaced class > : > > class myShell > { > public function execute($command) > { > // your stuff > } > > } > > And use this class to make some actions, for example logging the command > before executing. > > Check what command is executed, check the return values, etc. > > Read the doc :http://fr.php.net/manual/fr/function.exec.php > > Use the 2nd and 3rd argument to retrieve output & return code, make some > var_dump. Your method code should look like this : > > $this->log("Executing command $command"); > exec($command, $returnValue, $returnCode); > $this->log("Return code : $returnCode"); > $this->log("Output : ".implode("\n", $returnValue)); > > Tell us output and return code. > > Alexandre > > 2009/10/23 mel_06 <06melc...@gmail.com> > > > > > > > i'm just new to symfony, i'm having trouble with using ffmpeg on > > symfony. i just modified this code which work properly on code igniter > > framework for symfony. but it doesn't save the 10sec audio file on the > > directory path? and i need to save this as well to the database? > > > here's my code: > > > public function executeIndex($request) > > > { > > $this->form = new WebsiteForm(); > > if ($request->isMethod('post')) > > { > > $this->form->bind($request->getParameter('website'), $request- > > >getFiles('website')); > > > if ($this->form->isValid()) > > { > > > $file = $this->form->getValue('file'); > > > $filename = 'uploaded_'.sha1($file->getOriginalName()); > > $extension = $file->getExtension($file->getOriginalExtension > > ()); > > $file->save(sfConfig::get('sf_upload_dir').'/'.$filename. > > $extension); > > > $uploaded = $this->form->save(); > > > $ffmpegPath = 'c:\wamp\bin\ffmpeg\bin\ffmpeg.exe'; > > $sourcePath = > > sfConfig::get('sf_upload_dir').'/'.$uploaded->getFile > > ();; > > $destinationPath = sfConfig::get > > ('sf_upload_dir').'/'.'_preview'.$uploaded->getFile();; > > > if ( $this->form->getValue('streamtype') == '10' ) { > > > exec($ffmpegPath.' -i '.$sourcePath.' -t 10 -acodec copy '. > > $destinationPath); > > > unlink($sourcePath); > > > ($destinationPath, sfConfig::get('sf_upload_dir').$filename. > > $extension); > > > } > > > $this->redirect('website/show?id='.$uploaded->getId()); > > > } > > } > > } > > > i would really appreciate some help. thanks guys! > > -- > Alexandre Salomé -- alexandre.sal...@gmail.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---