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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.