New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 5.5.6 CLI very slow #102

Closed
huckeduster opened this Issue Jan 3, 2014 · 22 comments

Comments

Projects
None yet
@huckeduster

huckeduster commented Jan 3, 2014

This could almost be a copy of issue #82. Details:

PHP version: 5.5.6
Mac OS X: 10.8.5

Problem:

Andre@macgyver~: time php -v
PHP 5.5.6 (cli) (built: Nov 14 2013 12:34:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.2, Copyright (c) 2002-2013, by Derick Rethans

real 0m5.052s
user 0m0.033s
sys 0m0.015s

I deactivated all extensions in /usr/local/php5/php.d, but still get this 5 seconds delay. Had this some time ago (probably with MAMP) and the solution was to deactivate the IMAP extension. But there is no IMAP extension to deactivate as far as I can see.

I don't know whether this is a cli only problem, cause I don't use builtin apache server.

@mbadolato

This comment has been minimized.

Show comment
Hide comment
@mbadolato

mbadolato Jan 8, 2014

Not seeing it here; default install.

PHP 5.5.6 (cli) (built: Nov 14 2013 12:34:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.2, Copyright (c) 2002-2013, by Derick Rethans

real    0m0.511s
user    0m0.019s
sys     0m0.037s

[camac01 mbadolato /usr/local master]$ time php -v
PHP 5.5.6 (cli) (built: Nov 14 2013 12:34:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.2, Copyright (c) 2002-2013, by Derick Rethans

real    0m0.029s
user    0m0.017s
sys     0m0.011s

mbadolato commented Jan 8, 2014

Not seeing it here; default install.

PHP 5.5.6 (cli) (built: Nov 14 2013 12:34:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.2, Copyright (c) 2002-2013, by Derick Rethans

real    0m0.511s
user    0m0.019s
sys     0m0.037s

[camac01 mbadolato /usr/local master]$ time php -v
PHP 5.5.6 (cli) (built: Nov 14 2013 12:34:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.2, Copyright (c) 2002-2013, by Derick Rethans

real    0m0.029s
user    0m0.017s
sys     0m0.011s
@huckeduster

This comment has been minimized.

Show comment
Hide comment
@huckeduster

huckeduster Jan 11, 2014

Switched to Homebrew. No issues there (their 5.5.7 version doesn't have imap compiled in by default, possibly a reason).

huckeduster commented Jan 11, 2014

Switched to Homebrew. No issues there (their 5.5.7 version doesn't have imap compiled in by default, possibly a reason).

@chregu

This comment has been minimized.

Show comment
Hide comment
@chregu

chregu Jan 12, 2014

Member

It sounds like a dns timeout issue somewhere.

I just uploaded PHP 5.5.8, maybe you can test if that solves the problem

Member

chregu commented Jan 12, 2014

It sounds like a dns timeout issue somewhere.

I just uploaded PHP 5.5.8, maybe you can test if that solves the problem

@huckeduster

This comment has been minimized.

Show comment
Hide comment
@huckeduster

huckeduster Jan 13, 2014

Just tried 5.5.8. Still the same, 5 seconds delay, going to try this on another mac this week too.

huckeduster commented Jan 13, 2014

Just tried 5.5.8. Still the same, 5 seconds delay, going to try this on another mac this week too.

@anthonybrown

This comment has been minimized.

Show comment
Hide comment
@anthonybrown

anthonybrown Jan 16, 2014

Working good for me

`PHP 5.5.8 (cli) (built: Jan 12 2014 18:50:29)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

real 0m0.378s
user 0m0.034s
sys 0m0.022s`

anthonybrown commented Jan 16, 2014

Working good for me

`PHP 5.5.8 (cli) (built: Jan 12 2014 18:50:29)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

real 0m0.378s
user 0m0.034s
sys 0m0.022s`

@huckeduster

This comment has been minimized.

Show comment
Hide comment
@huckeduster

huckeduster Jan 17, 2014

On another Mac (10.9, almost vanilla install) there are no problems. So I guess it's an issue with my development machine.

huckeduster commented Jan 17, 2014

On another Mac (10.9, almost vanilla install) there are no problems. So I guess it's an issue with my development machine.

@antonmedv

This comment has been minimized.

Show comment
Hide comment
@antonmedv

antonmedv Mar 14, 2014

I got same issue with php 5.5.8.

antonmedv commented Mar 14, 2014

I got same issue with php 5.5.8.

@ondrejmirtes

This comment has been minimized.

Show comment
Hide comment
@ondrejmirtes

ondrejmirtes Jul 21, 2014

Same issue here with PHP 5.5.9.

ondrejmirtes commented Jul 21, 2014

Same issue here with PHP 5.5.9.

@chregu

This comment has been minimized.

Show comment
Hide comment
@chregu

chregu Aug 7, 2014

Member

just installed 5.5.14 on a brand new machine (with 10.9), works fine works me

Member

chregu commented Aug 7, 2014

just installed 5.5.14 on a brand new machine (with 10.9), works fine works me

@zsalab

This comment has been minimized.

Show comment
Hide comment
@zsalab

zsalab Aug 8, 2014

It's really slow for me:
time /usr/local/php5/bin/php -v
PHP 5.5.15 (cli) (built: Aug 6 2014 18:11:54)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

real 0m30.050s
user 0m0.019s
sys 0m0.012s

zsalab commented Aug 8, 2014

It's really slow for me:
time /usr/local/php5/bin/php -v
PHP 5.5.15 (cli) (built: Aug 6 2014 18:11:54)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

real 0m30.050s
user 0m0.019s
sys 0m0.012s

@chregu

This comment has been minimized.

Show comment
Hide comment
@chregu

chregu Aug 8, 2014

Member

Still can't reproduce it.

Member

chregu commented Aug 8, 2014

Still can't reproduce it.

@ondrejmirtes

This comment has been minimized.

Show comment
Hide comment
@ondrejmirtes

ondrejmirtes Aug 8, 2014

I solved this issue in Homebrew version by recompiling PHP without the IMAP extension (by not using the --with-imap option)

ondrejmirtes commented Aug 8, 2014

I solved this issue in Homebrew version by recompiling PHP without the IMAP extension (by not using the --with-imap option)

@chregu

This comment has been minimized.

Show comment
Hide comment
@chregu

chregu Aug 9, 2014

Member

I managed to build the imap extension as shared extension now. It's already available for PHP 5.4 and OS X 10.8/9, maybe you could try this version, remove /usr/local/php5/php.d/50-extension-imap.ini and see if this helps.

Other builds will soon follow.

Member

chregu commented Aug 9, 2014

I managed to build the imap extension as shared extension now. It's already available for PHP 5.4 and OS X 10.8/9, maybe you could try this version, remove /usr/local/php5/php.d/50-extension-imap.ini and see if this helps.

Other builds will soon follow.

@chregu

This comment has been minimized.

Show comment
Hide comment
@chregu

chregu Aug 9, 2014

Member

the imap extension is now a shared extension in all builds. Download and disable it and see, if this helps

Member

chregu commented Aug 9, 2014

the imap extension is now a shared extension in all builds. Download and disable it and see, if this helps

@zsalab

This comment has been minimized.

Show comment
Hide comment
@zsalab

zsalab Aug 9, 2014

yes, without the imap module it's working fine....

zsalab commented Aug 9, 2014

yes, without the imap module it's working fine....

@chregu

This comment has been minimized.

Show comment
Hide comment
@chregu

chregu Aug 24, 2014

Member

so, it's some dns lookup thingie or something similar. Closing this, please open a new bug, if that's a real issue for you and just disabling imap doesn't solve your problem (but googling didn't bring me an easy solution)

Member

chregu commented Aug 24, 2014

so, it's some dns lookup thingie or something similar. Closing this, please open a new bug, if that's a real issue for you and just disabling imap doesn't solve your problem (but googling didn't bring me an easy solution)

@chregu chregu closed this Aug 24, 2014

@jaznow

This comment has been minimized.

Show comment
Hide comment
@jaznow

jaznow Dec 17, 2014

I have had same problem with MAMP, php 5.5.10, 5 second delay

time php -n -d extension=imap.so -v
PHP 5.5.10 (cli) (built: Apr 10 2014 17:49:22)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

real 0m5.131s
user 0m0.020s
sys 0m0.009s

Why the simple fact of loading the library takes 5 seconds?, isn't this a bug of PHP?, I need that extension, but I have to keep it desactivated in order to save that 5 seconds every time...

jaznow commented Dec 17, 2014

I have had same problem with MAMP, php 5.5.10, 5 second delay

time php -n -d extension=imap.so -v
PHP 5.5.10 (cli) (built: Apr 10 2014 17:49:22)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

real 0m5.131s
user 0m0.020s
sys 0m0.009s

Why the simple fact of loading the library takes 5 seconds?, isn't this a bug of PHP?, I need that extension, but I have to keep it desactivated in order to save that 5 seconds every time...

@mlebkowski

This comment has been minimized.

Show comment
Hide comment
@mlebkowski

mlebkowski Feb 17, 2015

Adding your hostname to /etc/hosts worked well for me:

::1             marakei.local
127.0.0.1       marakei.local

http://serverfault.com/questions/586141/php-cli-with-imap-5-second-startup-delay

mlebkowski commented Feb 17, 2015

Adding your hostname to /etc/hosts worked well for me:

::1             marakei.local
127.0.0.1       marakei.local

http://serverfault.com/questions/586141/php-cli-with-imap-5-second-startup-delay

@innoscience

This comment has been minimized.

Show comment
Hide comment
@innoscience

innoscience Feb 17, 2015

Can confirm that the solution indicated by @mlebkowski worked, your machine's current hostname should be added to the hosts file. You can also append to the existing entries:

 127.0.0.1  localhost iMac.local
 ::1        localhost iMac.local

innoscience commented Feb 17, 2015

Can confirm that the solution indicated by @mlebkowski worked, your machine's current hostname should be added to the hosts file. You can also append to the existing entries:

 127.0.0.1  localhost iMac.local
 ::1        localhost iMac.local
@jaznow

This comment has been minimized.

Show comment
Hide comment
@jaznow

jaznow Mar 2, 2015

Works for me too! :)

jaznow commented Mar 2, 2015

Works for me too! :)

@tamhv

This comment has been minimized.

Show comment
Hide comment
@tamhv

tamhv Sep 22, 2016

Thanks @innoscience it works!

tamhv commented Sep 22, 2016

Thanks @innoscience it works!

@vladprokopchuk

This comment has been minimized.

Show comment
Hide comment
@vladprokopchuk

vladprokopchuk Jul 6, 2017

vlad@MacBook-Pro-Vladimir /etc $ time php -v
PHP 7.1.6 (cli) (built: Jul 3 2017 08:34:33) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

real 0m5.039s
user 0m0.016s
sys 0m0.011s
vlad@MacBook-Pro-Vladimir /etc $

the same problem
adding 127.0.0.1 myhost.local to /etc/hosts file did not help
I installed php by homebrew and I really need IMAP extension

vladprokopchuk commented Jul 6, 2017

vlad@MacBook-Pro-Vladimir /etc $ time php -v
PHP 7.1.6 (cli) (built: Jul 3 2017 08:34:33) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

real 0m5.039s
user 0m0.016s
sys 0m0.011s
vlad@MacBook-Pro-Vladimir /etc $

the same problem
adding 127.0.0.1 myhost.local to /etc/hosts file did not help
I installed php by homebrew and I really need IMAP extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment