Req #43593 [Com]: Impossible to disable Zend Memory Manager in anything other than CLI SAPI

From: Date: Fri, 29 Aug 2014 13:42:32 +0000
Subject: Req #43593 [Com]: Impossible to disable Zend Memory Manager in anything other than CLI SAPI
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187337@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=43593&edit=1 ID: 43593 Comment by: justfortier at gmail dot com Reported by: phajdan dot jr at gmail dot com Summary: Impossible to disable Zend Memory Manager in anything other than CLI SAPI Status: No Feedback Type: Feature/Change Request Package: Compile Failure Operating System: Linux Gentoo 2007.0 PHP Version: 5.2CVS-2007-12-14 Block user comment: N Private report: N New Comment: I had a similar problem with Apache 2.2 and PHP 5.4.30.deb and Zend Engine 2.4.0. I found putting: EXPORT USE_ZEND_ALLOC=0 in my /etc/apache/envvars solved the issue for me. All other methods would get the php command line version to work, but not through apache mod_php. Hope this helps someone. Previous Comments: ------------------------------------------------------------------------ [2013-10-15 11:54:25] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2013-10-01 11:51:16] mike@php.net Works fine here. What SAPI are you using? /usr/share/nginx/html$ USE_ZEND_ALLOC=0 PHP_FCGI_CHILDREN=0 php-cgi -b 0:9999 $ curl --progress localhost/info.php | grep "Memory Manager" <tr><td class="e">Zend Memory Manager </td><td class="v">disabled </td></tr> It's really just coming from the environment: http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_alloc.c#2723 ------------------------------------------------------------------------ [2008-02-02 09:18:42] phajdan dot jr at gmail dot com After compiling with that option Zend MM is still enabled, according to phpinfo(). Anyway, it must be possible to somehow disable it, because debug build does it. But it would be not a good solution to use debug build in production. Please, please check it yourself, *seriously* - no guessing, not requiring me to check every opportunity. ------------------------------------------------------------------------ [2008-02-01 22:48:39] jani@php.net How about --disable-malloc-mm ?? ------------------------------------------------------------------------ [2008-01-29 07:06:10] phajdan dot jr at gmail dot com Well, reproduction script is *not*needed* as it's a PHP configuration setting issue. It is visible for example in <? phpinfo(); ?> and I gave exact *steps* to reproduce at the beginning. Here they are, for convenience: The goal is to disable the Zend Memory Manager. Try #1: 1. set USE_ZEND_ALLOC in the environment (/etc/profile) 1a. also tried other ways, like setting it in the Apache config (SetEnv etc) 2. Restart Apache to make sure change takes effect 3. View phpinfo page to see if Zend Memory Manager got disabled 3a. But this way works for the CLI version of PHP (setting env in /etc/profile). Try #2: (proven to be futile and ineffective, but anyway) I tried to recompile PHP with ./configure switches like --disable-zend-memory-manager or --enable-malloc-mm (some webpages told they will disable Zend MM), but as other developers said in this report, there are no such compile options. ------------------------------------------------------------------------ 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=43593 -- Edit this bug report at https://bugs.php.net/bug.php?id=43593&edit=1

« previous php.bugs (#187337) next »