Hi Ido, I tried the same thing here. I tried it on 2 machines (CentOS 5.3 both of them).
In both cases, the first time it runs the script, it takes few seconds to "initialize" things, that takes 2-3 seconds, but after the 1st time, everything runs real fast.. Here's the result from my production server (it's a Pentium 4 machine): First time: $ time php test.php This is a test real 0m3.547s user 0m0.034s sys 0m0.021s Second time: $ time php test.php This is a test real 0m0.044s user 0m0.033s sys 0m0.011s I can see from the strace that it does check some config files like nsswitch.conf and DNS issues, but nothing more.. Hetz 2009/6/12 ik <ido...@gmail.com>: > Hello list, > > I have encountered today a weird problem with a CentOS 4.7 Final server. > > A cli based PHP script took a long time until it executed. Even code such as > : > > <? > echo "Hello World\n"; > ?> > > Took few minutes to execute. > > After doing some strace on php, I found out that it attempt to do resolving > for several addresses prior to executing the code. > > I can not reproduce it on any other Linux that I have tried to (Ubuntu, > debian and Arch Linux). > > Have anyone encountered such issue, and knows how to stop php from trying to > resolve things ? > > Thanks, > > Ido > > > http://ik.homelinux.org/ > > _______________________________________________ > Linux-il mailing list > Linux-il@cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > > -- Skepticism is the lazy person's default position. my blog (hebrew): http://benhamo.org _______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il