Re: [PHP-DEV] Getting separate outputs with Date Functions

2013-02-18 Thread Stas Malyshev
Hi! > echo date_create('@1361240634')->format('Y-m-d'); > // output: 2013-02-19 > > echo date('Y-m-d',1361240634); > // output: 2013-02-18 timestamp dates are created with UTC TZ, date() assumes your configured TZ. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (4

[PHP-DEV] Getting separate outputs with Date Functions

2013-02-18 Thread Raymond Irving
Hello, I'm getting two different values when I use a timestamp with the date_create() and date() functions: echo date_create('@1361240634')->format('Y-m-d'); // output: 2013-02-19 echo date('Y-m-d',1361240634); // output: 2013-02-18 Is this a known issue? My timezone setting is set to America/

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Rasmus Lerdorf
On 02/18/2013 06:14 PM, Stas Malyshev wrote: > Hi! > >> Yeah, but NFS, especially without the realpath cache, which you lose if >> you turn on open_basedir, is deathly slow because of all the stats. >> >> Typically PHP scripts are not actually "writable files" and the way to >> keep them in synch

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Stas Malyshev
Hi! > Yeah, but NFS, especially without the realpath cache, which you lose if > you turn on open_basedir, is deathly slow because of all the stats. > > Typically PHP scripts are not actually "writable files" and the way to > keep them in synch across multiple machines is to use a deploy > mechani

Re: [PHP-DEV] double val to long val conversion issue

2013-02-18 Thread Stas Malyshev
Hi! > If no one objects, I'll merge this into 5.5 and master: > > https://github.com/cataphract/php-src/compare/dval_to_lval Maybe add UNEXPECTED around the if condition? Since it's marked as zend_always_inline I imagine it's supposed to be performance-sensitive... Also, skip comments in tests

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Rasmus Lerdorf
On 02/18/2013 05:50 PM, Stas Malyshev wrote: > Hi! > >> Wow, people are still serving web files over NFS? Sounds painful. > > Sometimes, there's not much (better) choices if you need to keep > writeable files in sync over a number of machines. There are other > shared FSes but they would lead to

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Stas Malyshev
Hi! > Wow, people are still serving web files over NFS? Sounds painful. Sometimes, there's not much (better) choices if you need to keep writeable files in sync over a number of machines. There are other shared FSes but they would lead to pretty much the same issues. -- Stanislav Malyshev, Soft

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Kevin Yung
Hi Brendon, In our environment, we use NFS for shared storage, we are using APC as well with stat=0. In our setting, we also experiencing high number of stat() calls on our file system. My initial finding of this problem is we enabled the open_basedir setting. And there is already a bug report for

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Kevin Yung
Brendon, in our environment, we use NFS for shared storage, we are using APC as well with stat=0. In our setting, we are experiencing high number of stat() calls on the NFS. My initial finding of this problem is we enabled the open_basedir setting. And there is already a bug report for this, https:

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Terry Ellison
On 18/02/13 21:47, Brendon Colby wrote: On Mon, Feb 18, 2013 at 4:32 PM, Damien Tournoud wrote: Assuming that those are relative includes, can you try with: apc.canonicalize=0 apc.stat=0 Paths are absolute. stat=0 (and canonicalize=0 just to try it) produced the same result. Brendon

Re: [PHP-DEV] Zend Optimizer+ Source Code now available

2013-02-18 Thread André Rømcke
On Feb 18, 2013, at 23:03 , Christopher Jones wrote: > > > On 02/18/2013 10:52 AM, Christopher Jones wrote: > >> I agree that unless we get Gopal-like inspiration (inclued, scream) for >> naming, "opcache" is best. > > In the "so bad I can't resist sending it" category is today's > semi-hum

Re: [PHP-DEV] Zend Optimizer+ Source Code now available

2013-02-18 Thread Christopher Jones
On 02/18/2013 10:52 AM, Christopher Jones wrote: I agree that unless we get Gopal-like inspiration (inclued, scream) for naming, "opcache" is best. In the "so bad I can't resist sending it" category is today's semi-humorous name suggestion: "Cajun". It sounds roughly like the English pronu

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Brendon Colby
On Mon, Feb 18, 2013 at 4:32 PM, Damien Tournoud wrote: > Assuming that those are relative includes, can you try with: > > apc.canonicalize=0 > apc.stat=0 Paths are absolute. stat=0 (and canonicalize=0 just to try it) produced the same result. Brendon -- PHP Internals - PHP Runtime Develop

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Damien Tournoud
On Mon, Feb 18, 2013 at 10:03 PM, Brendon Colby wrote: > I tried apc.include_once_override - no change. I set up Apache to one > process and straced it. I clicked around on the site a few times and > see the typical pattern: > > open("[PATH]/CacheFile.class.php", O_RDONLY) = 10 > fstat(10, {st_mod

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Brendon Colby
On Mon, Feb 18, 2013 at 3:35 PM, Rasmus Lerdorf wrote: > On 02/18/2013 12:26 PM, Brendon Colby wrote: > >> Rasmus said: > Wow, people are still serving web files over NFS? Sounds painful. > > But, this is what APC's apc.include_once_override setting tries to > address. Try turning that on. Yep -

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Rasmus Lerdorf
On 02/18/2013 12:26 PM, Brendon Colby wrote: > Rasmus said: > > "Just because you see an open() syscall doesn't mean the cache isn't > used. The open() is there because PHP by default does open+fstat for > performance reasons. If you look carefully you will see there is just > an open() and no re

[PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Brendon Colby
Greetings, This seemed like the appropriate list to discuss this - let me know if it isn't. We have several Apache 2.2 / PHP 5.4 / APC 3.1.13 servers all serving mostly PHP over NFS (we have separate servers for static content). I have been trying to figure out why we're seeing so many getattr re

Re: [PHP-DEV] Zend Optimizer+ Source Code now available

2013-02-18 Thread Christopher Jones
On 02/16/2013 01:10 PM, Rasmus Lerdorf wrote: On 02/16/2013 11:16 AM, Zeev Suraski wrote: - Regarding name choice, here are some: ZopCache, Cachze, RunCachze. Interesting names, I'm curious about pronunciation :) I (mostly) pronounce cache the non-American way as "kaysh". Cachze would be

[PHP-DEV] short syntax for construction/initialization, named arguments and (future) annotations

2013-02-18 Thread Rasmus Schultz
This is a not a feature request, just a note on something that occurred to me. Since there is talk of native support for annotations again, it occurred to me that part of the problem that every userland implementation and proposed syntax deals with, along with native implementations in other langu