Bug #73885 [Nab]: Fatal Error Unable to write base address C:\windows\\ZendOPcache.MemoryBase@...

From: Date: Sun, 12 Feb 2017 21:09:24 +0000
Subject: Bug #73885 [Nab]: Fatal Error Unable to write base address C:\windows\\ZendOPcache.MemoryBase@...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207304@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73885&edit=1

 ID:                 73885
 Updated by:         ab@php.net
 Reported by:        caaguado at xcentra dot com
 Summary:            Fatal Error Unable to write base address
                     C:\windows\\ZendOPcache.MemoryBase@...
 Status:             Not a bug
 Type:               Bug
 Package:            opcache
 Operating System:   Windows 7 to 10
 PHP Version:        7.1.0
 Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

It is not a bug in PHP, please configure Apache to pass the tmp dir as it's documented on the
linked documentation page.

Thanks.


Previous Comments:
------------------------------------------------------------------------
[2017-02-12 20:37:03] caaguado at xcentra dot com

Hi, close the ticket, but this is a PHP 7.1 bug... and a very poor way of closing the bug report.
Thanks.

------------------------------------------------------------------------
[2017-02-12 19:34:48] ab@php.net

Closing, as it's clearly something about the configuration on the level upper to PHP.

Thanks.

------------------------------------------------------------------------
[2017-02-07 00:26:12] ab@php.net

Thanks for the further comment. Here's a quote from https://httpd.apache.org/docs/2.4/env.html

==============================
First, there are the environment variables controlled by the underlying operating system. These are
set before the server starts. They can be used in expansions in configuration files, and can
optionally be passed to CGI scripts and SSI using the PassEnv directive.
==============================

There is no PassEnv directive in your Apache config, this has hardly to do something with PHP.
Either this or explicitly SetEnv will set the CGI vars. I haven't worked with CGI for edges,
but specifically looked up this doc page for you :) Hopefully any similar tickets can be avoided if
this one is found. Apache won't propagate the system environment, it is the default
crossplatform behavior. An Apache distribution on Linux is pre configured and is integrated with the
OS, so it is easy. Under Windows, having the documentation at hand is often necessary to achieve
even simple things.

Thanks.

------------------------------------------------------------------------
[2017-02-06 21:04:36] caaguado at xcentra dot com

Sorry, but don't you think this is a bit too little to say about the problem? CGI or not, the
fact is that PHP 7.1 seems to not deal well with this environment propagation in Apache,
doesn't it?

Can you retrieve any recommended Apache configuration settings from the old PHP 5.5 bug report that
you mentioned, both for CGI and/or FastCGI, so I can try troubleshooting a bit more for you?

Thank you!

------------------------------------------------------------------------
[2017-01-13 01:16:36] ab@php.net

Thanks for the further feedback, @caaguado. It is not, that a similar issue were not reported
earlier, I remember some already in the times of PHP 5.5. However it was always possible to solve
this with the corresponding general setup. Furthermore, I recall it was tricky to reproduce it (and
indeed newer was) on any environments i were able to debug on. So it is not 7.1, for one.

Regarding the functionality currently used, https://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx
. Please check the remarks section. Obviously Apache misses the environment, so then the last
possibility is used to set tmp dir to c:\windows. If you were running it as FCGI, I would have
linked you to the FcgidInitialEnv directive, to set the corresponding env var. Unfortunately,
it's quite far from the days I used CGI pure last time :), so please lookup the corresponding
Apache configuration yourself. AFAIR, Apache doesn't always automatically propagate the
environment. I also guess, that mod_cgi is rarely touched nowadays, as the usage of CGI itself is
rare. 

Frankly, in first place it makes not much sense to use shared memory for pure CGI. As soon as your
server runs idle, you it'll lose all the shared memory cache. The first request after idle will
have to populate the cache again and again. For CGI, more suitable were IMO using file cache only,
which would be in any case persistent across requests, though some slower. Or even, why not FCGI? In
7.1 it can be even decoupled from the actual server through TCP, as PHP_FCGI_CHILDREN is supported.

Regarding the other ticket you linked - I gave feedback there already. The base address file is
required only once at the process start. There is a lot of possibilities to run PHP, IMHO it would
be inconvenient to fix issues by putting workarounds, if they are solvable by the proper DevOp
operation otherwise. Of course there are workarounds, nothing is without it, but IMHO it should be
more generic and not try to fix configuration issues, etc. I'd see this case as apparently a
configuration issue of this kind, so not about touching the actual handling code. As mentioned, some
similar API or case can be for sure met elsewhere in the core or also in the dependency libraries,
which would still trace itself back to the configuration question.

Btw binaries from different PHP versions are ABI incompatible, that won't work per se. 

Thanks.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=73885


--
Edit this bug report at https://bugs.php.net/bug.php?id=73885&edit=1


Thread (12 messages)

« previous php.bugs (#207304) next »