I have put together a PHP Command-Line application and I am using exit(0) to shutdown application.
By the way, this command-line app is running on Windows 7.
When this app exits, it takes between 50-to-60 seconds for command prompt to return.
It is kind of embarrassing when demoing this app because it has the impression of hanging.
Is there any way that I can accelerate a PHP command-line app?
Thanks
Jeff in Seattle
exit(): Takes forever to shutdown PHP Command-Line app
Moderator: General Moderators
-
jeff00seattle
- Forum Commoner
- Posts: 66
- Joined: Sat Feb 28, 2009 3:27 pm
Re: exit(): Takes forever to shutdown PHP Command-Line app
How do you know it takes that long after exiting. More likely it's taking that long to execute.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
-
jeff00seattle
- Forum Commoner
- Posts: 66
- Joined: Sat Feb 28, 2009 3:27 pm
Re: exit(): Takes forever to shutdown PHP Command-Line app
I know I am at the end because I have an echo "Finished", then I stop-watch it.
However...
I did a php -m, and it also has a delay of 50-to-60 seconds, even after listing all the modules.
However...
I did a php -m, and it also has a delay of 50-to-60 seconds, even after listing all the modules.
Re: exit(): Takes forever to shutdown PHP Command-Line app
PHP 5.2? I have problems like that, but the delay is only a couple seconds.
I suspect it's an extension or three. Disable everything and see if that makes a difference.
I suspect it's an extension or three. Disable everything and see if that makes a difference.