Advertisement

05.06.2008 at 09:23AM PDT, ID: 23379995
[x]
Attachment Details

Use Ajax to execute server-side PHP script

Asked by marcparillo in Asynchronous Javascript and XML (AJAX), PHP Scripting Language, JScript

Tags: PHP Ajax

Is it possible to use Ajax to call a PHP script that uses the exec() command to run some server-side command and then wait for the exec() command to finish processing before sending the result back to the Ajax/JavaScript function?

I'm using this in connection with ffmpeg to create video files.

The trouble I'm having is that the exec command for ffmpeg could take up to 15-30 seconds to finish.  I've tried using a synchronous ajax call but it's not working correctly... so I guess I need to know if it's even possible and then maybe get an example.

Thanks,
$marcStart Free Trial
 
Keywords: Use Ajax to execute server-side PHP …
 
Loading Advertisement...
 
[+][-]05.06.2008 at 09:37AM PDT, ID: 21508792

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 10:02AM PDT, ID: 21509020

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Asynchronous Javascript and XML (AJAX), PHP Scripting Language, JScript
Tags: PHP Ajax
Sign Up Now!
Solution Provided By: rowejd
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.06.2008 at 10:03AM PDT, ID: 21509033

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628