php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56957 Can't install - memory sized
Submitted: 2006-04-13 10:07 UTC Modified: 2006-04-18 17:11 UTC
From: pfoubert at carat-hosting dot com Assigned:
Status: Not a bug Package: APC (PECL)
PHP Version: 4.3.11 OS: centos 4.4 64 bits
Private report: No CVE-ID: None
 [2006-04-13 10:07 UTC] pfoubert at carat-hosting dot com
Description:
------------
Hello,

I try to install APC from pecl. I do
# pecl install apc

and have this error 

=============================
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 23040 bytes) in /usr/share/pear/PEAR/Dependency2.php on line 636
Allowed memory size of 8388608 bytes exhausted (tried to allocate 0 bytes)
===============================

Memory in php.ini is set to 16MB

I also stopped mod_security to be sure.

I use this pear version
# pear list                                                      Installed packages, channel pear.php.net:
=========================================
Package              Version State
Archive_Tar          1.3.1   stable
Console_Getopt       1.2     stable
HTML_Template_IT     1.1.4   stable
Net_UserAgent_Detect 2.1.0   stable
PEAR                 1.4.9   stable
XML_RPC              1.4.7   stable

And here is my pear/pecl config
[root@obiwan ~]# pecl config-show
Configuration (channel pecl.php.net):
=====================================
Auto-discover new Channels     auto_discover    <not set>
Default Channel                default_channel  pecl.php.net
HTTP Proxy Server Address      http_proxy       <not set>
PEAR server [DEPRECATED]       master_server    pear.php.net
Default Channel Mirror         preferred_mirror pecl.php.net
Remote Configuration File      remote_config    <not set>
PEAR executables directory     bin_dir          /usr/bin
PEAR documentation directory   doc_dir          /usr/share/pear/doc
PHP extension directory        ext_dir          /usr/lib64/php4
PEAR directory                 php_dir          /usr/share/pear
PEAR Installer cache directory cache_dir        /tmp/pear/cache
PEAR data directory            data_dir         /usr/share/pear/data
PHP CLI/CGI binary             php_bin          /usr/bin/php
PEAR test directory            test_dir         /usr/share/pear/test
Cache TimeToLive               cache_ttl        3600
Preferred Package State        preferred_state  stable
Unix file mask                 umask            22
Debug Log Level                verbose          1
PEAR password (for             password         <not set>
maintainers)
Signature Handling Program     sig_bin          /usr/bin/gpg
Signature Key Directory        sig_keydir       /etc/pearkeys
Signature Key Id               sig_keyid        <not set>
Package Signature Type         sig_type         gpg
PEAR username (for             username         <not set>
maintainers)
User Configuration File        Filename         /root/.pearrc
System Configuration File      Filename         /etc/pear.conf



Pascal


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-13 10:26 UTC] pfoubert at carat-hosting dot com
Hello,

As I can't install it with pecl I've tried to install it manualy.

Phpize --> done OK

./configure --> Failed !

# ./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/sbin/apxs --with-php-config=/usr/bin/php-config

Here is the log
======================================================
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend
checking for PHP extension directory... /usr/lib64/php4
checking for re2c... exit 0;
checking for gawk... gawk
checking whether apc needs to get compiler flags from apxs... yes
checking whether to enable APC support... yes, shared
checking whether to enable mmap support instead of IPC shm... yes
checking whether to prefer semaphore based locks... no
checking for union semun... no
checking for shm_open in -lrt... yes
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
======================================================

Do you need more informations in config.log ?

Thanks a ton for your help

Pascal
 [2006-04-13 10:47 UTC] pfoubert at carat-hosting dot com
arff what newbee I do :)

Of course if I install gc++ it could help a lot :)

Sorry for his false bug report from a bas newbee

pascal
 [2006-04-17 11:00 UTC] gopalv82 at yahoo dot com
has the pear error disappeared or did you just work around it ?
 [2006-04-18 06:59 UTC] mike@php.net
The PEAR error may occur when not using the the *-dev version of the scripts, e.g. pear-dev install pecl/apc.
 [2006-04-18 17:11 UTC] pfoubert at carat-hosting dot com
Hello

Thank for your answer. The pear error still here. So I've done a work around and installed it manually.

If I understand well you mean that I have to install it with this command ?  pear-dev install pecl/apc

Because when I ran it with
 peardev install pecl/apc

I have this error
===========================================================
downloading APC-3.0.10.tgz ...
Starting to download APC-3.0.10.tgz (85,818 bytes)
....................done: 85,818 bytes
35 source files, building
running: phpize
Configuring for:
PHP Api Version:         20020918
Zend Module Api No:      20020429
Zend Extension Api No:   20021010
Use mmap instead of shmget (usually a good idea) [yes] :
Use apxs to set compile flags (if using APC with Apache)? [yes] :
building in /var/tmp/pear-build-root/APC-3.0.10
running: /tmp/tmpo0k4jD/APC-3.0.10/configure --enable-apc-mmap=yes --with-apxs
sh: /tmp/tmpo0k4jD/APC-3.0.10/configure: /bin/sh: bad interpreter: Permission denied
ERROR: `/tmp/tmpo0k4jD/APC-3.0.10/configure --enable-apc-mmap=yes --with-apxs' failed
===========================================================

In fact my tmp dir is a partition with noexec option. Is there a way to run the configure and install elsewhere ?

Yet I have uninstalled APC. Since it was installed I had error  in /var/log/http/error_log with huge segfault causing  blank page to some clients. (the segfault is only when the cache memory is full).

I'll let my box running without APC few days to be sure I have no more these errors, then I^ll re-install it and see.

Thanks

Pascal
 [2007-05-30 20:58 UTC] shunza at gmail dot com
Hello,
I got this error too.
When I install APC with pecl on X86_64,I do 
# pecl install APC
It shows:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 23040 bytes) in /usr/share/pear/PEAR/PackageFile/v2.php on line 948
Allowed memory size of 8388608 bytes exhausted (tried to allocate 0 bytes)

====================
memory_limit in my php.ini already set to 64M

when I do it in a X86_32 system,it works well,why? This is a x86_64 bug ?
 [2008-08-18 12:24 UTC] jason at draxjinn dot com
Adding the following line:

ini_set('memory_limit', '32M');

to the top of:

/usr/share/pear/pearcmd.php 

Should fix the problem. (Add it right below the comments in the header....)
 [2008-10-13 22:41 UTC] amcmillen at sliqua dot com
This issue is still occurring in CentOS 5...
 [2009-07-12 23:44 UTC] trent at jp dot ibm dot com
This problem also happens on RHEL 5.3 X86_64 (i386 and PPC platforms were OK). 

The pearcmd.php workaround works fine.  Thanks!
 [2010-12-20 01:51 UTC] linuzashu at gmail dot com
Work for me.. thanks.. :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 11 14:01:27 2024 UTC