ID:               15703
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         SWF related
 Operating System: Red Hat Linux 7.1
 PHP Version:      4.1.1
 New Comment:

This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/. 
Thank you for the report.




Previous Comments:
------------------------------------------------------------------------

[2002-04-25 18:27:59] [EMAIL PROTECTED]

This has been hiding as feedback under Apache2, but it's 
most likely not Apache2 related, and I didn't want this 
patch, if valid, to be forgotten.  So I'm reopening and 
reclassifying as SWF related. 
Thanks... 

------------------------------------------------------------------------

[2002-04-19 11:41:19] [EMAIL PROTECTED]

Please try again with Apache 2.0.35 (GA) and PHP from
CVS (either the 4.2.0 branch or HEAD).

------------------------------------------------------------------------

[2002-03-08 14:46:48] [EMAIL PROTECTED]

I don't know much about cvs and how diff works. So I couldn't make
anything out of these lines. One thing I did was, removed --with-swf
from configure option and everything worked fine. I want to help but I
have a very slow pentium-1 computer and a slow dial up connection (in
punjab-IN) so it takes at least one hour to compile php alone. I know
little C so if you tell me what to add, what to remove and where then I
can make that change and try to compile again and see if that works.

------------------------------------------------------------------------

[2002-03-07 18:00:41] [EMAIL PROTECTED]

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);

------------------------------------------------------------------------

[2002-03-07 17:04:24] [EMAIL PROTECTED]

This time I compiled php with --enable-debug option to generate
backtrace.A
new file cgisock (0 size) is automatically created after this compile.
I think
problem is related to swf functions(swf.c). gdb results are at the
end:

-----------------------------------APACHE
2-------------------------------
./configure --prefix=/wwwroot --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-usertrack
--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-cgid --enable-dav-fs 
--enable-vhost-alias --enable-speling --enable-actions --enable-rewrite

--enable-so

--------------------------------------PHP
4.1.1--------------------------
./configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs 
--with-mod_charset --with-config-file-path=/wwwroot/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=/usr/local/lib --enable-yp --with-zip --with-pdflib 
--enable-versioning --with-tsrm-st --with-tsrm-pthreads 
--enable-track-vars --enable-overload --with-mcrypt 
--with-java=/usr/java/j2sdk1.4.0 --enable-sysvsem --enable-sysvshm 
--enable-debug


After making and installing both apache and php when I started apache
and 
tried to access http://localhost. It worked and apache test page was
displayed.
Then I tried to access a php file with only phpinfo() function.
Netscape displayed a message the document contained no date. Follwing
was added to apache error_log:

-------------------------------------------------------------------------------
[Fri Mar 08 02:12:54 2002] [notice] Digest: generating secret for
digest authentication ...
[Fri Mar 08 02:12:54 2002] [notice] Digest: done
[Fri Mar 08 02:12:55 2002] [notice] Apache/2.0.28 (Unix) mod_ssl/3.0a0
OpenSSL/0.9.6 DAV/2 configured -- resuming normal operations
[Fri Mar 08 02:13:16 2002] [error] Optional hook test said: GET /
HTTP/1.0
[Fri Mar 08 02:13:16 2002] [error] Optional function test said: GET /
HTTP/1.0
[Fri Mar 08 02:13:16 2002] [error] Optional hook test said: GET
/apache_pb.gif HTTP/1.0
[Fri Mar 08 02:13:16 2002] [error] Optional function test said: GET
/apache_pb.gif HTTP/1.0
[Fri Mar 08 02:14:47 2002] [notice] child pid 4472 exit signal
Segmentation fault (11)
--------------------------------------------------------------------

I stoped apache removed all logs files and tried /wwwroot/bin/httpd -X

after running 'ulimit -c unlimited' and 
then accessed a php file with phpinfo() and lynx displayed unable to 
access start document...unkonwn network error and exited. 
/wwwroot/bin/httpd -X produced:

Segmentation fault

and exited.

No core file is produced under /wwwroot/bin (/wwwroot is apache 2.0 
install directory). /wwwroot/bin has write permission for everyone.
Then I
tried the second option like this and was successful:

-------------------------------------------

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 763)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 763)]
0x405e52c1 in zm_activate_swf (type=1, module_number=8,
tsrm_ls=0x81e7210)
    at swf.c:173
173             SWFG(use_file) = 0;

(gdb) bt
#0  0x405e52c1 in zm_activate_swf (type=1, module_number=8,
tsrm_ls=0x81e7210)
    at swf.c:173
#1  0x404b08f1 in module_registry_request_startup (module=0x81f7c00, 
    tsrm_ls=0x81e7210) at zend_API.c:1145
#2  0x404b2b3d in zend_hash_apply (ht=0x407dee40, 
    apply_func=0x404b08c8 <module_registry_request_startup>,
tsrm_ls=0x81e7210)
    at zend_hash.c:669
#3  0x404ad2fe in zend_activate_modules (tsrm_ls=0x81e7210) at
zend.c:577
#4  0x404ba9e0 in php_request_startup (tsrm_ls=0x81e7210) at
main.c:684
#5  0x404b8fd7 in php_apache_request_ctor (f=0x819c244, ctx=0x8190d7c,

    tsrm_ls=0x81e7210) at sapi_apache2.c:290
#6  0x404b90ff in php_output_filter (f=0x819c244, bb=0x819c3bc)
    at sapi_apache2.c:326
#7  0x080c12bc in ap_pass_brigade (next=0x819c244, bb=0x819c3bc)
    at util_filter.c:276
#8  0x080c7659 in default_handler (r=0x81872c4) at core.c:2785
#9  0x080b67b4 in ap_run_handler (r=0x81872c4) at config.c:185
#10 0x080b6cf6 in ap_invoke_handler (r=0x81872c4) at config.c:344
#11 0x0808c2ce in ap_process_request (r=0x81872c4) at
http_request.c:286
#12 0x0808853e in ap_process_http_connection (c=0x8182f44) at
http_core.c:289
#13 0x080bf9f0 in ap_run_process_connection (c=0x8182f44) at
connection.c:82
#14 0x080bfb85 in ap_process_connection (c=0x8182f44) at
connection.c:219
#15 0x080b5390 in child_main (child_num_arg=0) at prefork.c:803
---Type <return> to continue, or q <return> to quit--
#16 0x080b5441 in make_child (s=0x8105994, slot=0) at prefork.c:839
#17 0x080b5553 in startup_children (number_to_start=5) at
prefork.c:913
#18 0x080b5997 in ap_mpm_run (_pconf=0x81031ec, plog=0x814b42c,
s=0x8105994)
    at prefork.c:1129
#19 0x080baac8 in main (argc=2, argv=0xbffffa14) at main.c:432
#20 0x402dfe5e in __libc_start_main (main=0x80ba588 <main>, argc=2, 
    ubp_av=0xbffffa14, init=0x8063240 <_init>, fini=0x80d1950 <_fini>,

    rtld_fini=0x4000d3c4 <_dl_fini>, stack_end=0xbffffa0c)
    at ../sysdeps/generic/libc-start.c:129


(gdb)

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/15703

-- 
Edit this bug report at http://bugs.php.net/?id=15703&edit=1

Reply via email to