Running Apache 2.0.43, loading php as a module compiled with
./configure --with-apxs2 --disable-cli --disable-cgi 
--with-config-file-path=/usr/local/etc --enable-track-vars --enable-force-cgi-redirect

apache will run and successfully load php4 (cvs php from yesterday) only
if php.ini is empty. If I put anything in it, it dumps core:

#0  0x482ec192 in memcpy () from /usr/lib/libc.so.12
#1  0xbfbf8d08 in ?? ()
#2  0x483ee264 in zend_parse_ini_file (fh=0xbfbfb3bc, unbuffered_errors=1, 
    ini_parser_cb=0x483da754 <php_config_ini_parser_cb>, arg=0x484554e0)
    at /usr/src/local/php4/Zend/zend_ini_parser.y:164
#3  0x483dac88 in php_init_config () at /usr/src/local/php4/main/php_ini.c:412
#4  0x483d697c in php_module_startup (sf=0x48452fe0, 
    additional_modules=0x484531e0, num_additional_modules=1)
    at /usr/src/local/php4/main/main.c:1213
#5  0x48417a66 in php_apache2_startup (sapi_module=0x48452fe0)
    at /usr/src/local/php4/sapi/apache2filter/sapi_apache2.c:295
#6  0x4841821d in php_apache_server_startup (pconf=0x8100018, plog=0x813c018, 
    ptemp=0x8144018, s=0x8103528)
    at /usr/src/local/php4/sapi/apache2filter/sapi_apache2.c:615
#7  0x80ad9a4 in ap_run_post_config (pconf=0x8100018, plog=0x813c018, 
    ptemp=0x8144018, s=0x8103528) at config.c:130
#8  0x80b2cad in main (argc=3, argv=0xbfbfb650) at main.c:632
#9  0x8066b74 in ___start ()

I am looking at the only memcpy() in zend_ini_parser.y, but don't see
any red flags (checked for snprintf returning -1) Any thoughts?

Cheers,

Patrick

BTW I had to do the following to get yesterday's cvs php to compile..

Index: ext/standard/basic_functions.c
===================================================================
RCS file: /repository/php4/ext/standard/basic_functions.c,v
retrieving revision 1.565
diff -u -r1.565 basic_functions.c
--- ext/standard/basic_functions.c      21 Jan 2003 14:53:16 -0000      1.565
+++ ext/standard/basic_functions.c      24 Jan 2003 13:09:43 -0000
@@ -2824,6 +2824,7 @@
                        zend_hash_update(Z_ARRVAL_P(arr), Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1)+1, &
element, sizeof(zval *), NULL);
                        break;
 
+#ifdef ZEND_INI_PARSER_POP_ENTRY
                case ZEND_INI_PARSER_POP_ENTRY:
                {
                        zval *hash, **find_hash;
@@ -2850,6 +2851,7 @@
                        add_next_index_zval(hash, element);                     
                }
                break;
+#endif
 
                case ZEND_INI_PARSER_SECTION:
                        break;
Index: main/php_ini.c
===================================================================
RCS file: /repository/php4/main/php_ini.c,v
retrieving revision 1.109
diff -u -r1.109 php_ini.c
--- main/php_ini.c      19 Jan 2003 12:17:38 -0000      1.109
+++ main/php_ini.c      24 Jan 2003 13:09:43 -0000
@@ -196,6 +196,7 @@
                        }
                        break;
 
+#ifdef ZEND_INI_PARSER_POP_ENTRY
                case ZEND_INI_PARSER_POP_ENTRY: {
                                zval *hash;
                                zval **find_hash;
@@ -222,6 +223,7 @@
                                add_next_index_zval(hash, element);                    
 
                        }
                        break;
+#endif
 
                case ZEND_INI_PARSER_SECTION:
                        break;

-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to