php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56224 command line PHP crashes when apc loaded
Submitted: 2004-11-04 06:25 UTC Modified: 2004-11-04 18:06 UTC
From: kavan at jamu dot cz Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 4.3.3 OS: linux
Private report: No CVE-ID: None
 [2004-11-04 06:25 UTC] kavan at jamu dot cz
Description:
------------
There is a problem with latest CVS APC. Whenever I try to run php from command line (not invoked via apache) it segfaults.

If I turn off the cache it works. 

php.ini

extension="/usr/local/lib/apc.so"
apc.shm_segments=15
apc.shm_size=30

Shared memory settings

echo "2147483648" > /proc/sys/kernel/shmmax
echo "2097152" > /proc/sys/kernel/shmall


Reproduce code:
---------------
/usr/local/bin/php

Expected result:
----------------
running php

Actual result:
--------------
Segmantation fault. (no core dump)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-04 18:06 UTC] Rasmus@php.net
There isn't much point in using apc from command line php.  Maintain a separate php.ini file for your command line php.
This will eventually be fixed, but for now I chose to speed up apc under Apache by saving a time() call by fetching the
current request time directly from Apache.  This breaks CLI until the SAPI call I added to PHP5 either gets backported or apc moves to PHP5.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 15:01:30 2024 UTC