php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51587 compile php 5.3.2 with php-fpm error
Submitted: 2010-04-18 10:47 UTC Modified: 2010-04-19 13:09 UTC
From: amoiz dot shine at gmail dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.3.2 OS: CentOS 5 i686
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: amoiz dot shine at gmail dot com
New email:
PHP Version: OS:

 

 [2010-04-18 10:47 UTC] amoiz dot shine at gmail dot com
Description:
------------
i download the php source tarball from php.net.
and check out lastest version of php-fpm from SVN.

then,i run the
./configure --prefix=/usr/local/php --bindir=/usr/local/bin
--sbindir=/usr/local/sbin --sysconfdir=/etc/sysconfig
--enable-embed=shared --enable-fpm --enable-safe-mode
--enable-sigchild --enable-magic-quotes --enable-fd-setsize=100
--enable-calendar --enable-dba=shared --enable-exif --enable-ftp
--enable-gd-native-ttf --enable-intl --enable-mbstring
--enable-embedded-mysqli --enable-pcntl --disable-phar --enable-shmop
--enable-soap --enable-sockets --enable-wddx --enable-zip
--enable-zend-multibyte --with-libxml-dir
--with-libevent-dir=/usr/local/libevent --with-fpm-user=php
--with-fpm-group=php --with-config-file-path=/etc
--with-exec-dir=/usr/local/bin --with-openssl --with-kerberos
--with-pcre-regex --with-zlib --with-bz2 --with-curl --with-gd
--with-mhash --with-imap --with-imap-ssl --with-ldap --with-ldap-sasl
--with-mcrypt --with-mysql=/usr/local/mysql
--with-mysql-sock=/tmp/mysql.sock
--with-mysqli=/usr/local/bin/mysql_config
--with-pdo-mysql=/usr/local/bin/mysql_config --with-xmlrpc --with-pear

it seems to be ok,and run make command.it looks like NO error appears,too

but when i run the make install,it gives some information below:
[root@PowerPC php-5.3.2]# make install
/bin/sh /root/php-5.3.2/libtool --silent --preserve-dup-deps
--mode=install cp ext/dba/dba.la /root/php-5.3.2/modules
Installing PHP SAPI module:       fpm
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing shared extensions:
/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
Installing PHP FPM binary:        /usr/local/sbin/
Installing PHP FPM config:        /etc/sysconfig/
Installing PHP FPM man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/php/lib/php/build/
Installing header files:          /usr/local/php/include/php/
Installing helper programs:       /usr/local/bin/
 program: phpize
 program: php-config
Installing man pages:             /usr/local/php/man/man1/
 page: phpize.1
 page: php-config.1
Installing PEAR environment:      /usr/local/php/lib/php/
make[1]: *** [install-pear-installer] Segmentation fault
make: *** [install-pear] Error 2

I Do Not know what caused it..

and i run the php-fpm ,it returns "Segmentation fault"

Test script:
---------------
See my configure string

Expected result:
----------------
Install Success and php-fpm works OK.

Actual result:
--------------
Segmentation fault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-18 15:24 UTC] fat@php.net
please provide more informations.

See http://bugs.php.net/how-to-report.php and especially http://bugs.php.net/bugs-
generating-backtrace.php

++ Jerome
 [2010-04-19 03:57 UTC] amoiz dot shine at gmail dot com
i am sorry.
when i run this command below:
echo "/tmp/core/core-%e.%p" > /proc/sys/kernel/core_pattern

to Set up the core pattern.

it returns "-bash: echo: write error: Operation not permitted"...

any suggestion?
 [2010-04-19 05:13 UTC] amoiz dot shine at gmail dot com
download the lastest snapshot tarball named "php5.3-201004190230".

follow the same steps,ERROR again

see here:

[root@PowerPC php5.3-201004190230]# make install
Installing PHP SAPI module:       fpm
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing shared extensions:     /usr/local/php/lib/php/extensions/debug-non-zts-20090626/
Installing PHP FPM binary:        /usr/local/sbin/
Installing PHP FPM config:        /etc/sysconfig/
Installing PHP FPM man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/php/lib/php/build/
Installing header files:          /usr/local/php/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php/lib/php/
--2010-04-19 06:57:50--  http://pear.php.net/install-pear-nozlib.phar
Resolving pear.php.net... 78.129.214.25
Connecting to pear.php.net|78.129.214.25|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3670286 (3.5M) [text/plain]
Saving to: `pear/install-pear-nozlib.phar'

100%[======================================>] 3,670,286   1.84M/s   in 1.9s

2010-04-19 06:57:53 (1.84 MB/s) - `pear/install-pear-nozlib.phar' saved [3670286/3670286]

make[1]: *** [install-pear-installer] Segmentation fault (core dumped)
make: *** [install-pear] Error 2

please NOTE,when i checked out php-fpm from its repository,run the command "./buildconf --force" to rebuild configure,it gives some WARNING,

they are:

[root@PowerPC php5.3-201004190230]# ./buildconf --force
Forcing buildconf
buildconf: checking installation...
buildconf: autoconf version 2.59 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
           Running vcsclean for you.
           To avoid this, install autoconf-2.13.
Can't figure out your VCS, not cleaning.
rebuilding configure
rebuilding main/php_config.h.in
autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader:             [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced, see the
autoheader: WARNING: documentation.

maybe helpful to you.

Many Thanks
Sharl
 [2010-04-19 11:21 UTC] tony2001@php.net
-Package: FPM related +Package: Reproducible crash
 [2010-04-19 11:21 UTC] tony2001@php.net
>it returns "-bash: echo: write error: Operation not permitted"...
>any suggestion?

Yes. Run the command as root.

>Installing PEAR environment:      /usr/local/php/lib/php/
>make[1]: *** [install-pear-installer] Segmentation fault
>make: *** [install-pear] Error 2

This has nothing to do with FPM, it's not even executed when installing PEAR.
Reclassifying..
 [2010-04-19 11:24 UTC] tony2001@php.net
>please NOTE,when i checked out php-fpm from its repository,run the command 
>"./buildconf --force" to rebuild configure,it gives some WARNING,

You can safely ignore those autoconf warnings (or use autoconf 2.13 if you want to get rid of them).
 [2010-04-19 11:24 UTC] tony2001@php.net
-Package: Reproducible crash +Package: PHAR related
 [2010-04-19 11:27 UTC] tony2001@php.net
Just to make it clear: the segfault is caused by PEAR installer, which you can disable using --without-pear configure option.
 [2010-04-19 11:39 UTC] amoiz dot shine at gmail dot com
>>Yes. Run the command as root.
In fact,i am ROOT already
 [2010-04-19 11:49 UTC] amoiz dot shine at gmail dot com
-Package: PHAR related +Package: Compile Failure
 [2010-04-19 11:49 UTC] amoiz dot shine at gmail dot com
>>Just to make it clear: the segfault is caused by PEAR installer, which you can >>disable using --without-pear configure option.
Add "--without-pear",Segmentation fault appears too.

my configure:
 $ ./configure --prefix=/usr/local/php --bindir=/usr/local/bin --sbindir=/usr/local/sbin --sysconfdir=/etc/sysconfig --enable-embed=static --enable-fpm --enable-debug --enable-safe-mode --enable-sigchild --enable-magic-quotes --enable-fd-setsize=100 --enable-calendar --enable-dba=shared --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-mbstring --enable-embedded-mysqli --enable-pcntl --disable-phar --enable-shmop --enable-soap --enable-sockets --enable-wddx --enable-zip --enable-zend-multibyte --with-libxml-dir --with-libevent-dir=/usr/local/libevent --with-fpm-user=php --with-fpm-group=php --with-config-file-path=/etc --with-exec-dir=/usr/local/bin --with-openssl --with-kerberos --with-pcre-regex --with-zlib --with-bz2 --with-curl --with-gd --with-mhash --with-imap --with-imap-ssl --with-ldap --with-ldap-sasl --with-mcrypt --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/local/bin/mysql_config --with-pdo-mysql=/usr/local/bin/mysql_config --with-xmlrpc --without-pear

make && make install

[root@PowerPC php-5.3.2]# make install
Installing PHP SAPI module:       fpm
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing shared extensions:     /usr/local/php/lib/php/extensions/debug-non-zts-20090626/
Installing PHP FPM binary:        /usr/local/sbin/
Installing PHP FPM config:        /etc/sysconfig/
Installing PHP FPM man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/php/lib/php/build/
Installing header files:          /usr/local/php/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PDO headers:          /usr/local/php/include/php/ext/pdo/

NOW,i am going to run php-fpm,
[root@PowerPC php-5.3.2]# php-fpm
Segmentation fault
 [2010-04-19 11:55 UTC] tony2001@php.net
# gdb php-fpm
gdb> run
gdb> bt full
Paste here what you get.
 [2010-04-19 12:03 UTC] amoiz dot shine at gmail dot com
># gdb php-fpm
>gdb> run
>gdb> bt full
>Paste here what you get.

OK,see below

(gdb) bt full
#0  0x08725674 in handle_options (argc=0x91a2a04, argv=0x91a2a08,
    longopts=0xab55578, get_one_option=0x8705eb0 <mysqld_get_one_option>)
    at my_getopt.c:138
        opt_found = <value optimized out>
        argvpos = <value optimized out>
        length = <value optimized out>
        end_of_options = <value optimized out>
        must_be_var = <value optimized out>
        set_maximum_value = <value optimized out>
        option_is_loose = <value optimized out>
        pos = (char **) 0x4
        pos_end = (char **) 0x0
        optend = <value optimized out>
        prev_found = <value optimized out>
        opt_str = <value optimized out>
        key_name = "\b\000\000\000\r\000\000\000\030w\214¿\000\002\000\000@>\000\000\001\000\000\000\r\000\000\000lШ\n;\004\213¶(w\214¿\004\000\000\000\224û\031\tß`j¶\025\000\000\000\025", '\0' <repeats 40 times>, "\022¯\n\210w\214¿ôÿ\234¶`cj¶¤+¯\n\210w\214¿", '\0' <repeats 16 times>, "Q{\217¶\001\000\000\000\025\000\000\000applQ{\217¶ion/xhtml+xml\000\000\000\220\021\235¶\220\002\000\000\037x\214¿p\025\235¶\000\000\000\0000\000\000\000/x\214¿p\021\235¶v\002\000\000):ý·¸ü\211¶¸Uü·Àÿý·\200\002þ·h©y¶Xz\214¿"...
        optp = <value optimized out>
        value = <value optimized out>
 error = <value optimized out>
        i = <value optimized out>
        is_cmdline_arg = <value optimized out>
#1  0x08707785 in get_options ()
No symbol table info available.
#2  0x087089db in init_common_variables ()
No symbol table info available.
#3  0x08709960 in init_embedded_server ()
No symbol table info available.
#4  0x0837b81e in zm_startup_mysql (type=1, module_number=26)
    at /root/php-5.3.2/ext/mysql/php_mysql.c:453
No locals.
#5  0x085f0927 in zend_startup_module_ex (module=0xaabad48)
    at /root/php-5.3.2/Zend/zend_API.c:1613
        name_len = 6
        lcname = 0xb66a6064 "ZZZZZGËÔøøøøg\235²Í="
#6  0x085f9616 in zend_hash_apply (ht=0x91b9720,
    apply_func=0x85f076f <zend_startup_module_ex>)
    at /root/php-5.3.2/Zend/zend_hash.c:673
        result = 0
        p = (Bucket *) 0xaabad18
#7  0x085f0a96 in zend_startup_modules ()
    at /root/php-5.3.2/Zend/zend_API.c:1662
No locals.
#8  0x0857e892 in php_module_startup (sf=0x90fe1c0,
    additional_modules=0x90fe260, num_additional_modules=1)
    at /root/php-5.3.2/main/main.c:2022
        zuf = {error_function = 0x857c472 <php_error_cb>,
  printf_function = 0x857ba82 <php_printf>,
  write_function = 0x857df24 <php_body_write_wrapper>,
  fopen_function = 0x857cfb0 <php_fopen_wrapper_for_zend>,
  message_handler = 0x857d2c8 <php_message_handler_for_zend>,
  block_interruptions = 0, unblock_interruptions = 0,
  get_configuration_directive = 0x857d276 <php_get_configuration_directive_for_zend>, ticks_function = 0x8590590 <php_run_ticks>,
  on_timeout = 0x857d6b4 <php_on_timeout>,
  stream_open_function = 0x857d06b <php_stream_open_for_zend>,
  vspprintf_function = 0x8582564 <vspprintf>,
  getenv_function = 0x8588ca5 <sapi_getenv>,
  resolve_path_function = 0x857d253 <php_resolve_path_for_zend>}
        zuv = {import_use_extension = 0x8e2bc5c ".php",
  import_use_extension_length = 186, html_errors = 1 '\001'}
        module_number = 0
        php_os = 0x8e2b9ea "Linux"
        module = (zend_module_entry *) 0x90fce90
        directives = {0x8e2988b "define_syslog_variables",
  0x8e29af6 "register_globals", 0x8e29b07 "register_long_arrays",
  0x8e29b2d "safe_mode", 0x8e29a89 "magic_quotes_gpc",
  0x8e29a9a "magic_quotes_runtime", 0x8e29aaf "magic_quotes_sybase", 0x0}
#9  0x086b9f68 in php_cgi_startup (sapi_module=0x90fe1c0)
    at /root/php-5.3.2/sapi/fpm/fpm/fpm_main.c:898
No locals.
#10 0x086bb40d in main (argc=1, argv=0xbf8ca534)
    at /root/php-5.3.2/sapi/fpm/fpm/fpm_main.c:1695
        free_query_string = 0
        exit_status = 0
        cgi = 0
        c = -1
        file_handle = {type = ZEND_HANDLE_FILENAME,
  filename = 0xbf8ca458 "h¤\214¿«\221\234\b\001",
  opened_path = 0x88745d1 "\203ÄL[^_]Ã\211Ø\211ò÷Ð÷Ò!\001!Q\004é¨Õÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004é\031Ôÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004é\216Òÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004éüÐÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004éjÏÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004éØÍÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004éFÌÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004é´Êÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004é\"Éÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q\004é\220Çÿÿ\211Ø\211ò÷Ð÷Ò!\001!Q"..., handle = {
    fd = 143015024, fp = 0x8863c70, stream = {handle = 0x8863c70, isatty = 0,
      mmap = {len = 144478696, pos = 149619814, map = 0xb68b9e25,
        buf = 0x130 <Address 0x130 out of bounds>, old_handle = 0x282,
        old_closer = 0x90e623c <__CTOR_LIST__>}, reader = 0x6fb,
      fsizer = 0x1040800, closer = 0x90e623c <__CTOR_LIST__>}},
  free_filename = 60 '<'}
        orig_optind = 1
orig_optarg = 0x0
        ini_entries_len = 0
        max_requests = 500
        requests = 0
        fcgi_fd = 0
        request = {listen_socket = -1208090624, fd = -1081310416,
  id = -1081309924, keep = 6, closed = -1233975428, in_len = 196608,
  in_pad = 0, out_hdr = 0xbf8c8378, out_pos = 0xb672d000 "",
  out_buf = " \205\214¿T\205\214¿\003\000\000\000vÂý·D\006þ·pol\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000):ý·1\226n¶dB\235¶Àÿý·\000@\235¶\210Z\235¶¨\206\214¿\020Óü·1\226n¶3`\235¶`Y\004\000´\000\000\000\000\000\000\000\000\002\000\0001\226n¶í\201\000\000\000\000þ·\000\000\000\000\000\000\000\000\000Ðr¶\000\000\000\000|\as\000ظ\003\0003`\235¶\000\020\000\000è\001\000\000\000\000\000\000;*ÌK\000\000\000\000):ý·¥\as¶¸Uü·Àÿý·\200\002þ·° \214¿\034\207\214¿\020Óü·\212\as¶3`\235¶Àÿý·"..., reserved = "ôÿ\234¶p<\206\b\n4æ\bø£\214¿",
  env = 0xb68b9f50}
        fpm_config = 0x0
(gdb)
 [2010-04-19 12:38 UTC] tony2001@php.net
The backtrace, as you can see, leads into mysql client library.
Did you specify --enable-embedded-mysqli for a reason? And can you try to recompile PHP without it?
 [2010-04-19 12:50 UTC] tony2001@php.net
-Status: Open +Status: Feedback
 [2010-04-19 13:02 UTC] amoiz dot shine at gmail dot com
-Status: Feedback +Status: Closed
 [2010-04-19 13:02 UTC] amoiz dot shine at gmail dot com
>The backtrace, as you can see, leads into mysql client library.
>Did you specify --enable-embedded-mysqli for a reason? And can you try to >recompile PHP without it?

YES!thanks a lots.

when i remove "--enable-embedded-mysqli"  string,just like it:

$ ./configure --prefix=/usr/local/php --bindir=/usr/local/bin --sbindir=/usr/local/sbin --sysconfdir=/etc/sysconfig --enable-embed=static --enable-fpm --enable-debug --enable-safe-mode --enable-sigchild --enable-magic-quotes --enable-fd-setsize=100 --enable-calendar --enable-dba=shared --enable-exif --enable-ftp --enable-gd-native-ttf --enable-intl --enable-mbstring --enable-pcntl --disable-phar --enable-shmop --enable-soap --enable-sockets --enable-wddx --enable-zip --enable-zend-multibyte --with-libxml-dir --with-libevent-dir=/usr/local/libevent --with-fpm-user=http --with-fpm-group=web --with-config-file-path=/etc --with-exec-dir=/usr/local/bin --with-openssl --with-kerberos --with-pcre-regex --with-zlib --with-bz2 --with-curl --with-gd --with-mhash --with-imap --with-imap-ssl --with-ldap --with-ldap-sasl --with-mcrypt --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/local/bin/mysql_config --with-pdo-mysql=/usr/local/bin/mysql_config --with-xmlrpc --without-pear

then,make && make install, the error has gone.

and i run the php-fpm command,i gives "configure file not found" error.

[root@PowerPC php-5.3.2]# php-fpm
I/O warning : failed to load external entity "/etc/sysconfig/php-fpm.conf"
Apr 19 14:55:27.196173 [ERROR] failed to load configuration file: failed to parse conf file

i know,php-fpm works ok Now.

Thank you tony2001.
 [2010-04-19 13:09 UTC] tony2001@php.net
-Status: Closed +Status: Bogus
 [2010-04-19 13:09 UTC] tony2001@php.net
Looks similar to this one: http://bugs.mysql.com/bug.php?id=34110
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 08:01:30 2025 UTC