Usernamex235 0 Junior Poster in Training

Hi All, thanks in advance for any replies.

Environment: PHP5, MySQL, Windows XP/Server 2000/Server 2003.

Problem: Using shell_exec to run a small program connected to a database, waiting for it to finish and then outputting a file which was produced.

All was fine until I got a new and larger database, now my script will run for 10+ minutes before timing out when it hangs on the shell_exec function. Until the timeout, I can see a new instance of CMD.exe appear as expected.

Yet when I run the exact same command (referenceing the same database) manually in a command prompt window, the command finishes successfully in seconds. Yet the shell_exec function never completes, instead timing out, or in some cases completeing but taking much much longer.

Can anyone offer some advice as to how I can make shell_exec take a similar time to run a command as an actual command prompt window? Cheers