Jump to content

system(), exec() and passthru() taking > 10 seconds to execute


tbare

Recommended Posts

Hey, all... Hoping someone can point me in the direction to get this script to execute a little quicker (looking for several seconds to be shaved).

 

I've got a script that takes info from a form, dumps into a DB, then runs a shell command (custom app) that takes the info from the DB, puts it into a specific (and different for each client) spreadsheet, gets some other values, and puts those in the database.

 

When i execute the command from a cmd prompt, it finishes in less than a second. However, when I run it from PHP, it takes anywhere from 9 - 15 seconds to get to the next page.

 

I've watched it in task manager, and the file i'm running is open for "what appears to be" the entire length of time before the results page appears (although, i realize that technically it's not).

 

why could it be taking so much longer from PHP than it does from the CLI? can you think of a way to get it to run quicker?

 

I don't think it's a PHP coding issue, but more of a permissions issue, but I can't think of anything else to try at this point...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.