php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65632 php ( CLI ) - 5-6 seconds execution time.
Submitted: 2013-09-08 01:41 UTC Modified: 2013-09-12 03:28 UTC
From: saleh at va dot com dot sa Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.5.3 OS: CentOS X86_64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: saleh at va dot com dot sa
New email:
PHP Version: OS:

 

 [2013-09-08 01:41 UTC] saleh at va dot com dot sa
Description:
------------
there is an execution delay ( 5 seconds ) when running PHP from the command 
line.
however this thing dose not happen on the Apache module.

PHP: 5.5.3 (latest)
OS: CentOS x86_64
Compile command:
========================
Configure Command =>  './configure'  '--with-apxs2' '--with-openssl' '--with-
pcre-regex' '--with-zlib' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--
with-curl' '--enable-exif' '--enable-ftp' '--with-gd' '--with-vpx-dir' '--with-
jpeg-dir' '--with-png-dir' '--with-xpm-dir' '--with-freetype-dir' '--with-t1lib' 
'--enable-gd-native-ttf' '--with-gettext' '--with-mhash' '--with-imap' '--with-
kerberos' '--with-imap-ssl' '--enable-intl' '--with-ldap' '--with-ldap-sasl' '--
enable-mbstring' '--with-mcrypt' '--with-mysql' '--with-mysqli' '--with-
unixODBC=/usr' '--enable-pcntl' '--with-pdo-mysql' '--with-libedit' '--with-
readline' '--enable-shmop' '--with-libxml-dir' '--with-snmp' '--enable-soap' '--
enable-sockets' '--with-tidy' '--enable-wddx' '--with-xmlrpc' '--with-iconv-dir' 
'--with-xsl' '--enable-zip' '--with-zlib-dir' '--with-pcre-dir' '--with-pear' '-
-with-libdir=lib64' '--enable-opcache=no'
========================

Test script:
---------------
<? echo "Test"; ?>

or just runing `php -v`

Expected result:
----------------
less than 1 secound execution time

Actual result:
--------------
5 seconds execution time

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-08 05:45 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2013-09-08 05:45 UTC] rasmus@php.net
That doesn't sound right. I see no such delay on Centos here. Could you please 
run this:

strace -Ff -tt -T -o out.txt php hello.php

And put out.txt somewhere we can see it? (it's going to be too long to paste into 
the bug report)
 [2013-09-08 17:45 UTC] saleh at va dot com dot sa
-Status: Feedback +Status: Open
 [2013-09-08 17:45 UTC] saleh at va dot com dot sa
http://vaiasa.com/out.txt

looks like php is trying to include libs that is not there!

note i compiled with -with-libdir=lib64
and all the required libs installed and php did not complie that its not found.
 [2013-09-08 18:32 UTC] saleh at va dot com dot sa
why is it connecting to my DNS server !

31769 20:37:22.164603 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 
<0.000030>
31769 20:37:22.164710 connect(3, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("192.168.1.3")}, 16) = 0 <0.000030>             
31769 20:37:22.164824 poll([{fd=3, events=POLLOUT}], 1, 0) = 1 ([{fd=3, 
revents=POLLOUT}]) <0.000026>
31769 20:37:22.164925 sendto(3, 
"wh\1\0\0\1\0\0\0\0\0\0\3lan\2va\3com\2sa\0\0\1\0\1", 31, MSG_NOSIGNAL, NULL, 0) 
= 31 <0.000037>
31769 20:37:22.165035 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 5000) = 1 
([{fd=3, revents=POLLOUT}]) <0.000024>      
31769 20:37:22.165132 sendto(3, 
"\314\33\1\0\0\1\0\0\0\0\0\0\3lan\2va\3com\2sa\0\0\34\0\1", 31, MSG_NOSIGNAL, 
NULL, 0) = 31 <0.000032>    
31769 20:37:22.165247 poll([{fd=3, events=POLLIN}], 1, 4999) = 1 ([{fd=3, 
revents=POLLIN}]) <0.000659>
31769 20:37:22.165991 ioctl(3, FIONREAD, [47]) = 0 <0.000027>
31769 20:37:22.166092 recvfrom(3, 
"wh\201\0\0\1\0\1\0\0\0\0\3lan\2va\3com\2sa\0\0\1\0\1\300"..., 2048, 0, 
{sa_family=AF_INET, sin_port=htons(53), sin_addr=i$
31769 20:37:22.166271 poll([{fd=3, events=POLLIN}], 1, 4998) = 1 ([{fd=3, 
revents=POLLIN}]) <3.723296>
 [2013-09-08 18:35 UTC] saleh at va dot com dot sa
problem FIXED by adding:

MyIP MyHostname

to: /etc/hosts

now the cli is working as usual.
 [2013-09-12 03:28 UTC] laruence@php.net
-Status: Open +Status: Not a bug
 [2013-09-12 03:28 UTC] laruence@php.net
close
 [2014-08-08 12:33 UTC] ondrej at mirtes dot cz
This has happened to me on Mac OS X too. It's caused by compiled-in IMAP extension. I don't consider this issue fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 14 19:01:35 2024 UTC