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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
31 - 3 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 22:01:23 2020 UTC