HI,

I'm having a little bit of a problem getting apache 1.2.26 to work with
php 4.2.2, using gcc 3.1.1, and with pgsql 7.2.1

i compiled apache with these options... (from .spec file)


<snip>

CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
./configure \
        --prefix=%{_prefix} \
        --exec-prefix=%{_prefix} \
        --bindir=%{_bindir} \
        --sbindir=%{_sbindir} \
        --mandir=%{_mandir} \
        --sysconfdir=%{_sysconfdir}/httpd/conf \
        --includedir=%{_includedir}/apache \
        --libexecdir=%{_libdir}/apache \
        --datadir=%{contentdir} \
        --iconsdir=%{contentdir}/icons \
        --htdocsdir=%{contentdir}/html \
        --manualdir=%{contentdir}/html \
        --cgidir=%{contentdir}/cgi-bin \
        --localstatedir=%{_localstatedir} \
        --runtimedir=%{_localstatedir}/run \
        --logfiledir=%{_localstatedir}/log/httpd \
        --proxycachedir=%{_localstatedir}/cache/httpd \
        --add-module=%{SOURCE12} \
        --add-module=mod_put-%{mod_put_ver}/mod_put.c \
        --add-module=%{SOURCE15} \
        --add-module=mod_frontpage.c \
        --add-module=mod_throttle-%{mod_throttle_ver}/mod_throttle.c \
        --add-module=%{SOURCE18} \
        --add-module=mod_auth_pgsql-%{mod_auth_pgsql_ver}/mod_auth_pgsql.c \
        --enable-module=all \
        --enable-shared=max \
        --enable-rule=EAPI \
        --disable-rule=WANTHSREGEX \
        --enable-module=auth_dbm \
        --with-perl=%{__perl} \
        --enable-suexec \
        --suexec-docroot=%{contentdir} \
        --suexec-caller=apache

</snip>



and php with these...


<snip>

ssllibs="-lssl -lcrypto"

CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
LIBS="-lttf -lpng -ljpeg -lz"; export LIBS

compile() {
./configure \
        --prefix=%{_prefix} \
        --with-config-file-path=%{_sysconfdir} \
        --disable-debug \
        --enable-shared \
        --enable-pic \
        $* \
        --with-db3 \
        --with-exec-dir=%{_bindir} \
        --with-gd \
        --with-gdbm \
        --with-imap-ssl \
        --with-jpeg-dir=%{_prefix} \
        --with-ldap \
        --with-pic \
        --with-pgsql=/usr \
        --with-png \
        --with-regex=system \
        --with-xml \
        --with-zlib \
        --enable-debugger \
        --enable-magic-quotes \
        --enable-inline-optimization \
        --enable-safe-mode \
        --enable-shmop \
        --enable-sysvsem \
        --enable-sysvshm \
        --enable-sockets \
        --enable-track-vars \
        --enable-yp \
        --enable-ftp \
        --enable-wddx \
        --without-mysql \
        --without-oracle \
       --without-oci8 \
        --with-mm \
        --with-pic
%{make}
}

# Build a standalone binary.
make distclean || :
compile --enable-force-cgi-redirect
cp php php_standalone

# Build a module.
make distclean
compile --with-apxs=%{_sbindir}/apxs

# Build individual PHP modules.
build_ext() {
%{__cc} -fPIC -shared $RPM_OPT_FLAGS \
        -DCOMPILE_DL_`echo $1 | tr '[a-z]' '[A-Z]'` \
        -DHAVE_`echo $1 | tr '[a-z]' '[A-Z]'` \
        -I. -I./TSRM -I./main -I`%{_sbindir}/apxs -q INCLUDEDIR` -I./Zend \
        -I/usr/include/freetype -I/usr/include/$1 \
        -I./ext/$1 -I./ext/$1/lib$1 \
        -I./ext/xml/expat/xmltok -I./ext/xml/expat/xmlparse \
        `grep ^CPPFLAGS Zend/Makefile | cut -f2- -d=` \
        $4 $2 -o $1.so -L.libs $3 -lc
}
build_ext imap ext/imap/php_imap.c "%{_libdir}/c-client.a $ssllibs -lpam -ldl"
build_ext ldap ext/ldap/ldap.c "-lldap -llber"
build_ext pgsql ext/pgsql/pgsql.c "-lpq" -DHAVE_PQCMDTUPLES

</snip>


some code above originally derived from one of the old redhat .spec files
and others.

now what happens is while running a php site (with heavy pgsql integration)
i get segfaults in apache, here is the strace...



<snip>

strlen("X-Powered-By")                            = 12
memcpy(0x081e310c, "X-Powered-By", 13)            = 0x081e310c
strlen("PHP/4.2.2")                               = 9
memcpy(0x081e311c, "PHP/4.2.2", 10)               = 0x081e311c
strcasecmp("X-Powered-By", "Expires")             = 19
strlen("Expires")                                 = 7
memcpy(0x081e312c, "Expires", 8)                  = 0x081e312c
strlen("Thu, 19 Nov 1981 08:52:00 GMT")           = 29
memcpy(0x081e3134, "Thu, 19 Nov 1981 08:52:00 GMT", 30) = 0x081e3134
strcasecmp("X-Powered-By", "Cache-Control")       = 21
strcasecmp("Expires", "Cache-Control")            = 2
strlen("Cache-Control")                           = 13
memcpy(0x081e3154, "Cache-Control", 14)           = 0x081e3154
strlen("no-store, no-cache, must-revalid"...)     = 62
memcpy(0x081e3164, "no-store, no-cache, must-revalid"..., 63) = 0x081e3164
strcasecmp("X-Powered-By", "Pragma")              = 8
strcasecmp("Expires", "Pragma")                   = -11
strcasecmp("Cache-Control", "Pragma")             = -13
strlen("Pragma")                                  = 6
memcpy(0x081e31a4, "Pragma", 7)                   = 0x081e31a4
strlen("no-cache")                                = 8
memcpy(0x081e31ac, "no-cache", 9)                 = 0x081e31ac
--- SIGSEGV (Segmentation fault) ---
chdir("/etc/httpd")                               = 0
sigemptyset(0xbfffec24, 6050, 1281, 0x4035bec1, 8) = 0
sigaction(11, 0xbfffec20, 0xbfffeb90, 0x4035bec1, 8) = 0
getpid()                                          = 14022
kill(14022, 11)                                   = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

</snip>


and here the error_log output from apache....


<snip>

[Wed Aug 21 12:01:19 2002] [error] NOTICE:  Adding missing FROM-clause entry for table 
"mailhosts"

[Wed Aug 21 12:01:23 2002] [notice] child pid 13800 exit signal Segmentation fault (11)
[Wed Aug 21 12:01:29 2002] [error] NOTICE:  Adding missing FROM-clause entry for table 
"mailhosts"

[Wed Aug 21 12:01:43 2002] [notice] child pid 14011 exit signal Segmentation fault (11)
[Wed Aug 21 12:02:37 2002] [notice] child pid 13805 exit signal Segmentation fault (11)
[Wed Aug 21 12:02:55 2002] [notice] child pid 13807 exit signal Segmentation fault (11)
[Wed Aug 21 12:03:00 2002] [notice] child pid 13802 exit signal Segmentation fault (11)
[Wed Aug 21 12:03:04 2002] [notice] child pid 13806 exit signal Segmentation fault (11)
[Wed Aug 21 12:03:07 2002] [notice] child pid 13814 exit signal Segmentation fault (11)
[Wed Aug 21 12:03:33 2002] [notice] child pid 14016 exit signal Segmentation fault (11)
[Wed Aug 21 12:04:01 2002] [notice] child pid 14017 exit signal Segmentation fault (11)
[Wed Aug 21 12:04:08 2002] [notice] child pid 14018 exit signal Segmentation fault (11)
[Wed Aug 21 12:04:12 2002] [notice] child pid 14019 exit signal Segmentation fault (11)
[Wed Aug 21 12:04:23 2002] [notice] child pid 14029 exit signal Segmentation fault (11)
[Wed Aug 21 12:05:21 2002] [notice] child pid 14026 exit signal Segmentation fault (11)
[Wed Aug 21 12:05:29 2002] [notice] child pid 14028 exit signal Segmentation fault (11)
[Wed Aug 21 12:05:44 2002] [notice] child pid 14022 exit signal Segmentation fault (11)
[Wed Aug 21 12:05:50 2002] [notice] child pid 14082 exit signal Segmentation fault (11)
[Wed Aug 21 12:05:54 2002] [notice] child pid 14027 exit signal Segmentation fault (11)
[Wed Aug 21 12:05:58 2002] [notice] child pid 14083 exit signal Segmentation fault (11)
[Wed Aug 21 12:06:11 2002] [notice] child pid 14086 exit signal Segmentation fault (11)
[Wed Aug 21 12:07:23 2002] [notice] child pid 14087 exit signal Segmentation fault (11)

</snip>


this happens at random intervals, random places on the site. but never immediately 
after
starting apache... only about 1hr later. i've tried disabling everything except the dso
php module, no avail.


here is the apache startup output...

<snip>

Processing config directory: /etc/httpd/conf/httpd.d
 Processing config file: /etc/httpd/conf/httpd.d/landb.conf
[Wed Aug 21 16:00:57 2002] [notice] Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6e 
DAV/1.0.3 PHP/4.2.2 mod_perl/1.27 configured
-- resuming normal operations
[Wed Aug 21 16:00:57 2002] [notice] suEXEC mechanism enabled (wrapper: 
/usr/sbin/suexec)
[Wed Aug 21 16:00:57 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)

</snip>



plz can sumone provide sum light on this  :(



Kind Regards
-- 
Nigel Kukard


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to