[SOLVED] php takes almost 3 seconds to start from command line
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
try ' strace php -v ', maybe you'll find some hints from output
didn't have strace - I installed it - however it just flings a bunch of stuff on the screen that's not STDOUT so I'm not sure if it's output or errors within that utility.
didn't have strace - I installed it - however it just flings a bunch of stuff on the screen that's not STDOUT so I'm not sure if it's output or errors within that utility.
GG
I hoped it would have give hints at the moment when it hangs, but it seems michaelk helped better to narrow the origin of problem
There are two php.ini files, one for the web server and one for the command line interpreter. Is this something that recently happened or is this the first time you have tried running a php script from the command line?
Does it exist i.e /etc/php5/cli/php.ini?
You can view the CLI configuration via the following command which might help point you in the correct direction.
There are two php.ini files, one for the web server and one for the command line interpreter. Is this something that recently happened or is this the first time you have tried running a php script from the command line?
Does it exist i.e /etc/php5/cli/php.ini?
You can view the CLI configuration via the following command which might help point you in the correct direction.
php -i
no, it's been happening all along - I never really thought it was an issue, until I loaded WAMP and noticed it didn't have the delay.
My .ini in at /etc/php.ini
Nothing gets flagged in the error files or the system logs
I may start commenting out things I don't use....only keeping mysql - no mssql, sybase, postgres, etc.
I compared the two .ini files between the other server, and nothing was really different
If not, I'll have to start with a fresh .ini and add things in until it slows up.....
backup, copy php.ini file to another place
remove half of the php.ini file, test php cli...
If it hangs, setting problem is in this half of file content, else it's in the other half in that later case replace php.ini content with the removed settings using backup copy
repeat removing half of settings until you narrow it down
backup, copy php.ini file to another place
remove half of the php.ini file, test php cli...
If it hangs, setting problem is in this half of file content, else it's in the other half in that later case replace php.ini content with the removed settings using backup copy
repeat removing half of settings until you narrow it down
This was very effective - narrowed it down in under 5 minutes!
It's seems to:
[browscap]
browscap = /etc/browscap.ini
I have one program (a web program) that uses get_browser, which also always seems to have this delay which I could never figure out....hmmmm
May have to rethink if I need this functionality.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.