#19964 [NEW]: Fix for bug 19482 missing from latest snapshot

2002-10-18 Thread speedfreak50
From: [EMAIL PROTECTED]
Operating system: Red Hat 7.3
PHP version:  4CVS-2002-10-17
PHP Bug Type: PCRE related
Bug description:  Fix for bug 19482 missing from latest snapshot

Bugfix for #19482 against php-4.2.3 fixed the segfaults but I had to
upgrade our PHP to 4.2.4dev because bug #19829 was nailing us.
After upgrade, the segfaults reappeared.  Checking latest version from
snaps.php.net (200210171200) i noticed the fix for #19482 has disappeared
from php_pcre.c

Wondering if this was intentional or not.  If not intential i will attempt
to generate a backtrace of the more recent segfault.

For now i have re-patched the php4-STABLE-200210171200.tar.gz  version
with the fix from 19482.

-- 
Edit bug report at http://bugs.php.net/?id=19964&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19964&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=19964&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=19964&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19964&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=19964&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=19964&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=19964&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=19964&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=19964&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=19964&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19964&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=19964&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=19964&r=isapi




#19829 [Com]: form array variables get trimmed

2002-10-10 Thread speedfreak50

 ID:   19829
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  4.2.3
 New Comment:

If this was not a large fix, is it possible for you to post what
changes were required so they can be integrated into 4.2.3 until the
next version is released?

If you can do that it would be very (very, very ;>) much appreciated.


Previous Comments:


[2002-10-09 04:05:04] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.



[2002-10-09 04:02:46] [EMAIL PROTECTED]

i have a form with input fields declared like this:

ie. form variables are returned in array 'p'. the problem is that
returned values get cut their first four characters off. 




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




#19482 [Com]: segfault on child process

2002-10-06 Thread speedfreak50

 ID:   19482
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: PCRE related
 Operating System: Redhat 7.3
 PHP Version:  4.2.3,4.3.0-dev
 New Comment:

Note sure if this will be useful, but if i edit main/php_config.h
(after running ./configure) and remove all LOCALE defines, here's a
backtrace of the segfault:

--

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 6702)]
0x403d6c67 in _zval_dtor (zvalue=0x82ad344,
__zend_filename=0x40432520
"/tmp/php-debug/Zend/zend_execute_API.c",
__zend_lineno=291) at /tmp/php-debug/Zend/zend_variables.c:43
43  CHECK_ZVAL_STRING_REL(zvalue);
(gdb) bt
#0  0x403d6c67 in _zval_dtor (zvalue=0x82ad344,
__zend_filename=0x40432520
"/tmp/php-debug/Zend/zend_execute_API.c",
__zend_lineno=291) at /tmp/php-debug/Zend/zend_variables.c:43
#1  0x403cd471 in _zval_ptr_dtor (zval_ptr=0x40463b80,
__zend_filename=0x40434300
"/tmp/php-debug/Zend/zend_execute_locks.h",
__zend_lineno=26) at /tmp/php-debug/Zend/zend_execute_API.c:291
#2  0x403ee0b4 in zend_clean_garbage () at
/tmp/php-debug/Zend/zend_execute_locks.h:26
#3  0x403e7bd5 in execute (op_array=0x82ae564) at
/tmp/php-debug/Zend/zend_execute.c:1050
#4  0x403eab86 in execute (op_array=0x81e95c4) at
/tmp/php-debug/Zend/zend_execute.c:1641
#5  0x403eab86 in execute (op_array=0x8241b2c) at
/tmp/php-debug/Zend/zend_execute.c:1641
#6  0x403d8ad8 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /tmp/php-debug/Zend/zend.c:834
#7  0x403a2542 in php_execute_script (primary_file=0xb700)
at /tmp/php-debug/main/main.c:1542
#8  0x403ef8c2 in apache_php_module_main (r=0x808cf18,
display_source_mode=0)
at /tmp/php-debug/sapi/apache/sapi_apache.c:55
#9  0x403f07bc in send_php (r=0x808cf18, display_source_mode=0,
filename=0x808ebe0 "/var/www/modesmail/horde/imp/redirect.php")
at /tmp/php-debug/sapi/apache/mod_php4.c:564
#10 0x403f0829 in send_parsed_php (r=0x808cf18)
at /tmp/php-debug/sapi/apache/mod_php4.c:579
#11 0x0805475d in ap_invoke_handler ()
#12 0x080672dc in process_request_internal ()
#13 0x08067353 in ap_process_request ()
#14 0x0805f587 in child_main ()
#15 0x0805f72a in make_child ()
---Type  to continue, or q  to quit---
#16 0x0805f86d in startup_children ()
#17 0x0805fec0 in standalone_main ()
#18 0x080607c3 in main ()
#19 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6


Previous Comments:


[2002-10-06 14:47:25] [EMAIL PROTECTED]

(gdb) up
#1  0x40304db2 in pcre_get_compiled_regex (regex=0x8201704 "|MSIE
([0-9.]+)|",
extra=0xbfff7cac, preg_options=0xbfff7ca4)
at /tmp/php4-20021006/ext/pcre/php_pcre.c:158
158 if (!strcmp(pce->locale, locale)) {
(gdb) print locale
$1 = 0x8156760 "en_US.iso885915"
(gdb) print pce
$2 = (pcre_cache_entry *) 0x8133668
(gdb) print pce->locale
$3 = 0x826bde8 



[2002-10-06 07:44:55] [EMAIL PROTECTED]

[EMAIL PROTECTED] :
Can you try that again, but when you hit the segfault,
type the following commands into gdb:

up
print locale
print pce
print pce->locale




[2002-10-06 04:46:27] [EMAIL PROTECTED]

Still getting the segfault at almost the same place.  Seems a lot
easier to reproduce now.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 8821)]
0x4207fb88 in strcmp () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4207fb88 in strcmp () from /lib/i686/libc.so.6
#1  0x40304db2 in pcre_get_compiled_regex (
regex=0x819925c "|Internet Explorer/([0-9.]+)|", extra=0xbfff8ebc,
preg_options=0xbfff8eb4) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:158
#2  0x40305827 in php_pcre_match (ht=3, return_value=0x81353cc,
this_ptr=0x0,
return_value_used=1, global=0) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:408
#3  0x40305e74 in zif_preg_match (ht=3, return_value=0x81353cc,
this_ptr=0x0,
return_value_used=1) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:559
#4  0x403eafa3 in execute (op_array=0x81e5dfc)
at /tmp/php4-20021006/Zend/zend_execute.c:1597
#5  0x403eb1d6 in execute (op_array=0x8198e24)
at /tmp/php4-20021006/Zend/zend_execute.c:1641
#6  0x403eb1d6 in execute (op_array=0x8223314)
at /tmp/php4-20021006/Zend/zend_execute.c:1641
#7  0x403ed202 in execute (op_array=0x817d5e4)
at /tmp/php4-20021006/Zend/zend_execute.c:2163
#8  0x403d9128 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /tmp/php4-20021006/Zend/zend.c:834
#9  0x403a2b92 in php_execute_script (primary_file=0xb6f0)
at /tmp/php4-20021006/main/main.c:1542
#10 0x403eff12 in apache_php

#19482 [Com]: segfault on child process

2002-10-06 Thread speedfreak50

 ID:   19482
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: PCRE related
 Operating System: Redhat 7.3
 PHP Version:  4.2.3,4.3.0-dev
 New Comment:

(gdb) up
#1  0x40304db2 in pcre_get_compiled_regex (regex=0x8201704 "|MSIE
([0-9.]+)|",
extra=0xbfff7cac, preg_options=0xbfff7ca4)
at /tmp/php4-20021006/ext/pcre/php_pcre.c:158
158 if (!strcmp(pce->locale, locale)) {
(gdb) print locale
$1 = 0x8156760 "en_US.iso885915"
(gdb) print pce
$2 = (pcre_cache_entry *) 0x8133668
(gdb) print pce->locale
$3 = 0x826bde8 


Previous Comments:


[2002-10-06 07:44:55] [EMAIL PROTECTED]

[EMAIL PROTECTED] :
Can you try that again, but when you hit the segfault,
type the following commands into gdb:

up
print locale
print pce
print pce->locale




[2002-10-06 04:46:27] [EMAIL PROTECTED]

Still getting the segfault at almost the same place.  Seems a lot
easier to reproduce now.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 8821)]
0x4207fb88 in strcmp () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4207fb88 in strcmp () from /lib/i686/libc.so.6
#1  0x40304db2 in pcre_get_compiled_regex (
regex=0x819925c "|Internet Explorer/([0-9.]+)|", extra=0xbfff8ebc,
preg_options=0xbfff8eb4) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:158
#2  0x40305827 in php_pcre_match (ht=3, return_value=0x81353cc,
this_ptr=0x0,
return_value_used=1, global=0) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:408
#3  0x40305e74 in zif_preg_match (ht=3, return_value=0x81353cc,
this_ptr=0x0,
return_value_used=1) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:559
#4  0x403eafa3 in execute (op_array=0x81e5dfc)
at /tmp/php4-20021006/Zend/zend_execute.c:1597
#5  0x403eb1d6 in execute (op_array=0x8198e24)
at /tmp/php4-20021006/Zend/zend_execute.c:1641
#6  0x403eb1d6 in execute (op_array=0x8223314)
at /tmp/php4-20021006/Zend/zend_execute.c:1641
#7  0x403ed202 in execute (op_array=0x817d5e4)
at /tmp/php4-20021006/Zend/zend_execute.c:2163
#8  0x403d9128 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /tmp/php4-20021006/Zend/zend.c:834
#9  0x403a2b92 in php_execute_script (primary_file=0xb6f0)
at /tmp/php4-20021006/main/main.c:1542
#10 0x403eff12 in apache_php_module_main (r=0x808cf18,
display_source_mode=0)
at /tmp/php4-20021006/sapi/apache/sapi_apache.c:55
#11 0x403f0e0c in send_php (r=0x808cf18, display_source_mode=0,
filename=0x808ec10 "/var/www/modesmail/horde/imp/redirect.php")
at /tmp/php4-20021006/sapi/apache/mod_php4.c:564
#12 0x403f0e79 in send_parsed_php (r=0x808cf18)
---Type  to continue, or q  to quit---
at /tmp/php4-20021006/sapi/apache/mod_php4.c:579
#13 0x0805475d in ap_invoke_handler ()
#14 0x080672dc in process_request_internal ()
#15 0x08067353 in ap_process_request ()
#16 0x0805f587 in child_main ()
#17 0x0805f72a in make_child ()
#18 0x0805f86d in startup_children ()
#19 0x0805fec0 in standalone_main ()
#20 0x080607c3 in main ()
#21 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6



[2002-10-05 09:43:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip





[2002-10-01 15:16:37] [EMAIL PROTECTED]

hello!

i have nearly the same problem...

i've wondered, that sometimes are segfaults in the error_log. i have
installed 
the newest php (4.2.3) & apache (1.3.26) version.

now i have found a cause:

if this in the mail header:
From: ()

imp shows   as sender. with the attempt to open the email, the
apache-
process segfaulted. after some try, i could fetch a strace-log from the
process.

you can found it here: http://dpits.de/segfault.log

thank you!

bye
daniel prior



[2002-09-27 10:53:40] [EMAIL PROTECTED]

I upgraded from 4.1.2 to 4.2.3 yesterday and have seen many seg faults
in the error_log when I came in this morning.

I am using Apache 1.3.26, mod_ssl 2.8.10, Openssl 0.9.6g, Compaq Tru64
4.0G.

My PHP configure is pretty basic:
./configure --with-mysql --with-imap --with-curl --quiet
--with-apxs=(path_to_apxs)

We, also, are using IMP (2.2.7).  I have not tried to produce the
seg-faults



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/19482

--

#19482 [Com]: segfault on child process

2002-10-06 Thread speedfreak50

 ID:   19482
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: PCRE related
 Operating System: Redhat 7.3
 PHP Version:  4.2.3,4.3.0-dev
 New Comment:

Still getting the segfault at almost the same place.  Seems a lot
easier to reproduce now.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 8821)]
0x4207fb88 in strcmp () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4207fb88 in strcmp () from /lib/i686/libc.so.6
#1  0x40304db2 in pcre_get_compiled_regex (
regex=0x819925c "|Internet Explorer/([0-9.]+)|", extra=0xbfff8ebc,
preg_options=0xbfff8eb4) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:158
#2  0x40305827 in php_pcre_match (ht=3, return_value=0x81353cc,
this_ptr=0x0,
return_value_used=1, global=0) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:408
#3  0x40305e74 in zif_preg_match (ht=3, return_value=0x81353cc,
this_ptr=0x0,
return_value_used=1) at
/tmp/php4-20021006/ext/pcre/php_pcre.c:559
#4  0x403eafa3 in execute (op_array=0x81e5dfc)
at /tmp/php4-20021006/Zend/zend_execute.c:1597
#5  0x403eb1d6 in execute (op_array=0x8198e24)
at /tmp/php4-20021006/Zend/zend_execute.c:1641
#6  0x403eb1d6 in execute (op_array=0x8223314)
at /tmp/php4-20021006/Zend/zend_execute.c:1641
#7  0x403ed202 in execute (op_array=0x817d5e4)
at /tmp/php4-20021006/Zend/zend_execute.c:2163
#8  0x403d9128 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /tmp/php4-20021006/Zend/zend.c:834
#9  0x403a2b92 in php_execute_script (primary_file=0xb6f0)
at /tmp/php4-20021006/main/main.c:1542
#10 0x403eff12 in apache_php_module_main (r=0x808cf18,
display_source_mode=0)
at /tmp/php4-20021006/sapi/apache/sapi_apache.c:55
#11 0x403f0e0c in send_php (r=0x808cf18, display_source_mode=0,
filename=0x808ec10 "/var/www/modesmail/horde/imp/redirect.php")
at /tmp/php4-20021006/sapi/apache/mod_php4.c:564
#12 0x403f0e79 in send_parsed_php (r=0x808cf18)
---Type  to continue, or q  to quit---
at /tmp/php4-20021006/sapi/apache/mod_php4.c:579
#13 0x0805475d in ap_invoke_handler ()
#14 0x080672dc in process_request_internal ()
#15 0x08067353 in ap_process_request ()
#16 0x0805f587 in child_main ()
#17 0x0805f72a in make_child ()
#18 0x0805f86d in startup_children ()
#19 0x0805fec0 in standalone_main ()
#20 0x080607c3 in main ()
#21 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6


Previous Comments:


[2002-10-05 09:43:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip





[2002-10-01 15:16:37] [EMAIL PROTECTED]

hello!

i have nearly the same problem...

i've wondered, that sometimes are segfaults in the error_log. i have
installed 
the newest php (4.2.3) & apache (1.3.26) version.

now i have found a cause:

if this in the mail header:
From: ()

imp shows   as sender. with the attempt to open the email, the
apache-
process segfaulted. after some try, i could fetch a strace-log from the
process.

you can found it here: http://dpits.de/segfault.log

thank you!

bye
daniel prior



[2002-09-27 10:53:40] [EMAIL PROTECTED]

I upgraded from 4.1.2 to 4.2.3 yesterday and have seen many seg faults
in the error_log when I came in this morning.

I am using Apache 1.3.26, mod_ssl 2.8.10, Openssl 0.9.6g, Compaq Tru64
4.0G.

My PHP configure is pretty basic:
./configure --with-mysql --with-imap --with-curl --quiet
--with-apxs=(path_to_apxs)

We, also, are using IMP (2.2.7).  I have not tried to produce the
seg-faults



[2002-09-25 14:51:06] [EMAIL PROTECTED]

I'm encounting this same bug using Horde/IMP/Turba (2.1/3.1/1.1) on Red
Hat 7.3 with all updates (except mm-1.1.3-8 which seems to cause
problems with  Apache restarts) and here's what i've tried:

- compiling Apache (1.3.26), PHP (4.2.3), and mod_ssl (2.8.10) without
mm support
- compiling PHP 4.2.3 without mm support and using the pcre library
packaged with Red Hat 
- downloading a fresh pcre library (v3.9) and compiling PHP against
that.
- compiling everything with mm support and external pcre library (3.9)

In each case the same segfault occurs.
If i compile the software (Apache, mod_ssl, PHP) with debugging symbols
i can't get the segfault to occur.  Been through about 300 test
messages and it still hasn't segfaulted.
This is driving me nuts.



[2002-09-20 09:33:51] [EMAIL PROTECTED]

Using php.ini-recommended fixed the zlib p

#19482 [Com]: segfault on child process

2002-09-25 Thread speedfreak50

 ID:   19482
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: PCRE related
 Operating System: Redhat 7.3
 PHP Version:  4.2.3,4.3.0-dev
 New Comment:

I'm encounting this same bug using Horde/IMP/Turba (2.1/3.1/1.1) on Red
Hat 7.3 with all updates (except mm-1.1.3-8 which seems to cause
problems with  Apache restarts) and here's what i've tried:

- compiling Apache (1.3.26), PHP (4.2.3), and mod_ssl (2.8.10) without
mm support
- compiling PHP 4.2.3 without mm support and using the pcre library
packaged with Red Hat 
- downloading a fresh pcre library (v3.9) and compiling PHP against
that.
- compiling everything with mm support and external pcre library (3.9)

In each case the same segfault occurs.
If i compile the software (Apache, mod_ssl, PHP) with debugging symbols
i can't get the segfault to occur.  Been through about 300 test
messages and it still hasn't segfaulted.
This is driving me nuts.


Previous Comments:


[2002-09-20 09:33:51] [EMAIL PROTECTED]

Using php.ini-recommended fixed the zlib problem.  So now I am able to
use the snapshot normally.  However, I ran apache within gdb and I got
pretty much the exact same backtrace as I got with 4.2.3.  I guess it
looks like a PCRE problem.  Please let me know what I need to do next
and thanks for the quick response



[2002-09-20 07:09:48] [EMAIL PROTECTED]

I guess the zlib issue is with the output buffering.
Check your php.ini settings. (and try using the php.ini-dist as base
for your new one..)

And the original problem, if the backtrace you get now is
about the same as the one you already pasted here, don't add another
one. Reclassified as PCRE related.




[2002-09-20 01:42:06] [EMAIL PROTECTED]

sorry, i forgot to mention that I tried running the snapshot without
zlib support (and png and dom xml support) and got IMP to somewhat work
under that environment.  However, like I said previously the snapshot
did not fix the seg fault problem I am having.  Please let me know what
you want to do next

Thanks



[2002-09-20 01:40:23] [EMAIL PROTECTED]

unfortunately, this does not fix the original problem, I still get seg
faults when viewing messages (no particular message).  I'll try to post
a backtrace a little later



[2002-09-20 01:22:45] [EMAIL PROTECTED]

Ok, did this with the new snapshot, however I've figured out what
causes the PHP 4.3.0-dev to hang.  Basically if I use the --with-zlib
configure option, a simple  fails to load correctly.  If I
take this option out, then the  displays correctly.  I
then tried to reinstall zlib (in case it was somehow messed up in
RedHat) but that made no difference.  I tried different variations of
--with-zlib such as:

* --with-zlib
* --with-zlib=/usr/local
* --with-zlib=/usr
* --with-zlib=/usr/local --with-zlib-dir=/usr/local
* --with-zlib=/usr --with-zlib-dir=/usr

If I use any of these, PHP scripts fail to load with the new dev
snapshot.  However, I am using this option with 4.2.3 with no problems.
 Maybe its a bug in the dev snapshot?  If you need any more information
let me know.

Thanks



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/19482

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