|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-10-26 13:21 UTC] david at donpiso dot com
Description: ------------ Apache simply fails to start after loading all modules, it seems it exits after loading, probably following initialization phase of the modules. No error neither at console nor log files. This happens since Apache 2.0.48 + PHP 4.3.4 in this machine, but I succeeded to start Apache 2.0.49 + PHP 4.3.6 in a different machine. Now tried Apache 2.0.52 + PHP 4.3.9 and still doesn't work. This is PHP configure: ./configure --with-apxs2=/usr/local/apache-server2/bin/apxs --enable-ctype --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png --with-gmp --with-pgsql --enable-shmop --enable-memory-limit --enable-shared --disable-debug --with-zlib=/usr --disable-cgi --disable-path-info-check --enable-safe-mode --with-openssl --with-bz2 --enable-calendar --enable-exif --enable-ftp --enable-sockets --without-mysql This are Apache modules: Server version: Apache/2.0.52 Server built: Oct 25 2004 18:59:00 Server's Module Magic Number: 20020903:9 Architecture: 32-bit Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="/usr/local/apache-server2" -D SUEXEC_BIN="/usr/local/apache-server2/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" The php.ini changes: precision = 14 y2k_compliance = Off output_buffering = 4096 allow_call_time_pass_reference = Off safe_mode_gid = On highlight.* ;max_input_time = 60 memory_limit = 6M error_reporting = E_ALL display_errors = Off log_errors = On error_log = /(...)/apache2/logs/php.log variables_order = "GPCS" register_argc_argv = Off post_max_size = 4M magic_quotes_gpc = Off upload_tmp_dir = /(...)/tmp upload_max_filesize = 4M ;SMTP = localhost ;sendmail_from = me@localhost.com session.cache_expire = 60 session.use_trans_sid = 1 Actual result: -------------- Running "gdb httpd" gives: GNU gdb 5.2 (...) This GDB was configured as "i386-slackware-linux"... (gdb) run -DSSL -e debug -k start Starting program: /uxd/apache-server2/bin/httpd -DSSL -e debug -k start [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module include_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module deflate_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module log_config_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module env_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module ssl_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module status_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module info_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module negotiation_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module dir_module [Tue Oct 26 13:16:42 2004] [debug] mod_so.c(247): loaded module alias_module [Tue Oct 26 13:16:43 2004] [debug] mod_so.c(247): loaded module php4_module Program exited normally. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 25 18:00:01 2025 UTC |
This looks suspiciously like a bad glibc installation: #0 0x00000000 in ?? () #1 0x407f9cec in db_open () from /lib/libnss_db.so.2 I doubt there is a PHP or Apache bug here. Try a simple program calling getprotobyname("tcp") to see if that segfaults; try it again when linked against -ldb.It doesn't break. Test program is: #include <netdb.h> #include <stdio.h> int main(int argc, char *argv) { struct protoent *pe; pe=getprotobyname("tcp"); printf("Name: %s, Number: %u\n",pe->p_name,pe->p_proto); } Tests are: -Test 1: gcc tst-libc6.c -o tst-libc6 ldd tst-libc6 libc.so.6 => /lib/libc.so.6 (0x40024000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) ./tst-libc6 Name: tcp, Number: 6 -Test 2: gcc tst-libc6.c -o tst-libc6 -ldb ldd tst-libc6 libc.so.6 => /lib/libc.so.6 (0x40024000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) ./tst-libc6 Name: tcp, Number: 6 -Test 3: gcc tst-libc6.c -o tst-libc6 -lnss_db ldd tst-libc6 libnss_db.so.2 => /lib/libnss_db.so.2 (0x40024000) libc.so.6 => /lib/libc.so.6 (0x4002b000) libnss_files.so.2 => /lib/libnss_files.so.2 (0x4014e000) libdb-3.1.so => /lib/libdb-3.1.so (0x40157000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) ./tst-libc6 Name: tcp, Number: 6 So it works and doesn't segfault. Compared to a machine that works, I notice that the working one has a glibc 2.3.1 against the glibc 2.2.5 that drives the failing one. I will try to upgrade glibc, although it worked well for slightly older Apache+PHP versions and I have to evaluate posible collateral effects on other applications before upgrading glibc from 2.2 to 2.3... On the working machine, test 2 shows different libraries: -Test 2: gcc tst-libc6.c -o tst-libc6 -ldb ldd tst-libc6 libdb-3.3.so => /lib/libdb-3.3.so (0x40025000) libc.so.6 => /lib/libc.so.6 (0x400af000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) ./tst-libc6 Name: tcp, Number: 6 Here it includes libdb (as you may expect), while on the first case Test2 just links against the same libraries as Test1 (both working). Maybe some dependencies in php make libraries to behave bogus and make that call to fail... I will try to upgrade libraries, but if you know a better method to avoid failure without changing them, will be of help (it is a production server, I can test new versions of Apache and PHP in parallel with the production daemons, but upgrading system libraries is a little more dangerous and painful as it is 24/7 service...) Thank you anyway for your time :-)