#39749 [Fbk-Opn]: function call returns crash under certain conditions

2006-12-06 Thread steve-php-dev at spamwiz dot com
 ID:   39749
 User updated by:  steve-php-dev at spamwiz dot com
 Reported By:  steve-php-dev at spamwiz dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 3
 PHP Version:  5.2.0
 New Comment:

As I stated earlier, the problem does NOT happen if I enable debug.


Previous Comments:


[2006-12-06 11:57:58] [EMAIL PROTECTED]

Please try to get some more information using valgrind (and
--enable-debug).



[2006-12-06 00:09:24] steve-php-dev at spamwiz dot com

The problem actually occurs on several different machines, whenever I
use the RPM built with those configure options.  I've tried it on a 2.4
GHz Celeron, a 1 GHz Duron, and a 2.66 GHz P4.  Using my alternate RPM
that has the other configure options, I don't see the problem.

That's fortunate, because the one without the problem is the one on all
of my production machines.  The problem only happens on my monitoring
machine.

The problem does not happen in CLI, however the configure options are
(yet again) different.  I have three different CLI versions, and it
works with all three.  Here are their configure options:

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/cli.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--enable-mbstring'
'--with-openssl' '--disable-cgi' '--enable-pcntl' '--without-pear'
'--enable-soap' '--with-rrdtool' '--with-snmp' '--with-gmp'
'--without-spl' '--without-sqlite' '--without-pdo'

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/cli.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--disable-cgi' '--enable-soap'
'--with-readline' '--with-zlib' '--with-ldap' '--with-ncurses'
'--with-imap' '--with-imap-ssl' '--with-kerberos=/usr/kerberos'
'--with-gmp' '--without-spl' '--without-sqlite' '--without-pdo'

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/gd.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--enable-mbstring'
'--with-openssl' '--disable-cgi' '--enable-pcntl' '--without-pear'
'--enable-soap' '--with-gd' '--enable-gd-native-ttf'



[2006-12-05 23:37:29] [EMAIL PROTECTED]

What is the difference between these two servers?
Could you try to run this code with CLI and valgrind?



[2006-12-05 23:29:53] steve-php-dev at spamwiz dot com

It still happens with the CVS version.



[2006-12-05 23:04:55] [EMAIL PROTECTED]

Ok, great.



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

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


#39749 [Fbk-Opn]: function call returns crash under certain conditions

2006-12-06 Thread steve-php-dev at spamwiz dot com
 ID:   39749
 User updated by:  steve-php-dev at spamwiz dot com
 Reported By:  steve-php-dev at spamwiz dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 3
 PHP Version:  5.2.0
 New Comment:

I have fixed the problem by changing the CFLAGS variable from O3 -mmmx
-march=i686 -mcpu=i686 -funroll-loops to -O3 -msse -mmmx -march=i686
-mcpu=pentium4 -mfpmath=sse -funroll-loops.  I'm not sure how that
helps, but it's the only thing that fixed it.  The second one is the
CFLAGS used by my other RPM build of apache+php.


Previous Comments:


[2006-12-06 23:00:04] [EMAIL PROTECTED]

Yes, I know. But this just means that with valgrind you should be able
to see more.
Run it this way:
USE_ZEND_ALLOC=0 valgrind --tool=memcheck php script.php



[2006-12-06 22:44:46] steve-php-dev at spamwiz dot com

As I stated earlier, the problem does NOT happen if I enable debug.



[2006-12-06 11:57:58] [EMAIL PROTECTED]

Please try to get some more information using valgrind (and
--enable-debug).



[2006-12-06 00:09:24] steve-php-dev at spamwiz dot com

The problem actually occurs on several different machines, whenever I
use the RPM built with those configure options.  I've tried it on a 2.4
GHz Celeron, a 1 GHz Duron, and a 2.66 GHz P4.  Using my alternate RPM
that has the other configure options, I don't see the problem.

That's fortunate, because the one without the problem is the one on all
of my production machines.  The problem only happens on my monitoring
machine.

The problem does not happen in CLI, however the configure options are
(yet again) different.  I have three different CLI versions, and it
works with all three.  Here are their configure options:

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/cli.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--enable-mbstring'
'--with-openssl' '--disable-cgi' '--enable-pcntl' '--without-pear'
'--enable-soap' '--with-rrdtool' '--with-snmp' '--with-gmp'
'--without-spl' '--without-sqlite' '--without-pdo'

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/cli.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--disable-cgi' '--enable-soap'
'--with-readline' '--with-zlib' '--with-ldap' '--with-ncurses'
'--with-imap' '--with-imap-ssl' '--with-kerberos=/usr/kerberos'
'--with-gmp' '--without-spl' '--without-sqlite' '--without-pdo'

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/gd.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--enable-mbstring'
'--with-openssl' '--disable-cgi' '--enable-pcntl' '--without-pear'
'--enable-soap' '--with-gd' '--enable-gd-native-ttf'



[2006-12-05 23:37:29] [EMAIL PROTECTED]

What is the difference between these two servers?
Could you try to run this code with CLI and valgrind?



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

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


#39749 [NEW]: array_merge() crashes under certain conditions

2006-12-05 Thread steve-php-dev at spamwiz dot com
From: steve-php-dev at spamwiz dot com
Operating system: CentOS 3
PHP version:  5.2.0
PHP Bug Type: Reproducible crash
Bug description:  array_merge() crashes under certain conditions

Description:

If more than two arrays are passed to array_merge(), I get a segfault. 
This happens on one server, but not another.  Here is the configure
command for the one that has the problem, followed by the configure for
the one that does not have the problem:

BAD SERVER
'./configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config'
'--with-zlib' '--enable-soap' '--enable-mbstring' '--with-openssl'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/apache.d'
'--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear'
'--disable-cli' '--with-imap' '--with-imap-ssl' '--with-ldap'
'--with-kerberos' '--with-gmp' '--without-spl' '--without-sqlite'
'--without-pdo' '--enable-gd-native-ttf' '--with-gd' '--with-png-dir'
'--with-freetype-dir' '--with-mssql'


GOOD SERVER
'./configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config'
'--enable-soap' '--with-zlib' '--enable-mbstring' '--with-openssl'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/apache.d'
'--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear'
'--disable-cli' '--with-gmp' '--without-spl' '--without-sqlite'
'--without-pdo'

Reproduce code:
---
?

$arr1 = array(1, 2, 3);
$arr2 = array(4, 5, 6);
$arr3 = array(7, 8, 9);

$arr = array_merge($arr1, $arr2, $arr3);

header(Content-Type: text/plain);
print_r($arr);

?

Expected result:

Array
(
[0] = 1
[1] = 2
[2] = 3
[3] = 4
[4] = 5
[5] = 6
[6] = 7
[7] = 8
[8] = 9
)


Actual result:
--
segfault

-- 
Edit bug report at http://bugs.php.net/?id=39749edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39749r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39749r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39749r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39749r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39749r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39749r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39749r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39749r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39749r=support
Expected behavior:http://bugs.php.net/fix.php?id=39749r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39749r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39749r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39749r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39749r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39749r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39749r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39749r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39749r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39749r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39749r=mysqlcfg


#39749 [Fbk-Opn]: function call returns crash under certain conditions

2006-12-05 Thread steve-php-dev at spamwiz dot com
 ID:   39749
 User updated by:  steve-php-dev at spamwiz dot com
-Summary:  array_merge() crashes under certain conditions
 Reported By:  steve-php-dev at spamwiz dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 3
 PHP Version:  5.2.0
 New Comment:

The following produces a segfault:

?

function function_call($arg1, $arg2, $arg3) {}

$arr1 = array(1, 2, 3);
$arr2 = array(4, 5, 6);
$arr3 = array(7, 8, 9);

$arr = function_call($arr1, $arr2, $arr3);

echo done;

?

If you echo something and exit inside the function, it does not
segfault.


Previous Comments:


[2006-12-05 22:00:56] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.

What is the difference between these two servers?



[2006-12-05 21:47:35] steve-php-dev at spamwiz dot com

Description:

If more than two arrays are passed to array_merge(), I get a segfault. 
This happens on one server, but not another.  Here is the configure
command for the one that has the problem, followed by the configure for
the one that does not have the problem:

BAD SERVER
'./configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config'
'--with-zlib' '--enable-soap' '--enable-mbstring' '--with-openssl'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/apache.d'
'--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear'
'--disable-cli' '--with-imap' '--with-imap-ssl' '--with-ldap'
'--with-kerberos' '--with-gmp' '--without-spl' '--without-sqlite'
'--without-pdo' '--enable-gd-native-ttf' '--with-gd' '--with-png-dir'
'--with-freetype-dir' '--with-mssql'


GOOD SERVER
'./configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config'
'--enable-soap' '--with-zlib' '--enable-mbstring' '--with-openssl'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/apache.d'
'--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear'
'--disable-cli' '--with-gmp' '--without-spl' '--without-sqlite'
'--without-pdo'

Reproduce code:
---
?

$arr1 = array(1, 2, 3);
$arr2 = array(4, 5, 6);
$arr3 = array(7, 8, 9);

$arr = array_merge($arr1, $arr2, $arr3);

header(Content-Type: text/plain);
print_r($arr);

?

Expected result:

Array
(
[0] = 1
[1] = 2
[2] = 3
[3] = 4
[4] = 5
[5] = 6
[6] = 7
[7] = 8
[8] = 9
)


Actual result:
--
segfault





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


#39749 [Fbk-Opn]: function call returns crash under certain conditions

2006-12-05 Thread steve-php-dev at spamwiz dot com
 ID:   39749
 User updated by:  steve-php-dev at spamwiz dot com
 Reported By:  steve-php-dev at spamwiz dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 3
 PHP Version:  5.2.0
 New Comment:

(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1218542944 (LWP 8821)]
Processing config directory: /usr/local/apache/conf/vhosts/*.conf
 Processing config file: /usr/local/apache/conf/vhosts/dev-apache.conf
 Processing config file: /usr/local/apache/conf/vhosts/empty.conf
Processing config directory: /etc/httpd/conf.d/*.conf
 Processing config file: /etc/httpd/conf.d/apt-proxy.conf
 Processing config file: /etc/httpd/conf.d/monitor.conf
 Processing config file: /etc/httpd/conf.d/nagios.conf
[Tue Dec  5 15:49:35 2006] [warn] NameVirtualHost *:80 has no
VirtualHosts

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218542944 (LWP 8821)]
0x080e294e in _zval_ptr_dtor ()
(gdb) bt
#0  0x080e294e in _zval_ptr_dtor ()
#1  0x08109698 in zend_get_zval_ptr_ptr ()
#2  0x08108b28 in execute ()
#3  0x080eecae in zend_execute_scripts ()
#4  0x080b6161 in php_execute_script ()
#5  0x0814fa6a in apache_php_module_main ()
#6  0x080ac6b8 in ap_get_server_built ()
#7  0x080abc71 in ap_get_server_built ()
#8  0x083f0043 in ap_invoke_handler ()
#9  0x08409857 in ap_update_mtime ()
#10 0x08408941 in ap_process_request ()
#11 0x0840179e in suck_in_ap_validate_password ()
#12 0x083fff68 in suck_in_ap_validate_password ()
#13 0x083fef95 in suck_in_ap_validate_password ()
#14 0x083fcb26 in main ()
(gdb)


Previous Comments:


[2006-12-05 22:41:22] steve-php-dev at spamwiz dot com

The following produces a segfault:

?

function function_call($arg1, $arg2, $arg3) {}

$arr1 = array(1, 2, 3);
$arr2 = array(4, 5, 6);
$arr3 = array(7, 8, 9);

$arr = function_call($arr1, $arr2, $arr3);

echo done;

?

If you echo something and exit inside the function, it does not
segfault.



[2006-12-05 22:00:56] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.

What is the difference between these two servers?



[2006-12-05 21:47:35] steve-php-dev at spamwiz dot com

Description:

If more than two arrays are passed to array_merge(), I get a segfault. 
This happens on one server, but not another.  Here is the configure
command for the one that has the problem, followed by the configure for
the one that does not have the problem:

BAD SERVER
'./configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config'
'--with-zlib' '--enable-soap' '--enable-mbstring' '--with-openssl'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/apache.d'
'--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear'
'--disable-cli' '--with-imap' '--with-imap-ssl' '--with-ldap'
'--with-kerberos' '--with-gmp' '--without-spl' '--without-sqlite'
'--without-pdo' '--enable-gd-native-ttf' '--with-gd' '--with-png-dir'
'--with-freetype-dir' '--with-mssql'


GOOD SERVER
'./configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config'
'--enable-soap' '--with-zlib' '--enable-mbstring' '--with-openssl'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/apache.d'
'--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear'
'--disable-cli' '--with-gmp' '--without-spl' '--without-sqlite'
'--without-pdo'

Reproduce code:
---
?

$arr1 = array(1, 2, 3);
$arr2 = array(4, 5, 6);
$arr3 = array(7, 8, 9);

$arr = array_merge($arr1, $arr2, $arr3);

header(Content-Type: text/plain);
print_r($arr);

?

Expected result:

Array
(
[0] = 1
[1] = 2
[2] = 3
[3] = 4
[4] = 5
[5] = 6
[6] = 7
[7] = 8
[8] = 9
)


Actual result:
--
segfault





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


#39749 [Fbk-Opn]: function call returns crash under certain conditions

2006-12-05 Thread steve-php-dev at spamwiz dot com
 ID:   39749
 User updated by:  steve-php-dev at spamwiz dot com
 Reported By:  steve-php-dev at spamwiz dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 3
 PHP Version:  5.2.0
 New Comment:

I'm downloading the CVS version now.  I neglected to --enable-debug
when generating the backtrace.  When it was enabled, the problem didn't
occur, however.  I will update again after trying the latest CVS.


Previous Comments:


[2006-12-05 22:57:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-12-05 22:51:06] steve-php-dev at spamwiz dot com

(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1218542944 (LWP 8821)]
Processing config directory: /usr/local/apache/conf/vhosts/*.conf
 Processing config file: /usr/local/apache/conf/vhosts/dev-apache.conf
 Processing config file: /usr/local/apache/conf/vhosts/empty.conf
Processing config directory: /etc/httpd/conf.d/*.conf
 Processing config file: /etc/httpd/conf.d/apt-proxy.conf
 Processing config file: /etc/httpd/conf.d/monitor.conf
 Processing config file: /etc/httpd/conf.d/nagios.conf
[Tue Dec  5 15:49:35 2006] [warn] NameVirtualHost *:80 has no
VirtualHosts

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218542944 (LWP 8821)]
0x080e294e in _zval_ptr_dtor ()
(gdb) bt
#0  0x080e294e in _zval_ptr_dtor ()
#1  0x08109698 in zend_get_zval_ptr_ptr ()
#2  0x08108b28 in execute ()
#3  0x080eecae in zend_execute_scripts ()
#4  0x080b6161 in php_execute_script ()
#5  0x0814fa6a in apache_php_module_main ()
#6  0x080ac6b8 in ap_get_server_built ()
#7  0x080abc71 in ap_get_server_built ()
#8  0x083f0043 in ap_invoke_handler ()
#9  0x08409857 in ap_update_mtime ()
#10 0x08408941 in ap_process_request ()
#11 0x0840179e in suck_in_ap_validate_password ()
#12 0x083fff68 in suck_in_ap_validate_password ()
#13 0x083fef95 in suck_in_ap_validate_password ()
#14 0x083fcb26 in main ()
(gdb)



[2006-12-05 22:41:22] steve-php-dev at spamwiz dot com

The following produces a segfault:

?

function function_call($arg1, $arg2, $arg3) {}

$arr1 = array(1, 2, 3);
$arr2 = array(4, 5, 6);
$arr3 = array(7, 8, 9);

$arr = function_call($arr1, $arr2, $arr3);

echo done;

?

If you echo something and exit inside the function, it does not
segfault.



[2006-12-05 22:00:56] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.

What is the difference between these two servers?



[2006-12-05 21:47:35] steve-php-dev at spamwiz dot com

Description:

If more than two arrays are passed to array_merge(), I get a segfault. 
This happens on one server, but not another.  Here is the configure
command for the one that has the problem, followed by the configure for
the one that does not have the problem:

BAD SERVER
'./configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config'
'--with-zlib' '--enable-soap' '--enable-mbstring' '--with-openssl'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/apache.d'
'--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear'
'--disable-cli' '--with-imap' '--with-imap-ssl' '--with-ldap'
'--with-kerberos' '--with-gmp' '--without-spl' '--without-sqlite'
'--without-pdo' '--enable-gd-native-ttf' '--with-gd' '--with-png-dir'
'--with-freetype-dir' '--with-mssql'


GOOD SERVER
'./configure' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config'
'--enable-soap' '--with-zlib' '--enable-mbstring' '--with-openssl'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/apache.d'
'--with-apache=../apache_1.3.37' '--enable-track-vars' '--without-pear'
'--disable-cli' '--with-gmp' '--without-spl' '--without-sqlite'
'--without-pdo'

Reproduce code:
---
?

$arr1 = array(1, 2, 3);
$arr2 = array(4, 5, 6);
$arr3 = array(7, 8, 9);

$arr = array_merge($arr1, $arr2, $arr3);

header(Content-Type: text/plain);
print_r($arr

#39749 [Fbk-Opn]: function call returns crash under certain conditions

2006-12-05 Thread steve-php-dev at spamwiz dot com
 ID:   39749
 User updated by:  steve-php-dev at spamwiz dot com
 Reported By:  steve-php-dev at spamwiz dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 3
 PHP Version:  5.2.0
 New Comment:

It still happens with the CVS version.


Previous Comments:


[2006-12-05 23:04:55] [EMAIL PROTECTED]

Ok, great.



[2006-12-05 23:04:16] steve-php-dev at spamwiz dot com

I'm downloading the CVS version now.  I neglected to --enable-debug
when generating the backtrace.  When it was enabled, the problem didn't
occur, however.  I will update again after trying the latest CVS.



[2006-12-05 22:57:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-12-05 22:51:06] steve-php-dev at spamwiz dot com

(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1218542944 (LWP 8821)]
Processing config directory: /usr/local/apache/conf/vhosts/*.conf
 Processing config file: /usr/local/apache/conf/vhosts/dev-apache.conf
 Processing config file: /usr/local/apache/conf/vhosts/empty.conf
Processing config directory: /etc/httpd/conf.d/*.conf
 Processing config file: /etc/httpd/conf.d/apt-proxy.conf
 Processing config file: /etc/httpd/conf.d/monitor.conf
 Processing config file: /etc/httpd/conf.d/nagios.conf
[Tue Dec  5 15:49:35 2006] [warn] NameVirtualHost *:80 has no
VirtualHosts

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218542944 (LWP 8821)]
0x080e294e in _zval_ptr_dtor ()
(gdb) bt
#0  0x080e294e in _zval_ptr_dtor ()
#1  0x08109698 in zend_get_zval_ptr_ptr ()
#2  0x08108b28 in execute ()
#3  0x080eecae in zend_execute_scripts ()
#4  0x080b6161 in php_execute_script ()
#5  0x0814fa6a in apache_php_module_main ()
#6  0x080ac6b8 in ap_get_server_built ()
#7  0x080abc71 in ap_get_server_built ()
#8  0x083f0043 in ap_invoke_handler ()
#9  0x08409857 in ap_update_mtime ()
#10 0x08408941 in ap_process_request ()
#11 0x0840179e in suck_in_ap_validate_password ()
#12 0x083fff68 in suck_in_ap_validate_password ()
#13 0x083fef95 in suck_in_ap_validate_password ()
#14 0x083fcb26 in main ()
(gdb)



[2006-12-05 22:41:22] steve-php-dev at spamwiz dot com

The following produces a segfault:

?

function function_call($arg1, $arg2, $arg3) {}

$arr1 = array(1, 2, 3);
$arr2 = array(4, 5, 6);
$arr3 = array(7, 8, 9);

$arr = function_call($arr1, $arr2, $arr3);

echo done;

?

If you echo something and exit inside the function, it does not
segfault.



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

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


#39749 [Fbk-Opn]: function call returns crash under certain conditions

2006-12-05 Thread steve-php-dev at spamwiz dot com
 ID:   39749
 User updated by:  steve-php-dev at spamwiz dot com
 Reported By:  steve-php-dev at spamwiz dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: CentOS 3
 PHP Version:  5.2.0
 New Comment:

The problem actually occurs on several different machines, whenever I
use the RPM built with those configure options.  I've tried it on a 2.4
GHz Celeron, a 1 GHz Duron, and a 2.66 GHz P4.  Using my alternate RPM
that has the other configure options, I don't see the problem.

That's fortunate, because the one without the problem is the one on all
of my production machines.  The problem only happens on my monitoring
machine.

The problem does not happen in CLI, however the configure options are
(yet again) different.  I have three different CLI versions, and it
works with all three.  Here are their configure options:

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/cli.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--enable-mbstring'
'--with-openssl' '--disable-cgi' '--enable-pcntl' '--without-pear'
'--enable-soap' '--with-rrdtool' '--with-snmp' '--with-gmp'
'--without-spl' '--without-sqlite' '--without-pdo'

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/cli.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--disable-cgi' '--enable-soap'
'--with-readline' '--with-zlib' '--with-ldap' '--with-ncurses'
'--with-imap' '--with-imap-ssl' '--with-kerberos=/usr/kerberos'
'--with-gmp' '--without-spl' '--without-sqlite' '--without-pdo'

'./configure' '--mandir=/usr/share/man'
'--with-config-file-path=/etc/php'
'--with-config-file-scan-dir=/etc/php/gd.d' '--with-mysql=/usr'
'--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--enable-mbstring'
'--with-openssl' '--disable-cgi' '--enable-pcntl' '--without-pear'
'--enable-soap' '--with-gd' '--enable-gd-native-ttf'


Previous Comments:


[2006-12-05 23:37:29] [EMAIL PROTECTED]

What is the difference between these two servers?
Could you try to run this code with CLI and valgrind?



[2006-12-05 23:29:53] steve-php-dev at spamwiz dot com

It still happens with the CVS version.



[2006-12-05 23:04:55] [EMAIL PROTECTED]

Ok, great.



[2006-12-05 23:04:16] steve-php-dev at spamwiz dot com

I'm downloading the CVS version now.  I neglected to --enable-debug
when generating the backtrace.  When it was enabled, the problem didn't
occur, however.  I will update again after trying the latest CVS.



[2006-12-05 22:57:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





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

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


#34570 [NEW]: Implement some sort of setproctitle() in cli version

2005-09-20 Thread steve-php-dev at spwiz dot com
From: steve-php-dev at spwiz dot com
Operating system: Linux 2.4 kernel
PHP version:  5.0.5
PHP Bug Type: Feature/Change Request
Bug description:  Implement some sort of setproctitle() in cli version

Description:

I'm using the pcntl module in the CLI SAPI to fork off several processes. 
I'd like the processes to be able to identify themselves in ps.  In Linux,
you can do this by editing argv[0].  On BSD, you use the setproctitle()
function.  Other higher level languages support this feature.  A simple
perl script to do this on Linux would be:

$0 = bogus;
sleep 10;

I tried modifying $argv[0], but that only modified the PHP scripts copy of
argv, not the real argv.  It'd be nice if there was a way to modify the
process title directly.  Ideally, it would be cross-platform (for Unix
variants, at least).

This was originally requested in 2002
(http://bugs.php.net/bug.php?id=18400), but was rejected.  When using the
pcntl functions in the CLI version, it really would be a useful feature.


-- 
Edit bug report at http://bugs.php.net/?id=34570edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34570r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34570r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34570r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=34570r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=34570r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=34570r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=34570r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=34570r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34570r=support
Expected behavior:   http://bugs.php.net/fix.php?id=34570r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=34570r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=34570r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=34570r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34570r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=34570r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=34570r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34570r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34570r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=34570r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34570r=mysqlcfg


#21306 [Com]: warnning about cannot change the session settings

2003-01-27 Thread steve-php-dev
 ID:   21306
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Session related
 Operating System: linux
 PHP Version:  4.3.0
 New Comment:

I upgraded to 4.3.0 from 4.2.3 a couple weeks ago.  I did not see this
problem at all until today, when I uploaded two minor changes to my web
site.  We get several hundred thousand page views per day, and since
this upload we're getting 3-4 of this error per minute.  So for most
page views it doesn't happen, but it's definitely happening frequently
and regularly.

The first change was to our error handler.  We specifically trigger
errors using $php_errormsg if it exists (after the session is started),
so that we can catch stupid users who try to upload humongous images to
our site (we limit them to 40KB).  Some bright young individual
uploaded a 476MB file ten times this morning, so we added some code
(three lines) to log the date, time, username, and file size.  Here is
the code we added:

$fp = fopen(/tmp/big_images.log, 'a');
fwrite($fp, sprintf(%s: %s (%s KB)\n, date(Y-m-d H:i:s),
$_SESSION['auth']-auth['username'], $kb));
fclose($fp);

While typing this, I made a change which seems to have fixed the
problem.  I have a function called session_setup() which makes sure the
session id is unique, and call session_set_save_handler() or whatever
the name of that function is.  The trigger_error mentioned above used
to be called after calling session_setup() in my authentication include
file.  I moved it to inside the session_setup() function, after setting
the save_handler.  For some reason, this fixed the problem.

Odd.

Perhaps this can help someone else somehow?


Previous Comments:


[2003-01-05 16:03:24] [EMAIL PROTECTED]

Have a working installation of os-commerce in 4.2.3. Upgraded to 4.3.0,
and now I get the same error listed here.

All I want to do is confirm that this is NOT a script error. I'm not
going to dig through some code I didn't write to track this down.

Thanks



[2003-01-01 10:11:39] [EMAIL PROTECTED]

note that, i don't even use one ini_set()
and the script is impossible to session_set_save_handler() twice;

seems php don't re-initize correctly, same as
http://bugs.php.net/bug.php?id=19292
but i'm just guessing



[2002-12-31 02:52:19] [EMAIL PROTECTED]

i forgot to note that, this issue is random happend
i can't reproduce it, but my user trigger it and i saw errors in log
and my script is in production, it's too complex
i am not able to give full script
but my function look like:
function mysessionstart() {
if (session_id()) return
session_set_save_handler(
'_sess_open',
'_sess_close',
'_sess_read',
'_sess_write',
'_sess_destroy',
'_sess_gc'
);
session_start();
}
it works fine until get warnning in php-4.3.0

here the config is:
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
containing ids.
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache

session.cache_expire = 180

session.use_trans_sid = 1
url_rewriter.tags =
a=href,area=href,frame=src,input=src,form=fakeentry



[2002-12-31 02:27:43] [EMAIL PROTECTED]

THis is most likely not a bug, can you show us the script, and the
session.* settings in php.ini?

Derick



[2002-12-31 02:00:45] [EMAIL PROTECTED]

i've got this problem after i upgrade from php4.2.2 to 4.3.0:

[31-Dec-2002 15:30:03] PHP Warning:  Unknown(): A session is active.
You cannot change the session module's ini settings at this time. in
Unknown on line 0

seems a internal error, php script
hope this to be fix soon




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