php-windows Digest 9 Jul 2013 17:54:29 -0000 Issue 4110

Topics (messages 31029 through 31037):

Re: Running more PHP-versions with php_opcache.dll
        31029 by: Jan Ehrhardt
        31030 by: Richard Quadling
        31031 by: Pierre Joye
        31032 by: Jan Ehrhardt
        31033 by: Jan Ehrhardt
        31034 by: Jan Ehrhardt
        31035 by: Jan Ehrhardt
        31036 by: Pierre Joye
        31037 by: Jan Ehrhardt

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
"Anatol Belski" in php.windows (Mon, 8 Jul 2013 18:54:30 +0200):
>You can try to run from another user account, then the mmap filename will
>change.

Just curious: how is this done on Linux? As far as I know both PHP's on
my Centos boxes run as the same user (the one as mod_php, the other as
mod_fcgid). Wouldn't it be possible to use the same solution as on Linux
in the Win-versions?

Jan

--- End Message ---
--- Begin Message ---
On 9 July 2013 06:21, Jan Ehrhardt <php...@ehrhardt.nl> wrote:

> "Anatol Belski" in php.windows (Mon, 8 Jul 2013 18:54:30 +0200):
> >You can try to run from another user account, then the mmap filename will
> >change.
>
> Just curious: how is this done on Linux? As far as I know both PHP's on
> my Centos boxes run as the same user (the one as mod_php, the other as
> mod_fcgid). Wouldn't it be possible to use the same solution as on Linux
> in the Win-versions?
>
> Jan
>

http://httpd.apache.org/docs/2.4/mod/mod_privileges.html seems to be a
suitable option.

-- 
Richard Quadling

--- End Message ---
--- Begin Message ---
hi Jan,

On Tue, Jul 9, 2013 at 7:21 AM, Jan Ehrhardt <php...@ehrhardt.nl> wrote:
> "Anatol Belski" in php.windows (Mon, 8 Jul 2013 18:54:30 +0200):
>>You can try to run from another user account, then the mmap filename will
>>change.
>
> Just curious: how is this done on Linux? As far as I know both PHP's on
> my Centos boxes run as the same user (the one as mod_php, the other as
> mod_fcgid). Wouldn't it be possible to use the same solution as on Linux
> in the Win-versions?

impersonation should solve this problem. I've to check if another
function(s) has to be used to get the impersonated user.

Cheers,
--
Pierre

@pierrejoye | http://www.libgd.org

--- End Message ---
--- Begin Message ---
Richard Quadling in php.windows (Tue, 9 Jul 2013 06:44:58 +0100):
>On 9 July 2013 06:21, Jan Ehrhardt <php...@ehrhardt.nl> wrote:
>
>> Just curious: how is this done on Linux? As far as I know both PHP's on
>> my Centos boxes run as the same user (the one as mod_php, the other as
>> mod_fcgid). Wouldn't it be possible to use the same solution as on Linux
>> in the Win-versions?
>
>http://httpd.apache.org/docs/2.4/mod/mod_privileges.html seems to be a
>suitable option.

Quote:
Available in Apache 2.3 and up, on Solaris 10 and OpenSolaris platforms

Neither for Linux nor for Windows...

Jan

--- End Message ---
--- Begin Message ---
Hi Pierre,

Pierre Joye in php.windows (Tue, 9 Jul 2013 07:46:48 +0200):
>impersonation should solve this problem. I've to check if another
>function(s) has to be used to get the impersonated user.

Please check it out.

I suppose I will not be the only one interested in running multiple
PHP's with OPcache on Windows, but a little background might come of
help.

On our Windows 2008 R2 servers we have a mixture of old Drupal6 and
newer Drupal7 sites. They need to be running on Windows, because we are
heavily using Windows Media Services to stream WMV-files.

For instance the Views module in Drupal6 is not prepared for PHP5.4+. It
runs but is generating numerous error messages. So we still need PHP 5.3
as long as we have not upgraded those sites (and that may be quite a
long time from now).

For our Drupal7 sites we want to switch to PHP 5.5 to benefit from the
increased speed and stability. For both PHP versions we are impressed by
the performance gain OPcache delivers. So there it is: how do we run PHP
5.3 with Opcache and PHP 5.5 with OPcache under the same Apache?

Jan

--- End Message ---
--- Begin Message ---
Jan Ehrhardt in php.windows (Tue, 09 Jul 2013 07:16:49 +0200):
>opcache.mmap_base
>
>Could this be a way out? It looks like this setting overrides the
>setting in ZendOPcache.MemoryBase. What I want is that the OPcache of
>PHP 5.5 does not share the memory with PHP 5.3. Can that be reached by
>setting one mmap_base to 20000000 and the other to 30000000 (or
>something like that). If you think this is possible, what would the
>settings be for opcache.mmap_base of both PHP instances?

Out of curiosity I tried a mod_php (5.4) with opcache.mmap_base=30000000
and a mod_fcgid PHP (5.5) with opcache.mmap_base=20000000. Did not make
any difference: PHP 5.5 reported an internal server error, according to
the event log due to a faulting php_opcache.dll.

Interestingly enough: when I deleted the ZendOPcache.MemoryBase-file and
rebooted the server a new file was created with the 30000000-value I had
used in the opcache.mmap_base setting. This offers some hope.
Apparently, you can change the mmap_base. Maybe the only problem with
this scenario is that both instances of php_opcache.dll need exclusive
rights tot the ZendOPcache.MemoryBase file.

Jan

--- End Message ---
--- Begin Message ---
Jan Ehrhardt in php.windows (Sun, 07 Jul 2013 22:41:12 +0200):
>I am having troubles configuring multiple PHP-versions, all running
>under Apache 2.4.4 with their own OPcache. My feeling at the moment is
>that under Windows you can only have one PHP instance with OPcache, but
>I would love to be contradicted.
>
>See this issue at github for details:
>https://github.com/zendtech/ZendOptimizerPlus/issues/109
>
>Did anyone succeed in running, for instance, PHP 5.3 with an OPcache and
>PHP 5.5 with OPcache?

Hopping back and forth between this list and github. I seem to have a
really ugly workaround now. I recompiled the x64 php_opcache.dll after
changing the semaphore file from ZendOPcache.MemoryBase into
ZendOPcache64.MemoryBase. That way it looks like it is possible to run a
x64 PHP 5.5 and a x86 PHP 5.3 besides each other, both with OPcaches.
read further on

https://github.com/zendtech/ZendOptimizerPlus/issues/109#issuecomment-20572357

At the moment I am testing this with my builds, but I will change it
into the official php.net shortly, because the PGO builds are about 10%
faster than my own.

Jan

--- End Message ---
--- Begin Message ---
On Tue, Jul 9, 2013 at 4:23 PM, Jan Ehrhardt <php...@ehrhardt.nl> wrote:
> Jan Ehrhardt in php.windows (Sun, 07 Jul 2013 22:41:12 +0200):
>>I am having troubles configuring multiple PHP-versions, all running
>>under Apache 2.4.4 with their own OPcache. My feeling at the moment is
>>that under Windows you can only have one PHP instance with OPcache, but
>>I would love to be contradicted.
>>
>>See this issue at github for details:
>>https://github.com/zendtech/ZendOptimizerPlus/issues/109
>>
>>Did anyone succeed in running, for instance, PHP 5.3 with an OPcache and
>>PHP 5.5 with OPcache?
>
> Hopping back and forth between this list and github. I seem to have a
> really ugly workaround now. I recompiled the x64 php_opcache.dll after
> changing the semaphore file from ZendOPcache.MemoryBase into
> ZendOPcache64.MemoryBase. That way it looks like it is possible to run a
> x64 PHP 5.5 and a x86 PHP 5.3 besides each other, both with OPcaches.
> read further on

> https://github.com/zendtech/ZendOptimizerPlus/issues/109#issuecomment-20572357

> At the moment I am testing this with my builds, but I will change it
> into the official php.net shortly, because the PGO builds are about 10%
> faster than my own.

You should use two php.ini instead. Or do you already use two inis?

--
Pierre

@pierrejoye | http://www.libgd.org

--- End Message ---
--- Begin Message ---
Hi Pierre,

Pierre Joye in php.windows (Tue, 9 Jul 2013 19:06:04 +0200):
>On Tue, Jul 9, 2013 at 4:23 PM, Jan Ehrhardt <php...@ehrhardt.nl> wrote:
>> Hopping back and forth between this list and github. I seem to have a
>> really ugly workaround now. I recompiled the x64 php_opcache.dll after
>> changing the semaphore file from ZendOPcache.MemoryBase into
>> ZendOPcache64.MemoryBase. That way it looks like it is possible to run a
>> x64 PHP 5.5 and a x86 PHP 5.3 besides each other, both with OPcaches.
>> read further on
>
>> https://github.com/zendtech/ZendOptimizerPlus/issues/109#issuecomment-20572357
>
>> At the moment I am testing this with my builds, but I will change it
>> into the official php.net  shortly, because the PGO builds are about 10%
                            /\
                         binaries
>> faster than my own.
>
>You should use two php.ini instead. Or do you already use two inis?

For what purpose should I use two php.ini's? For running two versions
with their own OPcache? That is what this whole discussion is about (and
can't be solved with just two ini's).

Or for switching between my own builds and the PGO-optimized versions
you and your team deliver? For switching between those 2 two php.ini's
will not do any good, because every file in my builds differ from what
can be downloaded from PHP.net. Even trivial things like the
snapshot.txt, but especially all the binaries. See
http://www.apachelounge.com/viewtopic.php?t=5423 for my builds.
ZIP-files of 35MB each for the x64 versions and about 30MB for the x85
builds.

At the moment I am uploading new x64-zip's, containing a php_opcache.dll
(from the unmodified GIT-head sources) and a php_opcache64.dll that is
using a differently named semaphore file. I will ask the Apachelounge
users to test if they can run a x86 PHP+OPcache together with a x64
PHP+OPcache as well. Om my development server drupal7 is now running
with PHP 5.5 and drupal6 with PHP 5.3. No problems thus far.

Jan

--- End Message ---

Reply via email to