#43199 [Com]: Many segmentation faults
ID: 43199 Comment by: serban dot ghita at verasys dot com Reported By: eugene dot pikalov at gmail dot com Status: Feedback Bug Type: PDO related Operating System: Linux Fedora 2.6.22.5-76.fc7 PHP Version: 5.2.4 New Comment: i can confirm this on slackware after upgrading. Linux www 2.6.21.5-smp #1 SMP Sat Nov 3 15:51:44 Local time zone must be set--see zic m i686 Intel(R) Xeon(R) CPU E5335 @ 2.00GHz GenuineIntel GNU/Linux i was running httpd-2.2.6 with PHP 5.2.4 i tried compiling both apache and php with less options, nothing worked. temporary workaround: installed httpd-2.0.58 + PHP 5.2.4 and everithing worked. i cannot generate a backtrace at the moment because i'm on a production server Previous Comments: [2007-11-05 23:46:17] [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. [2007-11-05 14:17:41] eugene dot pikalov at gmail dot com Description: On 5.2.3 everything allright, after update i have many segfaults in httpd logs. Apache/2.2.4 Reproduce code: --- [Fri Nov 02 17:30:01 2007] [notice] child pid 30265 exit signal Segmentation fault (11) [Fri Nov 02 17:32:21 2007] [notice] child pid 30840 exit signal Segmentation fault (11) [Fri Nov 02 17:35:17 2007] [notice] child pid 31093 exit signal Segmentation fault (11) [Fri Nov 02 17:39:06 2007] [notice] child pid 551 exit signal Segmentation fault (11) [Fri Nov 02 17:39:58 2007] [notice] child pid 419 exit signal Segmentation fault (11) [Fri Nov 02 17:43:56 2007] [notice] child pid 2439 exit signal Segmentation fault (11) *** glibc detected *** /usr/sbin/httpd: munmap_chunk(): invalid pointer: 0x80e90b60 *** === Backtrace: = /lib/libc.so.6(cfree+0x1bb)[0x42255b] /etc/httpd/modules/libphp5.so(zend_hash_destroy+0x4e)[0xcc607e] /etc/httpd/modules/libphp5.so[0xb42227] /etc/httpd/modules/libphp5.so(php_pdo_pdbh_dtor+0x15)[0xb422e5] /etc/httpd/modules/libphp5.so(plist_entry_destructor+0x82)[0xcc8822] /etc/httpd/modules/libphp5.so[0xcc5d68] /etc/httpd/modules/libphp5.so(zend_hash_graceful_reverse_destroy+0x18)[0xcc5fa8] /etc/httpd/modules/libphp5.so(zend_shutdown+0x12)[0xcbc892] /etc/httpd/modules/libphp5.so(php_module_shutdown+0x2f)[0xc7ba6f] /etc/httpd/modules/libphp5.so(php_module_shutdown_wrapper+0xb)[0xc7bb1b] /etc/httpd/modules/libphp5.so[0xd344e3] /usr/lib/libapr-1.so.0[0x385d1d] /usr/lib/libapr-1.so.0(apr_pool_destroy+0x3d)[0x38648d] /usr/sbin/httpd[0x800386c5] /usr/sbin/httpd[0x80038c30] /usr/sbin/httpd[0x80038e41] /usr/sbin/httpd(ap_mpm_run+0x913)[0x80039843] /usr/sbin/httpd(main+0x8b7)[0x80010217] /lib/libc.so.6(__libc_start_main+0xe0)[0x3ccf70] /usr/sbin/httpd[0x8000f2f1] === Memory map: [Fri Nov 02 17:46:00 2007] [notice] child pid 2773 exit signal Aborted (6) [Fri Nov 02 17:50:37 2007] [notice] child pid 4359 exit signal Segmentation fault (11) [Fri Nov 02 17:53:55 2007] [notice] child pid 5519 exit signal Segmentation fault (11) [Fri Nov 02 17:54:38 2007] [notice] child pid 5622 exit signal Segmentation fault (11) [Fri Nov 02 17:55:51 2007] [notice] child pid 4738 exit signal Segmentation fault (11) [Fri Nov 02 17:57:45 2007] [notice] child pid 6674 exit signal Segmentation fault (11) -- Edit this bug report at http://bugs.php.net/?id=43199edit=1
#13798 [Com]: Compilation error with oracle
ID: 13798 Comment by: sudheer at sib dot co dot in Reported By: sylvie dot minchella at momecam dot com Status: No Feedback Bug Type: Compile Failure Operating System: SYSTEM V PHP Version: 4.0.6 New Comment: Sir when report created in windows98 will not be worked properly in windows Xp,ie inside the report space between line is doubled. Sudheer A Previous Comments: [2002-04-11 00:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2002-03-03 02:53:25] [EMAIL PROTECTED] To properly diagnose this bug, 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 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. can you please try a recent release? [2001-10-23 07:30:38] sylvie dot minchella at momecam dot com I want to install PHP-4.0.6 on my system (SYSTEM V NCR) with apache-1.3.19. I use this command : ./configure --without-mysql --with-oracle --with-apache=../apache_1.3.19 --enable-track-vars This product this debug.log : m -ldl -lnsl -lsocket 15 NCR High Performance C Compiler R3.0c (c) Copyright 1994-98, NCR Corporation (c) Copyright 1987-98, MetaWare Incorporated UX:ld: WARNING: /usr/lib/libresolv.so: warning: attempted multiple inclusion of file UX:ld: WARNING: /usr/lib/libresolv.so: warning: attempted multiple inclusion of file UX:ld: WARNING: /usr/lib/libnsl.so: warning: attempted multiple inclusion of fil e UX:ld: WARNING: /usr/lib/libsocket.so: warning: attempted multiple inclusion of file dynamic linker : ./conftest : error opening libclntsh.so.1.0 And produce this errors in the config.log file : -- configure:1916: checking whether cc accepts -g configure:1948: checking how to run the C preprocessor configure:1969: cc -E conftest.c /dev/null 2conftest.out NCR High Performance C Compiler R3.0c (c) Copyright 1994-98, NCR Corporation (c) Copyright 1987-98, MetaWare Incorporated configure: failed program was: #line 1963 configure #include confdefs.h #include assert.h Syntax Error configure:1986: cc -E -traditional-cpp conftest.c /dev/null 2conftest.out (cc:) Warning: -a (within -traditional-cpp) is not a recognizable option. (cc:) Warning: -d (within -traditional-cpp) is not a recognizable option. (cc:) Warning: -i (within -traditional-cpp) is not a recognizable option. (cc:) Warning: -i (within -traditional-cpp) is not a recognizable option. (cc:) Warning: -o (within -traditional-cpp) is not a recognizable option. (cc:) Warning: -n (within -traditional-cpp) is not a recognizable option. (cc:) Warning: -a (within -traditional-cpp) is not a recognizable option. (cc:) Warning: -l (within -traditional-cpp) is not a recognizable option. And next : configure:2455: cc -c conftest.c 15 NCR High Performance C Compiler R3.0c (c) Copyright 1994-98, NCR Corporation (c) Copyright 1987-98, MetaWare Incorporated configure:2572: cc -o conftestconftest.c 15 NCR High Performance C Compiler R3.0c (c) Copyright 1994-98, NCR Corporation (c) Copyright 1987-98, MetaWare Incorporated E /usr/include/pthread.h,L110/C1: Can't open dce/cma.h: No such file or directory w (#657): (info) How referenced files were included: |File /usr/include/pthread.h from configure. Unable to proceed Aborting(21)... configure: failed program was: #line 2554 configure -- When I run make, i have this mistake --- Making all in posix cc -I. -I/app/apache/php-4.0.6/ext/posix -I/app/apache/php-4.0.6/main - I/app/apache/php-4.0.6 -I/app/apache/apache_1.3.19/src/include -I/app/apache/apa che_1.3.19/src/os/unix -I/app/apache/php-4.0.6/Zend -I/app/oracle/product/734/rd bms/public -I/app/oracle/product/734/rdbms/demo -I/app/oracle/product/734/networ k/public -I/app/apache/php-4.0.6/ext/xml/expat/xmltok -I/app/apache/php-4.0.6/ex t/xml/expat/xmlparse -I/app/apache/php-4.0.6/TSRM -DSUPPORT_UTF8 -DXML_BYTE_ORD ER=21 -c posix.c touch posix.lo NCR High Performance C Compiler R3.0c (c) Copyright 1994-98, NCR Corporation (c) Copyright 1987-98, MetaWare Incorporated w /app/apache/php-4.0.6/Zend/zend_execute.h,L185/C5(#257):'=' encountered where '==' may have been intended. w
#43175 [Asn-Csd]: __destruct() throwing an exception with __call() causes segfault
ID: 43175 Updated by: [EMAIL PROTECTED] Reported By: development at domain51 dot com -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: * PHP Version: 5CVS,6CVS (2007-11-01) Assigned To: dmitry New Comment: This bug has been fixed in CVS. 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2007-11-01 17:53:55] development at domain51 dot com Throwing it sure, but the entire try catch syntax gets wrapped up in it too. In the example I blogged about, __destruct() actually wants to catch any exceptions so it can create meaningful output based on the Exceptions that were generated. In that case, __destruct() would have returned peacefully. The documentation you pointed to actually has a phrase that would lead someone to believe that the only time throwing an exception within a __destruct() will cause a fatal error is if that exception is thrown as part of the script shutdown. The presence of the text in parentheses makes it appear that only a destructor called as part of garbage collection at the end of the script would cause this issue. The portions of the linked to PHPT test above agree with that. At any rate, my take on that would be that would still be that if __destruct() is finished and an exception is still present, then there's an error. Otherwise, how would you handle things such as PDOExceptions thrown during DB clean-up? [2007-11-01 17:26:01] [EMAIL PROTECTED] Simplest script to reproduce: ?php class foobar { public function __destruct() { throw new Exception(); } public function __call($m, $a) { return $this; } public static function factory() { return new foobar(); } } function foobar() { return new foobar(); } try { foobar::factory()-unknown(); } catch (Exception $e) { echo __call via traditional factory should be caught\n; } ? Program received signal SIGSEGV, Segmentation fault. 0x082fe66d in add_assoc_string_ex (arg=0x95f0484, key=0x85d8db2 function, key_len=9, str=0x7 Address 0x7 out of bounds, duplicate=1) at /home/jani/src/php-5.3/Zend/zend_API.c:1147 1147ZVAL_STRING(tmp, str, duplicate); (gdb) bt #0 0x082fe66d in add_assoc_string_ex (arg=0x95f0484, key=0x85d8db2 function, key_len=9, str=0x7 Address 0x7 out of bounds, duplicate=1) at /home/jani/src/php-5.3/Zend/zend_API.c:1147 #1 0x08310cb1 in zend_fetch_debug_backtrace (return_value=0x95f21a4, skip_last=-1, provide_object=0) at /home/jani/src/php-5.3/Zend/zend_builtin_functions.c:2026 . . [2007-11-01 17:17:41] [EMAIL PROTECTED] I noticed you try to throw in destructor and that's not supposed to work. See page: http://docs.php.net/manual/en/language.oop5.decon.php Note: Attempting to throw an exception from a destructor (called in the time of script termination) causes a fatal error. Of course it shouldn't cause any crash though. :) [2007-11-01 15:27:51] development at domain51 dot com Description: If __destruct() throws an exception on an object that was not assigned to a variable, but had __call() invoked, it will segfault Reproduce code: --- Full test case available at: http://plumb.domain51.com/sandbox/__destruct-bug/bug.phpt http://plumb.domain51.com/sandbox/__destruct-bug/bug.phps (syntax highlighted) Simplified sample: foobar::factory()unknown(); foobar()-unknown(); // where foobar is a function wrapping new foobar Expected result: Exception to be thrown in foobar::__destruct() Actual result: -- Segfault on Linux Bus error on Mac OSX I'll get a backtrace added later as time allows -- Edit this bug report at http://bugs.php.net/?id=43175edit=1
#43201 [Asn-Csd]: Crash on using unitialized vals and __get/__set
ID: 43201 Updated by: [EMAIL PROTECTED] Reported By: stas at zend dot com -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.2CVS-2007-11-05 (CVS) Assigned To: dmitry New Comment: This bug has been fixed in CVS. 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2007-11-05 18:20:40] [EMAIL PROTECTED] Shorter version: ?php class Foo { function __get($k) { return null; } } $c = new Foo(); $c-arr[0][k] = 1; $c-arr[0][k2] = $undef; for($cnt=0;$cnt6;++$cnt) { $c-arr[$cnt][k2] = chop($undef); } ? [2007-11-05 18:15:07] stas at zend dot com Description: Code modifying the result of __get (erroneously) and using undefined variables crashes, apparently because of unitialized_zval being freed. Reproduce code: --- ?php class Foo { function __get($k) { return null; } function __set($k, $v) { $this-$k = $v; } } $c = new Foo(); $c-arr[0][k] = 1; $c-arr[0][k2] = $ref; for($cnt=0;$cnt6;$cnt++) { $ref = chop($undef); $c-arr[$cnt][k2] = $ref; } ? Expected result: No crash :) Actual result: -- On windows - crash On Unix debug - php5/Zend/zend_hash.c(517) : ht=0xa533520 is being destroyed -- Edit this bug report at http://bugs.php.net/?id=43201edit=1
#43216 [Asn-Csd]: stream_is_local() returns false on file://
ID: 43216 Updated by: [EMAIL PROTECTED] Reported By: php at benjaminschulz dot com -Status: Assigned +Status: Closed Bug Type: Streams related Operating System: linux PHP Version: 5.3CVS-2007-11-08 (CVS) Assigned To: dmitry New Comment: This bug has been fixed in CVS. 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2007-11-08 08:17:43] php at benjaminschulz dot com Description: stream_is_local() should return true for file:// Reproduce code: --- var_dump(stream_is_local(file://)); Expected result: bool(true) Actual result: -- bool(false) -- Edit this bug report at http://bugs.php.net/?id=43216edit=1
#43223 [NEW]: SPL Interfaces in namespaces
From: felipensp at gmail dot com Operating system: PHP version: 5.3CVS-2007-11-09 (snap) PHP Bug Type: Scripting Engine problem Bug description: SPL Interfaces in namespaces Description: SPL Interfaces doesn't are recognize in namespace. Reproduce code: --- ?php namespace foobar; class foo implements SplObserver { } Expected result: Fatal error: Class foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SplObserver::update) in Actual result: -- Fatal error: Interface 'foobar::SplObserver' not found in ... -- Edit bug report at http://bugs.php.net/?id=43223edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43223r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43223r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43223r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43223r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43223r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43223r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43223r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43223r=needscript Try newer version:http://bugs.php.net/fix.php?id=43223r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43223r=support Expected behavior:http://bugs.php.net/fix.php?id=43223r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43223r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43223r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43223r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43223r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43223r=dst IIS Stability:http://bugs.php.net/fix.php?id=43223r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43223r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43223r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43223r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43223r=mysqlcfg
#42496 [Com]: cursor is not closed when using 2 clobs in a select query
ID: 42496 Comment by: br at absb dot de Reported By: iddekingej at lycos dot com Status: Open Bug Type: OCI8 related Operating System: win 2000 PHP Version: 5.2.4 New Comment: We can reproduce the problem with OCI8 versions before 1.2.4: Version 1.2.3, $Revision: 1.269.2.16.2.32 $ Previous Comments: [2007-11-09 03:21:13] martin at catalyst dot net dot nz Does setting oci8.statement_cache_size = 0 change the behavior? It does not in our tests, unfortunately. [2007-11-09 01:52:04] [EMAIL PROTECTED] Does setting oci8.statement_cache_size = 0 change the behavior? [2007-11-08 23:52:44] martin at catalyst dot net dot nz This Moodle bugreport is related: http://tracker.moodle.org/browse/MDL-11429 Note that under moodle (using AdoDB) we are seeing the problem as soon as the resultset contains at least one LOB. If the table has LOBs but the resultset is empty, no cursors are leaked. [2007-11-08 23:38:57] martin at catalyst dot net dot nz These are the revisions as reported in phpinfo() for the versions I've tested: grep -r Revision oci8-1.*/oci8.c oci8-1.1.1/oci8.c: php_info_print_table_row(2, Revision, $Revision: 1.274 $); oci8-1.2.3/oci8.c: php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.29 $); oci8-1.2.4/oci8.c: php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.38 $); oci8-1.3.0/oci8.c: php_info_print_table_row(2, Revision, $Revision: 1.269.2.16.2.38.4.1 $); [2007-11-08 23:34:29] martin at catalyst dot net dot nz Narrowed down the problem to the OCI8 driver, which is versioned separately from PHP. After a bit of testing, the problem appeared in v1.2.4 of OCI8, which got included in PHP v5.2.3 OCI8 v1.2.3 does not exhibit the problem. vOCI8 1.3.0 Beta (as of today) still exhibits the problem. I've reported it on the bugtracker here http://pecl.php.net/bugs/bug.php?id=12407 linking back to this bug. The different versions of the OCI8 driver are downloadable from http://pecl.php.net/package/oci8 -- HTH! 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/42496 -- Edit this bug report at http://bugs.php.net/?id=42496edit=1
#43224 [NEW]: support real graceful reload of fastcgi
From: glen at delfi dot ee Operating system: PLD Linux PHP version: 5.2.5RC2 PHP Bug Type: CGI related Bug description: support real graceful reload of fastcgi Description: currently (checked 5.3 and 5.2) php-fcgi when receiving terminating signal, finishes the request, ie does not terminate immedately. however it does not close the socket it is listening for incoming connections. and there's no way to make the process really terminate in a nice way. ie if you really want to terminate fcgi backend processes while not caring whether the request is finished or not you can do this only by sending SIGKILL, but it might be too brutal :) for the first problem i've created patch for unix (linux) platform, few testing shows that it really works. for the second problem i'd suggest to use SIGINT for graceful restart (close listening socket, end when php processing finishes) and SIGTERM would just close listening socket and abort php processing by making the child exit itself. patch for 5.2.4 (also 5.2.5RC2): http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/php-fcgi-graceful.patch?only_with_tag=MAIN patch for 5.3-snap: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/php-fcgi-graceful.patch?only_with_tag=DEVEL -- Edit bug report at http://bugs.php.net/?id=43224edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43224r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43224r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43224r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43224r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43224r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43224r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43224r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43224r=needscript Try newer version:http://bugs.php.net/fix.php?id=43224r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43224r=support Expected behavior:http://bugs.php.net/fix.php?id=43224r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43224r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43224r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43224r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43224r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43224r=dst IIS Stability:http://bugs.php.net/fix.php?id=43224r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43224r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43224r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43224r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43224r=mysqlcfg
#43220 [Com]: foreach modifies array pointer
ID: 43220 Comment by: felipensp at gmail dot com Reported By: bugreporter at to dot mabomuja dot de Status: Open Bug Type: *General Issues Operating System: Linux/Windows PHP Version: 5.2.4 New Comment: The correct is: sizeof($t) - 1 Previous Comments: [2007-11-09 02:51:00] bugreporter at to dot mabomuja dot de Actual Snaphots 5.3dev(2007-11-08-Snap) also has this bug and the code example is not working as i wrote above, sorry. [2007-11-09 02:45:29] bugreporter at to dot mabomuja dot de Description: In the code example below, when entering the for-loop, the arraypointer is at position 1 (the 2nd element). When you comment out the foreach-loop before OR insert the reset-line, output starts - as expected - at the first array element (posistion 0). This means foreach modifies the array pointer, although the documentation says foreach operates on a copy of the specified array and not the array itself. Therefore, the array pointer is not modified Testing with versions 4.4.7/5.2.3/5.3dev(2007-11-08-Snap) of Windows zip package and 4.4.7/5.2.1 on gentoo (5.2.3 not testet on linux) shows correct behavior. Reproduce code: --- $t=range('a','c'); foreach ($t AS $key = $profil){ $t[$key]=1; } //reset($t); for ($i=0;$isizeof($t);$i++){ echo key($t) . -.current($t).\n; next ($t); } print_r($t); Expected result: version 5.2.3: 0-1 1-1 2-1 Array ( [0] = 1 [1] = 1 [2] = 1 ) Actual result: -- version 5.2.4: 1-1 2-1 - Array ( [0] = 1 [1] = 1 [2] = 1 ) -- Edit this bug report at http://bugs.php.net/?id=43220edit=1
#29520 [Com]: php mysql compile fail
ID: 29520 Comment by: dan at k dot ro Reported By: martinkuria at hotmail dot com Status: No Feedback Bug Type: Compile Failure Operating System: Solaris9 PHP Version: 5.0.0 New Comment: well on fedora core 6 is not working what a stupid bug this is! Previous Comments: [2007-11-06 12:33:54] anderan at suponix dot com me help: apt-get install libmysqlclient-dev [2007-09-05 07:53:28] surface3 at tiscali dot it Hi Guys, i've got the same problem with php-5.2.3 and mysql 5.0.45. i've downloaded MySQL-devel-community-5.0.45-0 and i 've solved my problem with configure bye [2007-08-10 20:37:26] username at hotmail dot com I have experienced the same error message while compiling PHP 5.2.3 with MySQL 5.0.45. I am running OS X 10.4.10. When compiling with the line: --with-mysql-dir=/usr/local/mysql I get the error: configure: error: Cannot find MySQL header files under yes. When compiling with the line: --with-mysql=/usr/local/mysql I get the error: checking size of char *... configure: error: cannot compute sizeof (char *), 77 I have not yet resolved the issue, but I have tried older versions of MySQL 5 to no success. [2007-06-28 13:49:05] thangaraj dot manogaran at gmail dot com I am using php-5.2.3 and mysql 4.1.10 (default rpm package in RHE4 linux) and apache 2.2.4 in RHE4 64-bit linux machine. I started the mysql by giving the command : service mysqld start and mysql service is started. I have configured php with apache. But, while trying to configure Php with mysql i got errors. The data directory of the mysql is /var/lib/ and mysql.sock is present in /var/lib/mysql/. I tried configuring php with mysql with the following command: ./configure --with-mysql=/var/lib But got the errors: . .. Configuring extensions checking whether to enable LIBXML support... yes checking libxml2 install dir... no checking for xml2-config path... (cached) /usr/bin/xml2-config checking whether libxml build works... (cached) yes checking for OpenSSL support... no checking for Kerberos support... no checking for PCRE support... yes checking for ZLIB support... no checking if the location of ZLIB install directory is defined... no checking whether to enable bc style precision math functions... no checking for BZip2 support... no checking whether to enable calendar conversion support... no checking whether to enable ctype functions... yes checking for cURL support... no checking if we should use cURL for url streams... no checking size of long... (cached) 8 checking size of int... (cached) 4 checking for int32_t... (cached) yes checking for uint32_t... (cached) yes checking for sys/types.h... (cached) yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for string.h... (cached) yes checking for stdlib.h... (cached) yes checking for strtoll... (cached) yes checking for atoll... (cached) yes checking for strftime... (cached) yes checking whether to enable DBA... no checking for QDBM support... no checking for GDBM support... no checking for NDBM support... no checking for Berkeley DB4 support... no checking for Berkeley DB3 support... no checking for Berkeley DB2 support... no checking for DB1 support... no checking for DBM support... no checking for CDB support... no checking for INI File support... no checking for FlatFile support... no checking whether to enable DBA interface... no checking whether to enable dbase support... no checking whether to enable DOM support... yes checking for xml2-config path... (cached) /usr/bin/xml2-config checking whether libxml build works... (cached) yes checking whether to enable EXIF (metadata from images) support... no checking for FrontBase SQL92 (fbsql) support... no checking for FDF support... no checking whether to enable input filter support... yes checking pcre install prefix... no checking whether to enable FTP support... no checking OpenSSL dir for FTP... no checking for GD support... no checking for the location of libjpeg... no checking for the location of libpng... no checking for the location of libXpm... no checking for FreeType 1.x support... no checking for FreeType 2... no checking for T1lib support... no checking whether to enable truetype string function in GD... no checking whether to enable JIS-mapped Japanese font support in GD... no checking for GNU gettext support... no checking for GNU MP support... no checking whether to enable hash support... yes checking whether byte ordering is bigendian... (cached) no checking size of short... (cached) 2 checking size of int... (cached) 4 checking
#43225 [NEW]: fputcsv incorrectly handles cells ending in \ followed by
From: ed at bronto dot com Operating system: Centos PHP version: 5.2.4 PHP Bug Type: Filesystem function related Bug description: fputcsv incorrectly handles cells ending in \ followed by Description: Using fputcsv to output a cell that ends with a \ followed by double quotes () causes it to not use any escape sequence. Oddly, fgetscsv is able to parse it correctly. Unlike fgetscsv, I assume fputcsv follows RFC 4180 and uses as the escape character. Reproduce code: --- $row = array(); $row[] = 'a\\'; $row[] = 'bbb'; $fp = fopen('test.csv', 'w+'); fputcsv($fp, $row); fclose($fp); Expected result: expected output: a\,bbb Actual result: -- actual output: a\,bbb -- Edit bug report at http://bugs.php.net/?id=43225edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43225r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43225r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43225r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43225r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43225r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43225r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43225r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43225r=needscript Try newer version:http://bugs.php.net/fix.php?id=43225r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43225r=support Expected behavior:http://bugs.php.net/fix.php?id=43225r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43225r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43225r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43225r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43225r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43225r=dst IIS Stability:http://bugs.php.net/fix.php?id=43225r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43225r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43225r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43225r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43225r=mysqlcfg
#43226 [NEW]: PHP Cookie expiration
From: bnies at bluewin dot ch Operating system: Solaris 9 PHP version: 5.2.4 PHP Bug Type: Session related Bug description: PHP Cookie expiration Description: I'm not sure if it has fixed in PHP 5.2.4 but the problem is there in PHP 5.2.2. If PHP terminates a session with session_unregister(); it sends these HTTP headers to the browser: Set-Cookie: SQMSESSID=deleted; expires=Thu, 09-Nov-2006 13:34:48 GMT; path=/ The 'expires' option is an old option proposed by Netscape. See RFC 2109. We stumbled across a session problem with a proxy software that ignores this 'expires' option and implemented only the new 'Max-Age=0' option. The expires=olddate is also bad, because one can never know what the time on the remote side is. What if it the remote system clock more than one year behind? Could it be a fix to send both cookie expire options to make sure a cookie gets really deleted: Set-Cookie: SQMSESSID=deleted; expires=Thu, 09-Nov-2006 13:34:48 GMT; path=/ Set-Cookie: SQMSESSID=deleted; Max-Age=0; path=/ The problem appeared with the proxy software that ignored cookie deletion and then sent the session cookie with value deleted to the application which then treatened the session ID deleted as valid session. See here for more details: https://sourceforge.net/tracker/index.php?func=detailaid=1829025group_id=311atid=100311 Best Regards, Bernd Nies -- Edit bug report at http://bugs.php.net/?id=43226edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43226r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43226r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43226r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43226r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43226r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43226r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43226r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43226r=needscript Try newer version:http://bugs.php.net/fix.php?id=43226r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43226r=support Expected behavior:http://bugs.php.net/fix.php?id=43226r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43226r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43226r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43226r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43226r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43226r=dst IIS Stability:http://bugs.php.net/fix.php?id=43226r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43226r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43226r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43226r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43226r=mysqlcfg
#43227 [NEW]: eregi() mbregex compile err: premature end of regular expression in
From: baco at infomaniak dot ch Operating system: Linux Debian PHP version: 4.4.7 PHP Bug Type: mbstring related Bug description: eregi() mbregex compile err: premature end of regular expression in Description: eregi() produce random errors like function.mb-eregi: mbregex compile err: premature end of regular expression in when used with special chars like accents. N.B. On the web you can found a lot of reports of this issue. Some post suggests forcing mbstring.func_overload = 0 but it doesn't work for me. If Apache1 is restarted the error doesn't come anymore before an amount of time and request. $ GET http://localhost/test.php ok $ GET http://localhost/test.php ok $ GET http://localhost/test.php br / bWarning/b: mb_eregi() [a href='function.mb-eregi'function.mb-eregi/a]: mbregex compile err: premature end of regular expression in b/home/www/ca8b72beb934995c1afb34e1a3ceb893/web/test.php/b on line b2/bbr / $ GET http://localhost/test.php br / bWarning/b: mb_eregi() [a href='function.mb-eregi'function.mb-eregi/a]: mbregex compile err: premature end of regular expression in b/home/www/ca8b72beb934995c1afb34e1a3ceb893/web/test.php/b on line b2/bbr / $ GET http://localhost/test.php br / bWarning/b: mb_eregi() [a href='function.mb-eregi'function.mb-eregi/a]: mbregex compile err: premature end of regular expression in b/home/www/ca8b72beb934995c1afb34e1a3ceb893/web/test.php/b on line b2/bbr / $ GET http://localhost/test.php ok $ GET http://localhost/test.php ok ... Reproduce code: --- ?php if (eregi(cité, electricité)) { echo ok\n; } ? Expected result: OK Actual result: -- br / bWarning/b: mb_eregi() [a href='function.mb-eregi'function.mb-eregi/a]: mbregex compile err: premature end of regular expression in b/home/www/ca8b72beb934995c1afb34e1a3ceb893/web/test.php/b on line b2/bbr / -- Edit bug report at http://bugs.php.net/?id=43227edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43227r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43227r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43227r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43227r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43227r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43227r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43227r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43227r=needscript Try newer version:http://bugs.php.net/fix.php?id=43227r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43227r=support Expected behavior:http://bugs.php.net/fix.php?id=43227r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43227r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43227r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43227r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43227r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43227r=dst IIS Stability:http://bugs.php.net/fix.php?id=43227r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43227r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43227r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43227r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43227r=mysqlcfg
#43228 [NEW]: undefined function return in ext/soap/tests/server021.phpt
From: david at hisel dot com Operating system: Mac OS X PHP version: 5.2.4 PHP Bug Type: SOAP related Bug description: undefined function return in ext/soap/tests/server021.phpt Description: need to add new keyword, otherwise call to return SoapFault(...) gives undefined function error. ext/soap/tests/server021.phpt: line 12 return SoapFault(Server,Function $name doesn't exist); should read: return new SoapFault(Server,Function $name doesn't exist); Regards, .dave. -- Edit bug report at http://bugs.php.net/?id=43228edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43228r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43228r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43228r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43228r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43228r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43228r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43228r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43228r=needscript Try newer version:http://bugs.php.net/fix.php?id=43228r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43228r=support Expected behavior:http://bugs.php.net/fix.php?id=43228r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43228r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43228r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43228r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43228r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43228r=dst IIS Stability:http://bugs.php.net/fix.php?id=43228r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43228r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43228r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43228r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43228r=mysqlcfg
#43228 [Opn]: undefined function return in ext/soap/tests/server02[1|8].phpt
ID: 43228 User updated by: david at hisel dot com -Summary: undefined function return in ext/soap/tests/server021.phpt Reported By: david at hisel dot com Status: Open Bug Type: SOAP related Operating System: Mac OS X PHP Version: 5.2.4 New Comment: I ran a grep on the tests directory and found one more... ext/soap/tests/server028.phpt: line 12 Regards, .dave. Previous Comments: [2007-11-09 16:56:24] david at hisel dot com Description: need to add new keyword, otherwise call to return SoapFault(...) gives undefined function error. ext/soap/tests/server021.phpt: line 12 return SoapFault(Server,Function $name doesn't exist); should read: return new SoapFault(Server,Function $name doesn't exist); Regards, .dave. -- Edit this bug report at http://bugs.php.net/?id=43228edit=1
#43223 [Opn-Csd]: SPL Interfaces in namespaces
ID: 43223 Updated by: [EMAIL PROTECTED] Reported By: felipensp at gmail dot com -Status: Open +Status: Closed Bug Type:Scripting Engine problem PHP Version: 5.3CVS-2007-11-09 (snap) New Comment: This bug has been fixed in CVS. 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2007-11-09 10:07:17] felipensp at gmail dot com Description: SPL Interfaces doesn't are recognize in namespace. Reproduce code: --- ?php namespace foobar; class foo implements SplObserver { } Expected result: Fatal error: Class foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SplObserver::update) in Actual result: -- Fatal error: Interface 'foobar::SplObserver' not found in ... -- Edit this bug report at http://bugs.php.net/?id=43223edit=1
#22216 [Com]: Named Arguments
ID: 22216 Comment by: zyss at mail dot zp dot ua Reported By: tim dot lokot at printsoft dot com Status: Open Bug Type: Feature/Change Request Operating System: All PHP Version: 4.3.0 New Comment: It is really needef feature to have in PHP. I miss this feature very much when function has many arguments or when there are several boolean arguments that require true/false values or when there are several arguments with default value set and you want to use only, say, last argument it would be very helpful to have named arguments support. Having this feature would dramatically increase code readability. Even standard functions will be easier to read having this feature. for example: in_array($needle, $haystack, $strict = true); is much easier to read that just in_array($needle, $haystack, true); It would be more native to PHP to use named arguments with = like foo(var2 = $value); or foo($var2 = $value); Previous Comments: [2006-06-14 11:48:29] jason at godsey dot net ?php // Missing named arguments work around.. // Set the default/REQUIRED var to something unlikely. define(REQUIRED, _^_- . rand(100,) . - . time()); function parseRequired ($defaults, $args) { foreach ($defaults as $key=$value) { if(!isset($args[$key])) { if ($value == REQUIRED) { $backtrace = debug_backtrace(); $function = $backtrace[1][function]; throw new Exception(function: $function var: \$$key not defined); } $args[$key] = $value; } } return 0; } function debugging ($args) { $defaults = array( name=Lanny Jason Godsey, text=This is the default text!, date=REQUIRED ); parseRequired($defaults, $args); print ($args[date]) Welcome $args[name], text entered: $args[text]\n; } debugging(array(name=L. Jason Godsey,date=date(Y-m-d))); ? [2003-02-13 16:59:47] tim dot lokot at printsoft dot com I know this can be accomplished in other way and also know this has been brought up before, but they are messy and require code from the developer to handle this which seems to go against the php ethos of easy and fast to develop. If named arguments could be passed to functions and actually processed by the php parser, then this would be really great. Especially where function prototypes have default values in them and you only want to set one of them. The proposed syntax would be something like this: function foo ($var1=some value, $var2, $var3=some other value) { // function code } then to call the function would be like this foo (var2:=value for argument 2 only); This would also be great if this feature would extend to the existing functions in the extensions as well. mail (to:=[EMAIL PROTECTED], message:=no message, subject:=subject); This in my opinion makes the function calls more readable in some circumstances, particularly when you have to keep going back to the prototype to figure out what the order of the arguments is. It's kind of self documenting really when you look at code written in this way. Bug #2285: default arguments skipping (http://bugs.php.net/bug.php?id=2285) was filed with a similar suggestion and the solution suggested was to use associative arrays. Becuase it was never explained in any of the other reports as to why this wasn't going to be implemented, why the above not more preferable to have than always have to implement the same code this: function foo ($args) { // Named Argument Checks $var1 = some value; $var3 = some other value; foreach ($args as $key = $value) { $$key = $value; } // Do function code here } foo (array (var2=some other value again,var1=variable 1)); Surely forcing developers into using this messy syntax goes against one of the main strengths of php which is simple code that's easy to read, understand and develop. I'm in no wasy saying the above code was hard, just the first example of named arguments seems to fit more into the php way than the second example. If this is to be rejected like the other requests for it, can you please provide a reason why the array method is more preferable? -- Edit this bug report at http://bugs.php.net/?id=22216edit=1
#42893 [NoF-Opn]: segfault on ia64 when working w/ constants
ID: 42893 User updated by: hoffie at gentoo dot org Reported By: hoffie at gentoo dot org -Status: No Feedback +Status: Open Bug Type: Reproducible crash Operating System: Linux on ia64 -PHP Version: 5CVS-2007-10-08 (snap) +PHP Version: 5.2.5RC2 New Comment: Yes, I admit that above gdb output shows some strangeness, but well -- that's a gdb problem, not generally software being broken on that system. Upgrading gdb resolved that problem and here goes the new backtrace (using 5.2.5RC2 now): (gdb) r -n -r 'var_dump(defined(foo));' Starting program: /tmp/php-5.2.5RC2/sapi/cli/php -n -r 'var_dump(defined(foo));' Program received signal SIGSEGV, Segmentation fault. _zval_ptr_dtor (zval_ptr=0x6ff3ebd0) at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:412 412 (*zval_ptr)-refcount--; (gdb) bt #0 _zval_ptr_dtor (zval_ptr=0x6ff3ebd0) at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:412 #1 0x40298a80 in zend_do_fcall_common_helper_SPEC ( execute_data=0x6ff3ec50) at /tmp/php-5.2.5RC2/Zend/zend_execute.h:155 #2 0x40297200 in execute (op_array=0x600c86e0) at /tmp/php-5.2.5RC2/Zend/zend_vm_execute.h:92 #3 0x40228800 in zend_eval_string (str=value optimized out, retval_ptr=0x0, string_name=0x4041fd10 Command line code) at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:1171 #4 0x40228c10 in zend_eval_string_ex ( str=0x6ff3f740 var_dump(defined(\foo\));, retval_ptr=0x0, string_name=0x4041fd10 Command line code, handle_exceptions=1) at /tmp/php-5.2.5RC2/Zend/zend_execute_API.c:1205 #5 0x403a2130 in main (argc=Cannot access memory at address 0x10 ) at /tmp/php-5.2.5RC2/sapi/cli/php_cli.c:1179 Previous Comments: [2007-11-08 15:02:52] mail at markus-ullmann dot de erm... [29 Oct 11:15pm UTC] [EMAIL PROTECTED] Not only PHP breaks but also GDB. Tell me plz how you guessed that GDB is broken. Just valgrind is not available on ia64 architecture but gdb works fine. [8 Oct 7:24pm UTC] hoffie at gentoo dot org As soon as debugging symbols are enabled (CFLAGS=-g or ./configure --enable-debug) the problem disappears, that's why I'm unable to provide a useful backtrace. Notice that the _problem disappears_. [2007-11-06 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2007-10-29 23:15:46] [EMAIL PROTECTED] From the looks of it, you have more problems than just PHP here. Not only PHP breaks but also GDB. How about you try get the basic tools working before trying PHP? :) [2007-10-13 10:13:40] hoffie at gentoo dot org Just to be sure you're not loading any php.ini files, try this: (gdb) run -n -r 'var_dump(defined(foo));' Fails with the same symptoms. And you could also try to see what valgrind has to say about it: # USE_ZEND_ALLOC=0 valgrind --leak-check=yes php -n -r 'var_dump(defined(foo));' If you gave me valgrind for ia64 I'd happily do that. ;) checking for a supported CPU... no (ia64) configure: error: Unsupported host architecture. Sorry [2007-10-11 13:46:28] [EMAIL PROTECTED] Just to be sure you're not loading any php.ini files, try this: (gdb) run -n -r 'var_dump(defined(foo));' And you could also try to see what valgrind has to say about it: # USE_ZEND_ALLOC=0 valgrind --leak-check=yes php -n -r 'var_dump(defined(foo));' 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/42893 -- Edit this bug report at http://bugs.php.net/?id=42893edit=1
#43229 [NEW]: array_walk crashes with a segmentation fault
From: [EMAIL PROTECTED] Operating system: CentOS PHP version: 5.2CVS-2007-11-09 (CVS) PHP Bug Type: Reproducible crash Bug description: array_walk crashes with a segmentation fault Description: strace doesnt output anything - it just cuts the output with a segfault. if you change the variable from $thiskeyword to something else without this at the start, it works correctly... ;) Reproduce code: --- ?php $stopwords = array( 'this', 'a', 'the', 'is' ); $keyword = explode( ' ', 'this is a big problem' ); for( $i = 0; $i 1000; $i++ ) { $thiskeyword = $keyword; array_walk( $thiskeyword, create_function('$v,$k','global $thiskeyword,$stopwords;if(in_array($v,$stopwords)){unset($thiskeyword[$k]);}')); } ? Actual result: -- Segmentation Fault -- Edit bug report at http://bugs.php.net/?id=43229edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43229r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43229r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43229r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43229r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43229r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43229r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43229r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43229r=needscript Try newer version:http://bugs.php.net/fix.php?id=43229r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43229r=support Expected behavior:http://bugs.php.net/fix.php?id=43229r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43229r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43229r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43229r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43229r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43229r=dst IIS Stability:http://bugs.php.net/fix.php?id=43229r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43229r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43229r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43229r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43229r=mysqlcfg
#29543 [Com]: Using an object for an array key can crash apache rather than giving a warning
ID: 29543 Comment by: dmitry dot bagaev at gmail dot com Reported By: rainsford at acer dot edu dot au Status: No Feedback Bug Type: Apache2 related Operating System: Windows XP PHP Version: 5.0.0 New Comment: I have the same bug with php 2.5.4 and Apache 2.2.2 on Windiows XP. It also can be reproduced with .= operator. Array is the part of object and it's elements are referenced by string. Previous Comments: [2004-09-12 01:00:03] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2004-09-04 17:48:07] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Gives the warning for me and doesn't crash. Please, try the latest snapshot. [2004-08-06 04:28:30] rainsford at acer dot edu dot au Description: Using += or -= etc. operator to assign to an array using an object for a key crashes apache rather than giving an Illegal Offset Type warning. ++, -- and =n don't crash apache. FYI, I Installed the PHP windows binaries Configure Command cscript /nologo configure.js --enable-snapshot-build --with-gd=shared Reproduce code: --- ?php class Foo { } $foo = new Foo(); $collection = array(); $collection[$foo] += 1; // crashes Apache 2.0.49 on Windows XP ? Expected result: Warning: Illegal offset type in C:\work\msat\src\test\crashApache.php on line 8 Actual result: -- Apache crashes: from Apache error log: [Fri Aug 06 12:03:19 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. from Event Viewer: Faulting application Apache.exe, version 2.0.49.0, faulting module unknown, version 0.0.0.0, fault address 0x. -- Edit this bug report at http://bugs.php.net/?id=29543edit=1
#43230 [NEW]: The MSI Installer crashes when trying to install
From: pamcallaway at pobox dot com Operating system: Win XP, SP2 PHP version: 5.2.5 PHP Bug Type: Unknown/Other Function Bug description: The MSI Installer crashes when trying to install Description: Hi, I downloaded the PHP 5.2.5 MSI package, and it crashes when I try to Install it. It get to the directory selection page, and after you pick where to install it and the click next, it crashes. I was putting in C:\Program Files\PHP\. I click next and I get this error: PHP 5.2.5 Setup The installer has encountered and unexpected error installing this package. This may indicate a problem with this package. The error code is 2878. I tried all four servers in the US and still got this message. I will try the ZIP file next, but the MSI is definately not working on my system. Reproduce code: --- Run the installer. Expected result: I expected to have it successfully installed. Actual result: -- It gave me that error message: PHP 5.2.5 Setup The installer has encountered and unexpected error installing this package. This may indicate a problem with this package. The error code is 2878. -- Edit bug report at http://bugs.php.net/?id=43230edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43230r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43230r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43230r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43230r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43230r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43230r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43230r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43230r=needscript Try newer version:http://bugs.php.net/fix.php?id=43230r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43230r=support Expected behavior:http://bugs.php.net/fix.php?id=43230r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43230r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43230r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43230r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43230r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43230r=dst IIS Stability:http://bugs.php.net/fix.php?id=43230r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43230r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43230r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43230r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43230r=mysqlcfg
#43229 [Opn-Ver]: array_walk crashes with a segmentation fault
ID: 43229 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Verified Bug Type: Reproducible crash Operating System: CentOS PHP Version: 5.2CVS-2007-11-09 (CVS) New Comment: Looks like a problem happens because array is modified while array_walk is walking it. Previous Comments: [2007-11-09 20:45:28] [EMAIL PROTECTED] Description: strace doesnt output anything - it just cuts the output with a segfault. if you change the variable from $thiskeyword to something else without this at the start, it works correctly... ;) Reproduce code: --- ?php $stopwords = array( 'this', 'a', 'the', 'is' ); $keyword = explode( ' ', 'this is a big problem' ); for( $i = 0; $i 1000; $i++ ) { $thiskeyword = $keyword; array_walk( $thiskeyword, create_function('$v,$k','global $thiskeyword,$stopwords;if(in_array($v,$stopwords)){unset($thiskeyword[$k]);}')); } ? Actual result: -- Segmentation Fault -- Edit this bug report at http://bugs.php.net/?id=43229edit=1
#26739 [Opn-Csd]: __call() doesn't work for static methods
ID: 26739 Updated by: [EMAIL PROTECTED] Reported By: demiurg at terra dot es -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: * PHP Version: 5.0.0 New Comment: This bug has been fixed in CVS. 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/. Thank you for the report, and for helping us make PHP better. __callStatic was implemented, I guess it does what you wanted? Previous Comments: [2007-11-05 14:57:57] lokrain at gmail dot com stas, I hope you are right! I think this is a majer issue. I hope someone get soon assigned to that bug?!. [2007-08-23 01:47:07] [EMAIL PROTECTED] Actually AFAIK it's implemented in PHP 6 HEAD and maybe will be also backported to 5.3. [2007-07-29 22:45:56] tom at ix dot tc The last response was 3 years ago but this has yet to be implemented. Any updates on this? I would really like to have this feature. [2007-03-16 08:40:01] ecentinela at gmail dot com Have been resolved this issue? There is some workaround? Thanks [2003-12-29 08:07:21] [EMAIL PROTECTED] __call() doesn't offer anything to distinguish between static and dynamic calls. So we'd need a new magic function say __static_call(). For 5.0.0 we have a feature freeze already, so this might take a while. 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/26739 -- Edit this bug report at http://bugs.php.net/?id=26739edit=1
#43229 [Ver]: array_walk crashes with a segmentation fault
ID: 43229 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Verified Bug Type: Reproducible crash Operating System: CentOS PHP Version: 5.2CVS-2007-11-09 (CVS) New Comment: if you use a different var name like $tmpkeyword instead of $thiskeyword - it works... ;) Previous Comments: [2007-11-09 23:07:02] [EMAIL PROTECTED] Looks like a problem happens because array is modified while array_walk is walking it. [2007-11-09 20:45:28] [EMAIL PROTECTED] Description: strace doesnt output anything - it just cuts the output with a segfault. if you change the variable from $thiskeyword to something else without this at the start, it works correctly... ;) Reproduce code: --- ?php $stopwords = array( 'this', 'a', 'the', 'is' ); $keyword = explode( ' ', 'this is a big problem' ); for( $i = 0; $i 1000; $i++ ) { $thiskeyword = $keyword; array_walk( $thiskeyword, create_function('$v,$k','global $thiskeyword,$stopwords;if(in_array($v,$stopwords)){unset($thiskeyword[$k]);}')); } ? Actual result: -- Segmentation Fault -- Edit this bug report at http://bugs.php.net/?id=43229edit=1
#42937 [Opn-Asn]: __call() method not invoked when methods are called on parent from child class
ID: 42937 Updated by: [EMAIL PROTECTED] Reported By: jmaxwilson at sixteensmallstones dot org -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 5.2.4 -Assigned To: +Assigned To: dmitry New Comment: I think parent:: should use __call, since it's not in fact a static call. Previous Comments: [2007-10-12 21:46:43] jmaxwilson at sixteensmallstones dot org Thanks for the feedback. However, adding a magic __callstatic() method doesn't actually fix the problem. I think there is some misunderstanding about the scope resolution operator (::). While it is often used to access the static methods of a class, when applied to the keyword parent it is used to access the _instance_ methods of a the parent class. So, calling parent::getVersion() is calling the _instance_ method of the parent from the child class, not a static method. Why is this important? What if the method needs to get or set properties of the instance? It must be an instance method. The $this pseudo-variable is not even available within static methods. To illustrate, the example code can be modified like this: ?php class A { var $arrValues = array(); function __construct() { $this-arrValues['PHP'] = PHP . phpversion(); } function __call($strMethod, $arrArgs) { return $this-arrValues['PHP']; } } class B extends A { function getVersion() { return parent::getVersion() . Rocks!; } } $A = new A(); echo $A-getVersion() . br/; $B = new B(); echo $B-getVersion() . br/; ? It would be incorrect for the engine to call the __callstatic() magic method when a child class calls a parent's method. I hope that is not what 5_3 does. [2007-10-12 10:11:04] judas dot iscariote at gmail dot com This is fixed in 5_3 but you have to define __callstatic like this ?php class A { function __call($strMethod, $arrArgs) { return PHP .phpversion(); } static function __callstatic($strMethod, $arrArgs) { return PHP .phpversion(); } } class B extends A { function getVersion() { return parent::getVersion() . Rocks!; } } $A = new A(); echo $A-getVersion() . br/; $B = new B(); echo $B-getVersion() . br/; ? [2007-10-11 23:08:54] jmaxwilson at sixteensmallstones dot org Description: If __call() is used to implement a method in a parent class, and the method is overridden in an inherited child class using a real method declaration that calls parent::methodName(), __call() is never invoked and PHP reports a fatal error saying that the method is undefined. You can work around the bug by replacing parent::methodName() with parent::__call('methodName',null), but it means that you have to know which of the parent's methods are implemented using __call() in order to override them in a child class. The child class should be agnostic to whether the parent's methods are real or magic. This bug was reported in PHP5.1 RC1 (http://bugs.php.net/bug.php?id=34739) but was improperly marked as bogus with the explanation that __call() is not used when calling static methods. The use of the paamayim-nekudotayim (::) with the parent keyword is not to resolve static scope but to resolve inherited scope for an overridden method, therefore the issue should be reconsidered. Reproduce code: --- ?php class A { function __call($strMethod, $arrArgs) { return PHP .phpversion(); } } class B extends A { function getVersion() { return parent::getVersion() . Rocks!; } } $A = new A(); echo $A-getVersion() . br/; $B = new B(); echo $B-getVersion() . br/; ? Expected result: PHP 5.2.4 PHP 5.2.4 Rocks! Actual result: -- PHP 5.2.4 Fatal error: Call to undefined method A::getversion() in C:\www\test.php on line 10 -- Edit this bug report at http://bugs.php.net/?id=42937edit=1
#43231 [NEW]: array-based callback syntax is overly E_STRICT
From: chuck at horde dot org Operating system: MacOS 10.4 PHP version: 5.3CVS-2007-11-10 (CVS) PHP Bug Type: Scripting Engine problem Bug description: array-based callback syntax is overly E_STRICT Description: The callback syntax of array('classname', 'methodname') for making static method calls is now enforcing E_STRICT even if E_STRICT is not on. So methods that are not explicitly declared static can't be used this way even with E_STRICT off. Putting static in front of the function makes it work, but of course results in a parse error when the code is run under PHP 4. Reproduce code: --- ?php class Test { function hello() { echo hello\n; } } call_user_func(array('Test', 'hello')); Expected result: hello Actual result: -- Warning: call_user_func() expects parameter 1 to be valid callback, array given in /Users/chuck/callback.php on line 11 -- Edit bug report at http://bugs.php.net/?id=43231edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43231r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43231r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43231r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43231r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43231r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43231r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43231r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=43231r=needscript Try newer version:http://bugs.php.net/fix.php?id=43231r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43231r=support Expected behavior:http://bugs.php.net/fix.php?id=43231r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43231r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43231r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43231r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43231r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43231r=dst IIS Stability:http://bugs.php.net/fix.php?id=43231r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43231r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43231r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43231r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=43231r=mysqlcfg