|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-24 17:45 UTC] ssruprai at hotmail dot com
I tried to compile php 4.1.1 on RedHat Linux 7.1 with jdk 1.4 beta 2 and apache2 (2_0_28 beta) (because java was not working with apache 1.3.23) with these options: ****************************PHP************************** ./configure --with-apache=/usr/src/httpd-2_0_28 --with-mod_charset --with-config-file-path=/usr/local/lib/php/ --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-cpdflib --with-png-dir --with-jpeg-dir --with-tiff-dir --enable-ctype --with-curl --with-db3 --with-dom --enable-exif --enable-filepro --enable-ftp --with-gd --enable-gd-native-ttf --with-xpm-dir --with-freetype-dir=/usr --with-ttf --with-t1lib --with-gettext --with-gmp --with-hyperwave --with-iconv --with-imap --with-kerberos --with-imap-ssl --with-ircg --with-ldap --enable-mbstring --enable-mbstr-enc-trans --with-mcal=/usr/src/libmcal --with-mhash --with-mnogosearch=/usr/local/mnogosearch --with-mysql --with-pgsql --with-pspell --with-qtdom --enable-trans-sid --enable-shmop --with-snmp -enable-ucd-snmp-hack --enable-sockets --with-regex=php --with-swf --enable-wddx --with-expat-dir=/usr/local --enable-xslt --with-xslt-sablot --with-yaz --enable-yp --with-zip --with-pdflib --enable-versioning --with-tsrm-st --with-tsrm-pthreads --enable-track-vars --enable-overload --with-mcrypt --with-java --enable-sysvsem --enable-sysvshm --with-xmlrpc but php didn't compile because I think source structure of apache 2.0 is different from apache 1.3. So to try compiling php as apache shared module (libphp4.so) I compiled Apache 2.0 beta with these options: ***********************************APACHE 2************* ./configure --enable-auth-anon --enable-auth-db --enable-auth-dbm --enable-auth-digest --enable-file-cache --enable-echo --enable-cache --enable-mem-cache --enable-example --enable-ext-filter --enable-case-filter --enable-case-filter-in --enable-mime-magic --enable-cern-meta --enable-expires --enable-usertrck --enable-unique-id --enable-ssl --enable-optional-hook-export --enable-optional-hook-import --enable-optional-fn-import --enable-optional-fn-export --enable-http --enable-dav --enable-cgi --enable-info --enable-dgid --enable-dav-fs --enable-vhost-alias --enable-speling --enable-actions --enable-rewrite and then compiled php 4.1.1 with these options: *******************************PHP************************ ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mod_charset --with-config-file-path=/usr/local/lib/php/ --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-cpdflib --with-png-dir --with-jpeg-dir --with-tiff-dir --enable-ctype --with-curl --with-db3 --with-dom --enable-exif --enable-filepro --enable-ftp --with-gd --enable-gd-native-ttf --with-xpm-dir --with-freetype-dir=/usr --with-ttf --with-t1lib --with-gettext --with-gmp --with-hyperwave --with-iconv --with-imap --with-kerberos --with-imap-ssl --with-ircg --with-ldap --enable-mbstring --enable-mbstr-enc-trans --with-mcal=/usr/src/libmcal --with-mhash --with-mnogosearch=/usr/local/mnogosearch --with-mysql --with-pgsql --with-pspell --with-qtdom --enable-trans-sid --enable-shmop --with-snmp -enable-ucd-snmp-hack --enable-sockets --with-regex=php --with-swf --enable-wddx --with-expat-dir=/usr/local --enable-xslt --with-xslt-sablot --with-yaz --enable-yp --with-zip --with-pdflib --enable-versioning --with-tsrm-st --with-tsrm-pthreads --enable-track-vars --enable-overload --with-mcrypt --with-java --enable-sysvsem --enable-sysvshm --with-xmlrpc and this time --with-xmlrpc option produced some errors so I removed --with-xmlrpc. Finally, it compiled and a shared module was produced under apache modules directory. LoadModule php4_module entry was automatically made by php install in httpd.conf. I tried AddType application/x-httpd-php but It didn't work then after removing AddType I added this option to httpd.conf <Files *.php> SetOutputFilter PHP SetInputFilter PHP </Files> and then restarted apache but php didn't work and segmentation fault message was added to logs/error_log. I tried to compile it again next day after removing old sources and installed files. But it didn't work and browser waited and waited and then some error like network error was produced by lynx browser. When I examined logs/error_log then same segmentation fault entries like these were added because of php failure.. **************************error_log****************** [Sat Feb 23 20:52:55 2002] [notice] child pid 703 exit signal Segmentation fault (11) [Sat Feb 23 20:53:22 2002] [notice] child pid 706 exit signal Segmentation fault (11) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 23:00:02 2025 UTC |
Hmm .. have you compiled php with thread support? It seems the swf module is missing an ZEND_INIT_MODULE_GLOBALS() call in PHP_MINIT_FUNCTION(). Can you test this patch (against current CVS) ? diff -u -r1.44 swf.c --- swf.c 11 Dec 2001 15:30:38 -0000 1.44 +++ swf.c 7 Mar 2002 22:59:37 -0000 @@ -138,10 +138,19 @@ } /* }}} */ +/* {{{ php_swf_init_globals + */ +static void php_swf_init_globals(zend_swf_globals *swf_globals) { + swf_globals->use_file = 0; + swf_globals->tmpfile_name = NULL; +} + /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(swf) { + ZEND_INIT_MODULE_GLOBALS(swf, php_swf_init_globals, NULL); + REGISTER_LONG_CONSTANT("MOD_COLOR", MOD_COLOR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MOD_MATRIX", MOD_MATRIX, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("TYPE_PUSHBUTTON", TYPE_PUSHBUTTON, CONST_CS | CONST_PERSISTENT);I used php 4.2.3 and apache 2.0.43 this time and swf extension is still causing segmentation fault. PHP Configure -------------- ./configure --with-config-file-path=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs --prefix=/wwwroot/php --enable-trans-sid --with-java --with-swf --enable-debug Here is gdb output when a file with phpinfo() is accessed: [root@sukhwinder php-4.2.3]# gdb /wwwroot/bin/httpd GNU gdb 5.0rh-5 Red Hat Linux 7.1 Copyright 2001 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... (gdb) run -X Starting program: /wwwroot/bin/httpd -X [New Thread 1024 (LWP 9038)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 9038)] 0x40454bf9 in zm_activate_swf (type=1, module_number=2, tsrm_ls=0x8100f60) at swf.c:173 173 SWFG(use_file) = 0; (gdb)