php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56908 php -v segfaults
Submitted: 2006-03-23 13:57 UTC Modified: 2006-03-23 14:01 UTC
From: iblue at gmx dot net Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-03-23 13:57 UTC] iblue at gmx dot net
Description:
------------
php -v segfaults.

btw i'm using php-5.1.2, but it's not in the list above.

[php configure:]
'./configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2' '--with-openssl' '--enable-bcmath' '--enable-ftp' '--with-gd' '--with-mcrypt' '--with-mhash' '--with-mysql' '--enable-pcntl' '--enable-pdo' '--with-pdo-mysql' '--enable-posix' '--without-png' '--with-zlib-dir=/usr/include' '--with-gd' '--enable-pdo' '--with-pdo-mysql' '--with-jpeg-dir' '--with-libjpeg=/usr/lib' '--with-mbstring'

[php.ini:]
extension=apc.so
  apc.enabled=1
  apc.shm_segments=1
  apc.optimization=0
  apc.shm_size=128
  apc.ttl=7200
  apc.user_ttl=7200
  apc.num_files_hint=1024
  apc.mmap_file_mask=/tmp/apc.XXXXXX
  apc.enable_cli=1

[apc configure:]
./configure --enable-apc-mmap --with-apxs2 --with-php-config=/usr/bin/php-config

Reproduce code:
---------------
php -v


Expected result:
----------------
$ php -v
PHP 5.1.2 (cli) (built: Mar 22 2006 20:44:31)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
$ 

Actual result:
--------------
$ php -v
PHP 5.1.2 (cli) (built: Mar 22 2006 20:44:31)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
Segmentation fault

[...]

(gdb) run -v
Starting program: /usr/bin/php -v
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 3144)]
PHP 5.1.2 (cli) (built: Mar 22 2006 20:44:31)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 3144)]
0x405cae50 in ?? ()
(gdb) bt
#0  0x405cae50 in ?? ()
#1  0x0824caf0 in tsrm_shutdown () at /home/iblue/php-5.1.2/TSRM/TSRM.c:180
#2  0x08306251 in main (argc=2, argv=0xbffffb74) at /home/iblue/php-5.1.2/sapi/cli/php_cli.c:1240
(gdb) 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-23 14:01 UTC] rasmus@php.net
A quick fix is to set:

apc.enable_cli=0

in your php.ini.  Running the cli with apc built against a threaded Apache2 is probably something that will never work.  At least I am not going to spend a whole lot of time making it work.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Sep 28 09:01:25 2020 UTC