#40762 [Bgs]: xml_parser failed to parse mixed coding file
ID: 40762 User updated by: forward at hongyu dot org Reported By: forward at hongyu dot org Status: Bogus Bug Type: *XML functions Operating System: Linux and Windows PHP Version: 5.2.1 New Comment: Exactly what you said. Thanks a lot! Previous Comments: [2007-03-09 06:11:13] [EMAIL PROTECTED] You have to change this line in the XML, too ?xml version=1.0 encoding=gb2312 ? [2007-03-08 21:56:57] forward at hongyu dot org Description: My RSS parser failed after I upgrade the PHP version on my server from 4.x to 5.2. When I debugged the code, I found the error was caused by the xml_parse() function's failure to parse the UTF-8 encoded RSS message, which is originally converted from a GB18030 string. The error message looks like: Warning: xml_parse() [function.xml-parse]: input conversion failed due to input error, bytes 0x9B 0xE6 ... The orginal GB encoded string consists of Chinese characters, but I converted it to UTF-8 coding using function iconv(). I can view the converted string correctly on web browsers, which means that there is no converting error. So the failure only comes from xml_parse() function, I believe. For your testing purpose, an example of the original GB18030 string can be downloaded at http://www.la-chinese.com/forum/rss.php?f=19 Thanks! Reproduce code: --- // variable $gb contains the GB encoded string, e.g., from // web address http://www.la-chinese.com/forum/rss.php?f=19 // variable $utf contains the UTF-8 string converted from // the original GB encoded string $urf = iconv('GB18030','UTF-8', $gb); // function feed_start_end and feed_end_element etc. are from // the package Magpierss http://magpierss.sourceforge.net/ xml_set_object( $parser, $this ); xml_set_element_handler($parser, 'feed_start_element', 'feed_end_element' ); xml_set_character_data_handler( $parser, 'feed_cdata' ); $status = xml_parse( $parser, $utf ); Expected result: No error message. Actual result: -- Warning: xml_parse() [function.xml-parse]: input conversion failed due to input error, bytes 0x9B 0xE6 ... -- Edit this bug report at http://bugs.php.net/?id=40762edit=1
#40751 [Opn]: Apache segmentation fault
ID: 40751 User updated by: sti-pe2 at online dot no Reported By: sti-pe2 at online dot no Status: Open Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: I installed older versions of PHP, and 4.3.10(!) actually works... All newer versions result in the same error. Are there any known issues regarding sessions when upgrading from 4.3.10 to 4.3.11? Any config in Apache that may be a problem? Previous Comments: [2007-03-08 07:37:27] sti-pe2 at online dot no Recompiled without --enable-versioning, but I still get the same error. [2007-03-07 21:57:46] [EMAIL PROTECTED] After 10 thousands requests with ab I still can't see anything except does this work?. --enable-versioning - could you please remove this option? [2007-03-07 21:39:16] sti-pe2 at online dot no Description: When running some of my php-pages, I get segmentation faults in Apache. I think I have narrowed it down to session-handling in php, see reproduce code. Pages not including sessions works fine. I have upgraded both Apache, PHP and MySQL lately, but don't know if this is related to the errors I experience. Systeminfo: FreeBSD 5.3-RELEASE Apache 1.3.37 PHP 4.4.6 ZendOptimizer 3.2.2 (disabled for now) MySQL 4.1.22 register_globals=on Tests with register_globals=off does not make any difference. PHP compile options: ./configure --enable-versioning --enable-memory-limit --with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php --disable-all --with-regex=php --with-apxs=/usr/local/sbin/apxs --disable-ipv6 --prefix=/usr/local Reproduce code: --- ? session_register(test_sessie); echo does this work?; ? Expected result: Output to screen/browser: does this work? Actual result: -- The browser returns a blank page, command line returns Segmentation fault (core dumped). /var/log/messages: kernel: pid 459 (httpd), uid 80: exited on signal 11 Apache's error.log: child pid 458 exit signal Segmentation fault (11) # gdb php GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-marcel-freebsd... (gdb) run test.php Starting program: /usr/local/bin/php test.php Program received signal SIGSEGV, Segmentation fault. 0x080cae9a in _zval_ptr_dtor (zval_ptr=0x282e7928) at /root/dl/php-4.4.6/Zend/zend_execute_API.c:287 287 (*zval_ptr)-refcount--; (gdb) -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#40749 [Com]: pack and unpack erroneous behavior on 64bits hosts
ID: 40749 Comment by: windeler at mediafinanz dot de Reported By: ben at ateor dot com Status: Open Bug Type: Unknown/Other Function Operating System: OpenBSD amd64 and sparc64 PHP Version: 5.2.1 New Comment: Here is another example of a problem with unpack on 64bit systems. It worked in 5.1.6, but with 5.2.1 the results are bogus. The expected value from the file content is 200, but PHP says -2147483448 when I echo $a['i']. ?php $f = fopen('test.pdf','rb'); //Read a 4-byte integer from file $a = unpack('Ni',fread($f,4)); echo $a['i']; fclose($f); ? Previous Comments: [2007-03-07 17:12:58] ben at ateor dot com Description: This is a follow-up on #40543 (http://bugs.php.net/bug.php?id=40543, since that bug is closed, I can't add comments). Please note : it's not identical to #4053 (other weird behaviors are demonstrated). Iliaa, Not sure why you suggest to use little endian or host conversions routines, but in my standpoint if you reverse twice a number's byte ordering then you should get the original number back (assuming the number don't overflows php's internals). At least, that's the standard behavior for perl and python. Beside, I can't see why php should handles those endianness conversions differently on an i386 (32 bits) and on an x86_64 (64 bits), both having the same byte order. The following on a 64bit, little endian host : x86_64$ uname -mprsv OpenBSD 4.0 GENERIC#0 amd64 AMD Sempron(tm) Processor 3400+ x86_64$ perl -e 'print unpack(N, pack(N, 41445)) .\n' 41445 x86_64$ python Python 2.4.3 (#1, Sep 6 2006, 20:33:08) [GCC 3.3.5 (propolice)] on openbsd4 Type help, copyright, credits or license for more information. from struct import * unpack('L', pack('L', 41445)) (41445L,) And, indeed : #include stdio.h #include sys/types.h int main(void) { u_int32_t x, y, z; /* 32 bits unsigned longs */ x = 41445; /* conv host (little) to network (big endian) long : pack(N, 41445) */ y = htonl(x); /* conv network (big endian) to host (little) long : unpack(N, ...) */ z = ntohl(y); printf(Host : %li\nBig : %li\nHost : %li\n, x, y, z); return 0; } x86_64$ gcc conv.c -o conv ; ./conv Host : 41445 Big : -442433536 Host : 41445 But still (PHP 5.2.2-dev (cli) (built: Feb 27 2007 22:10:11)) : x86_64$ php -r 'print_r(unpack(N, pack(N, 41445)));' Array ( [1] = -2147442203 ) While on a plain old x86 little endian host (PHP 4.4.0), we get a different result : i386_32$ uname -mprsv OpenBSD 3.9 GENERIC#0 i386 Intel(R) Pentium(R) 4 CPU 1.70GHz (GenuineIntel 686-class) i386_32$ php -r 'print_r(unpack(N, pack(N, 41445)));' Array ( [1] = 41445 ) Still on the 64 bits little endian host : x86_64$ php -r '$a = unpack(N, pack(N, 65536)); printf($a[1]\n);' 65536 # Ok x86_64$ php -r '$a = unpack(N, pack(N, 65535)); printf($a[1]\n);' -2147418113 # Weird x86_64$ php -r '$a = unpack(N, pack(N, 0x1234)); printf(0x%x\n, $a[1]);' 0x1234 # Ok x86_64$ php -r '$a = unpack(L, pack(N, 0x1234)); printf(0x%x\n, $a[1]);' 0x3412 # Ok x86_64$ php -r '$a = unpack(L, pack(L, 0x)); printf(0x%x\n, $a[1]);' 0x # Ok x86_64$ php -r '$a = unpack(N, pack(N, 0x)); printf(0x%x\n, $a[1]);' 0x8000 # The doc says N gives you always 32 bit, and we get # 8 bytes. No wonder why we overflow. x86_64$ php -r '$a = unpack(N, pack(N, 0xff )); printf(0x%x\n, $a[1]);' 0x80ff # Same. Don't tell me 0xff is too large. And now, all the following tests are on a 64 bits _big endian_ host (sparc64, running php-5.2.1) : sparc64$ uname -mprsv OpenBSD 3.8 GENERIC#607 sparc64 SUNW,UltraSPARC-IIi @ 440 MHz, version 0 FPU sparc64$ php -r '$a = unpack(N, pack(N, 0x)); printf(0x%x\n, $a[1]);' 0x # Ok # The same, but prefixing to the argument : sparc64$ php -r '$a = unpack(N, pack(N, 0x)); printf(0x%x\n, $a[1]);' 0x8000 # Weird (and with N, we stayed on the host byte order this time). # Shouldn't 0x == 0x, even on big endian ? Apparently, yes : sparc64$ php -r 'printf(0x%x\n, 0x);' 0x # Also, look at this : sparc64$ php -r '$a = unpack(N, pack(N, 41445)); printf($a[1]\n);' 41445 # And now let's just remove the line feed (\n) from the above printf : sparc64$ php -r '$a = unpack(N, pack(N, 41445)); printf($a[1]);' -2147442203 # Same for 2^16 -1 / 65535 / 0xfff : sparc64$ php -r '$a = unpack(N, pack(N, 65535)); printf($a[1]\n);' 65535 sparc64$ php -r '$a = unpack(N, pack(N, 65535)); printf($a[1]);' -2147418113 # We get the opposite (bogus with \n, correct without) when converting # to little endian and back to host : sparc64$ php -r '$a = unpack(L, pack(L, 0x)); printf( $a[1]);' 65535 sparc64$ php -r '$a = unpack(L, pack(L, 0x)); printf( $a[1].\n);' -2147418113 This doesn't help : SKIP Generic pack()/unpack()
#40552 [Opn-Bgs]: is php crap ?
ID: 40552 Updated by: [EMAIL PROTECTED] Reported By: lepage at grm dot polymtl dot ca -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Solaris 9 PHP Version: 5.2.1 New Comment: Feel free to donate a Solaris 9 machine to me. Until then you'll have to test release candidates yourself. Previous Comments: [2007-03-08 01:11:26] lepage at grm dot polymtl dot ca I am loosing fate in the php team. They have no test bench or what? No longer looking for '.' in the path is a pretty serious stupid bug. I was looking every where for a solution only thing I found looking for those keyword where site that are actually down..! I was even told here it's not a bug, I had to do coding to prove that include ./file does not work. hakkarainen, thank for tesing the latest version for me, I have no more time to test all the latest php crap. [2007-03-07 13:18:57] hakkarainen at cs dot joensuu dot fi I have the very same problem with php5.2-200703060530 and Solaris 9 (php5.2-200611160530 did not had this problem). [2007-03-07 01:00:00] 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-02-27 18:31:17] [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 [2007-02-22 01:44:10] lepage at grm dot polymtl dot ca note that if I use include('/home/lepage/HTML/include.inc'); it does work while using include('./include.inc'); does not work. It was woking fine in php-5.1.5 and not in php-5.2.0 nor php-5.2.1, I see in change log : - Removed current working directory from the php.ini search path for CLI and re-added it for other SAPIs (restore to pre 5.1.x behavior). (Edin) may be it was not well restore... I don't know. Can you please help me fix this. it cause many problem with user installed phpBB and phpAlbum. 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/40552 -- Edit this bug report at http://bugs.php.net/?id=40552edit=1
#40756 [Opn-Fbk]: ODBC Oracle Connection
ID: 40756 Updated by: [EMAIL PROTECTED] Reported By: norm dot pence at gmail dot com -Status: Open +Status: Feedback -Bug Type: Oracle related +Bug Type: ODBC related Operating System: Windows Server 2003 Standard x64 PHP Version: 4.4.6 New Comment: Remove the firewall? Previous Comments: [2007-03-08 04:08:51] norm dot pence at gmail dot com Description: ODBC Oracle connection is never attempted using Apache 2.0.59. Removing \m's does not resolve the issue. [ODBC 32 bit Data Sources] DMS=Oracle in OraClient10g_home32 (32 bit) [DMS] Driver32=D:\oracle\product\10.2.0\client_32\BIN\SQORA32.DLL Reproduce code: --- ?php echo PHP OBDC Connection to DMS.br\n; echo The Current Date and Time is: br; echo date(g:i A l, F j Y.); echo brbr\n; $db_conn = odbc_connect(DMS, username_here, password_here); if( $db_conn == 0 ) { echo Connection failed to System DNS=DMS.brbr\n; } else { $cmdstr = select * from my_tbl; $results = odbc_exec($db_conn, $cmdstr); $nrows = odbc_result_all($results, border=1); echo Found: $nrows resultsbrbr\n; odbc_pclose( $db_conn ); } ? Expected result: ORACLE ODBC connection attempted and successful. SQLNET Trace kicked off from c:\windows\syswow64\odbcad32.exe test connection below: (1380) [07-MAR-2007 20:02:02:198] --- TRACE CONFIGURATION INFORMATION FOLLOWS --- (1380) [07-MAR-2007 20:02:02:198] New trace stream is D:\oracle\product\10.2.0\client_32\NETWORK\trace\sqlnet.trc (1380) [07-MAR-2007 20:02:02:198] New trace level is 6 (1380) [07-MAR-2007 20:02:02:198] --- TRACE CONFIGURATION INFORMATION ENDS --- (1380) [07-MAR-2007 20:02:02:198] --- PARAMETER SOURCE INFORMATION FOLLOWS --- (1380) [07-MAR-2007 20:02:02:198] Attempted load of system pfile source D:\oracle\product\10.2.0\client_32\network\admin\sqlnet.ora (1380) [07-MAR-2007 20:02:02:198] Parameter source loaded successfully (1380) [07-MAR-2007 20:02:02:198] (1380) [07-MAR-2007 20:02:02:198] Attempted load of local pfile source C:\windows\syswow64\sqlnet.ora (1380) [07-MAR-2007 20:02:02:198] Parameter source was not loaded (1380) [07-MAR-2007 20:02:02:198] (1380) [07-MAR-2007 20:02:02:198] - PARAMETER TABLE LOAD RESULTS FOLLOW - (1380) [07-MAR-2007 20:02:02:198] Successful parameter table load (1380) [07-MAR-2007 20:02:02:198] - PARAMETER TABLE HAS THE FOLLOWING CONTENTS - (1380) [07-MAR-2007 20:02:02:198] TRACE_LEVEL_CLIENT = ADMIN (1380) [07-MAR-2007 20:02:02:198] NAMES.DIRECTORY_PATH = (TNSNAMES) (1380) [07-MAR-2007 20:02:02:198] TRACE_DIRECTORY_CLIENT = D:\oracle\product\10.2.0\client_32\NETWORK\trace (1380) [07-MAR-2007 20:02:02:198] SQLNET.AUTHENTICATION_SERVICES = (NTS) (1380) [07-MAR-2007 20:02:02:198] TRACE_FILE_CLIENT = SQLNET.TRC (1380) [07-MAR-2007 20:02:02:198] TRACE_UNIQUE_CLIENT = OFF (1380) [07-MAR-2007 20:02:02:198] NAMES.DEFAULT_DOMAIN = mydomain.com (1380) [07-MAR-2007 20:02:02:198] --- PARAMETER SOURCE INFORMATION ENDS --- (1380) [07-MAR-2007 20:02:02:198] --- LOG CONFIGURATION INFORMATION FOLLOWS --- (1380) [07-MAR-2007 20:02:02:198] Log stream will be C:\windows\syswow64\sqlnet.log (1380) [07-MAR-2007 20:02:02:198] Log stream validation not requested (1380) [07-MAR-2007 20:02:02:198] --- LOG CONFIGURATION INFORMATION ENDS --- (1380) [07-MAR-2007 20:02:02:198] nlstdipi: entry (1380) [07-MAR-2007 20:02:02:198] nlstdipi: exit (1380) [07-MAR-2007 20:02:02:198] nigini: entry (1380) [07-MAR-2007 20:02:02:198] nigini: Count in the NL global area is now 1 (1380) [07-MAR-2007 20:02:02:198] nigini: Count in NI global area now: 1 (1380) [07-MAR-2007 20:02:02:198] nrigbi: entry (1380) [07-MAR-2007 20:02:02:198] nrigbni: entry (1380) [07-MAR-2007 20:02:02:198] nrigbni: Unable to get data from navigation file tnsnav.ora (1380) [07-MAR-2007 20:02:02:198] nrigbni: exit (1380) [07-MAR-2007 20:02:02:198] nrigbi: exit (1380) [07-MAR-2007 20:02:02:198] nigini: exit (1380) [07-MAR-2007 20:02:02:198] niqname: Hst is already an NVstring. (1380) [07-MAR-2007 20:02:02:198] niqname: Inserting CID. (1380) [07-MAR-2007 20:02:02:198] niotns: entry (1380) [07-MAR-2007 20:02:02:198] niotns: Not trying to enable dead connection detection. (1380) [07-MAR-2007 20:02:02:198] niotns: Calling address: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=test2)(PORT=1546)))(CONNECT_DATA=(SID=DMSTEST)(SERVICE_NAME=DMSTEST)(GLOBAL_NAME=DMSTEST.mydomain.COM)(CID=(PROGRAM=c:\windows\syswow64\odbcad32.exe)(HOST=LVDMS1)(USER=shipnow (1380) [07-MAR-2007 20:02:02:198] nsmal: 212 bytes at 0x2597168 (1380) [07-MAR-2007 20:02:02:198] nscall: connecting... (1380) [07-MAR-2007 20:02:02:198] nladini: entry (1380) [07-MAR-2007 20:02:02:198] nladini: exit (1380) [07-MAR-2007 20:02:02:198] nladget: entry (1380) [07-MAR-2007 20:02:02:198] nladget: exit (1380) [07-MAR-2007
#40544 [Asn]: PostgreSQL connection hangs after die()
ID: 40544 Updated by: [EMAIL PROTECTED] Reported By: kees at tweakers dot net Status: Assigned Bug Type: PostgreSQL related Operating System: Linux (Debian) PHP Version: 5.2.1 Assigned To: yohgaki New Comment: By calling PQcanel() before clean up resource, all async query which is not finished yet will be discarded instead of finishing its query. And that's something I would call expected, because rollback on shutdown is much safer than commit on shutdown. I'll add new ini option that enables PQcancel() in list_entry_destructor. Any comments? More INI options? No, thanks. Previous Comments: [2007-03-08 04:24:24] yohgaki at ohgaki dot net I didn't look the backtrace carefully. It stops when PQclear() is called on the backtrace, while my PHP 5.2 stopeed at PQgetReuslt(). (Both of them are called when request is shutting down) For at least PHP 5.2, it would be solved by calling PQcanel() when cleaning up resource, but with compatibility issue. By calling PQcanel() before clean up resource, all async query which is not finished yet will be discarded instead of finishing its query. I'll add new ini option that enables PQcancel() in list_entry_destructor. Any comments? [2007-03-07 22:09:55] yohgaki at ohgaki dot net Since COPY is not a actual SQL statement, PostgreSQL waits forever until COPY ends because the input is STDIN. (SQL Statements like SELECT, UPDATE, DELETE, INSERT will be aborted if there is deadlock) Since PQfinish() (Used while shutting down pgsql connections) does not have option to wait certain amount of time to force closing connection, I'm not sure if it is feasible shutting down w/o waiting to finish COPY, etc. It's possible to force close connection manually using internal PGconn strucutre's connection parameter, but there would be portability issues if it use PGconn internal parameters. I'll see if there is I can do about this in feasible manner. [2007-02-19 15:52:58] kees at tweakers dot net tested with the snapshot: [EMAIL PROTECTED]:/usr/src/php5.2-200702191330$ sapi/cli/php test.3.php Starting And now he hangs in a busy wait [ctrl-c] [EMAIL PROTECTED]:/usr/src/php5.2-200702191330$ sapi/cli/php -v PHP 5.2.2-dev (cli) (built: Feb 19 2007 16:49:22) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies ldd sapi/cli/php libpq.so.5 = /usr/lib/libpq.so.5 (0xa7f3c000) [2007-02-19 15:19:10] acm at tweakers dot net Btw, when hanging gdb to the php-process and type 'bt' you get this: #0 0xa7ba88c0 in free () from /lib/tls/libc.so.6 #1 0xa7ec8ea7 in PQclear () from /usr/lib/libpq.so.5 #2 0x08086fc8 in _close_pgsql_link (rsrc=0x81e43ec) at /usr/src/php-4.4.2/ext/pgsql/pgsql.c:277 #3 0x08139fb2 in list_entry_destructor (ptr=0x81e43ec) at /usr/src/php-4.4.2/Zend/zend_list.c:177 #4 0x08137977 in zend_hash_apply_deleter (ht=0x81a49e0, p=0x81e43b4) at /usr/src/php-4.4.2/Zend/zend_hash.c:611 #5 0x08137b97 in zend_hash_graceful_reverse_destroy (ht=0x81a49e0) at /usr/src/php-4.4.2/Zend/zend_hash.c:677 #6 0x0812b9ed in shutdown_executor () at /usr/src/php-4.4.2/Zend/zend_execute_API.c:211 #7 0x08133801 in zend_deactivate () at /usr/src/php-4.4.2/Zend/zend.c:689 #8 0x08107862 in php_request_shutdown (dummy=0x0) at /usr/src/php-4.4.2/main/main.c:999 #9 0x0814ee56 in main (argc=2, argv=0xafb6d114) at /usr/src/php-4.4.2/sapi/cli/php_cli.c:881 [2007-02-19 15:10: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/40544 -- Edit this bug report at http://bugs.php.net/?id=40544edit=1
#40757 [Opn-Bgs]: get_object_vars get nothing in child class
ID: 40757 Updated by: [EMAIL PROTECTED] Reported By: nrspark at 163 dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Windows XP PHP Version: 5.2.1 New Comment: I would be very surprised to be able to access private properties of Base in the context of Child. What you see is expected. Previous Comments: [2007-03-08 12:05:12] nrspark at 163 dot com Description: method to get the private properties of the base object in base class object, everything ok in child class use inherit method, get empty Reproduce code: --- class Base { private $p1='sadf'; function getFields($obj){ return get_object_vars($obj); } } class Child extends Base { } $base=new Base(); print_r($base-getFields(new Base())); $child=new Child(); print_r($child-getFields(new Base())); Expected result: Array ( [p1] = sadf )Array ( [p1] = sadf ) Actual result: -- Array ( [p1] = sadf ) Array ( ) -- Edit this bug report at http://bugs.php.net/?id=40757edit=1
#40747 [Opn-Csd]: Reproducible Crash
ID: 40747 Updated by: [EMAIL PROTECTED] Reported By: th at domainbox dot de -Status: Open +Status: Closed Bug Type: Reproducible crash Operating System: Debian Sarge PHP Version: 4.4.6 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-03-08 12:24:04] th at domainbox dot de I could solve this problem changeing mod_files.c. Note that i'm not a programmer ;) --- php4-STABLE-200703070730/ext/session/mod_files.c2007-01-05 02:33:20.0 +0100 +++ php4-STABLE-200703070730-dbx/ext/session/mod_files.c 2007-03-08 13:09:48.0 +0100 @@ -280,8 +280,10 @@ if (data-lastkey) efree(data-lastkey); - efree(data-basedir); - efree(data); + if (data-basedir) + efree(data-basedir); + if (data) + efree(data); *mod_data = NULL; return SUCCESS; This returns my php installation to the expected behavior: Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/user) in /home/user/html/test.php on line 3 [2007-03-08 06:53:07] th at domainbox dot de I retried this on a different System, same behavior in 4.4.6 and php4-STABLE-200703070730. This is my compile Script: #!/bin/sh echo ## echo PHP echo ## tar xvzf php4-STABLE-200703070730.tar.gz cd php4-STABLE-200703070730 echo ## Running configure on php ./configure \ --prefix=/usr \ --with-gd \ --with-ttf \ --with-freetype \ --with-freetype-dir=/usr \ --with-imap \ --with-iconv \ --with-jpeg-dir=/usr \ --with-png-dir=/usr \ --with-mcrypt=/usr \ --with-zlib \ --with-mysql \ --with-gettext \ --with-config-file-path=/etc/httpd \ --with-ldap-dir=/usr \ --enable-filepro \ --enable-dba \ --enable-ctype \ --enable-wddx \ --enable-exif \ --enable-bcmath \ --enable-track-vars \ --enable-sockets \ --enable-trans-sid \ --enable-dbase \ --no-recursion \ --with-apxs echo ## Running make on php make make install Calling session_save_path with any value gives the expected behavior like: Warning: session_start() [function.session-start]: open(bla/sess_e5d8178fe831d9fa1f29f188c397123c, O_RDWR) failed: No such file or directory (2) [2007-03-07 14:45:00] [EMAIL PROTECTED] This code snippet works perfectly fine. [2007-03-07 14:22:23] th at domainbox dot de The problem seems to be that xt::Commerce's configuration variable SESSION_WRITE_DIRECTORY is set to an emtpy value. The problem can be reduced to this code snippet: ? session_save_path(); session_start(); ? [2007-03-07 10:15:32] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. 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/40747 -- Edit this bug report at http://bugs.php.net/?id=40747edit=1
#40750 [Opn-Fbk]: fsockopen timeout parameter overwrites timeout for reading
ID: 40750 Updated by: [EMAIL PROTECTED] Reported By: andreas dot rieber at 2e-systems dot com -Status: Open +Status: Feedback Bug Type: Network related Operating System: OpenSuse PHP Version: 5.2.1 New Comment: Not reproducible. Previous Comments: [2007-03-08 13:32:45] andreas dot rieber at 2e-systems dot com I tried now also the latest snapshoot (php5.2-200703081130) and double checked my default_socket_timeout which is 60. The fgets gets the timeout from fsockopen. [2007-03-07 21:59:20] [EMAIL PROTECTED] The manual says for fsockopen: Note: If you need to set a timeout for reading/writing data over the socket, use stream_set_timeout(), as the timeout parameter to fsockopen() only applies while connecting the socket. That's still correct, there were no changes to this behavior. [2007-03-07 20:00:16] andreas dot rieber at 2e-systems dot com I want to use the default connection timeout for read/write but a shorter timeout to connect (here 5 seconds). What happens is that the first fgets gets also the 5 seconds timeout and so my header is empty. The manual says for fsockopen: Note: If you need to set a timeout for reading/writing data over the socket, use stream_set_timeout(), as the timeout parameter to fsockopen() only applies while connecting the socket. and thats absolut ok and what i want. It worked with php 5.2.0 and before but not with 5.2.1. [2007-03-07 18:41:56] [EMAIL PROTECTED] I get Header OK. Also I don't understand what the expected result has to do with the timeout. [2007-03-07 18:29:03] andreas dot rieber at 2e-systems dot com Description: The timeout parameter of fsockopen overwrites the general read/write timeout. Without the timeout parameter in fsockopen or if you use stream_set_timeout after fsockopen it works. I created scipt a.php which opens b.php. the connection has a timeout of 5 seconds. b.php sleeps for 7 seconds. The first fgets fails and stream_get_meta_data shows that it timed out. It works with php 5.2.0. Reproduce code: --- code a.php ?php $fp = @fsockopen( 'localhost', 80, $errno, $errstr, 5); if( !$fp) die( $errno: $errstr); fwrite( $fp, GET /b.php HTTP/1.0\r\nHost: localhost\r\n\r\n); // read result $data = ''; while( !feof( $fp)) { $line = fgets( $fp, 8192); if( trim( $line) == '') break; $data .= $line; } fclose( $fp); // check header if( eregi( '^HTTP\/[0-9\.]+ ([0-9]{3}) .*', $data, $reg)) { echo Header OK; } else { echo Header failed; } ? code b.php ?php sleep( 7); ? Expected result: Header OK Actual result: -- Header failed -- Edit this bug report at http://bugs.php.net/?id=40750edit=1
#40758 [Opn-Asn]: Test fcgi_is_fastcgi() is wrong on windows
ID: 40758 Updated by: [EMAIL PROTECTED] Reported By: jostb2345 at yahoo dot com -Status: Open +Status: Assigned -Bug Type: Reproducible crash +Bug Type: CGI related Operating System: Windows (all versions) PHP Version: 5.2.1 -Assigned To: +Assigned To: dmitry Previous Comments: [2007-03-08 13:45:33] jostb2345 at yahoo dot com Description: On windows, php 5.2.0 and above the following code (written in pseudo-code) doesn't work anymore: socket = socket(AF_INET, ...); bind(socket, ...); listen(socket, ...); outputHandle=GetStdHandle(...); inputHandle=socket; CreateProcess(...,php-cgi.exe, ..., IOHandles); The problem is that is_fastcgi is only set if the OutputHandle and ErrorHandle are invalid. If both are invalid, InputHandle is assumed to be a named pipe. The Unix version still uses the old (correct) code. To correct this problem either the old FCGI_isfcgi() should be used or the test must be dublicated. See procedures: int fcgi_init(void); int fcgi_is_fastcgi(void); Regards, Jost Boekemeier Reproduce code: --- See above. If necessary I can provide a test program. -- Edit this bug report at http://bugs.php.net/?id=40758edit=1
#40392 [Opn-Fbk]: memory leaks in PHP milter SAPI and proposed fix
ID: 40392 Updated by: [EMAIL PROTECTED] Reported By: tuxracer69 at gmail dot com -Status: Open +Status: Feedback Bug Type: Unknown/Other Function Operating System: Linux 2.6.17-2-686 PHP Version: 5CVS-2007-02-07 (snap) New Comment: Please upload the patch somewhere (applying copy/pasted patches is non-trivial). Why did you need to include php_getopt.h header, I wonder? Previous Comments: [2007-03-08 13:52:10] tuxracer69 at gmail dot com Hi, Just to follow up on this bug, the patch above has now been running in a production server for a month and the whole setup sendmail+phpmilter was stable. Alex [2007-02-09 08:52:36] tuxracer69 at gmail dot com oops the exit_status was broken, should be: diff -u php_milter.c.dist php_milter.c --- php_milter.c.dist 2007-02-07 10:18:03.0 + +++ php_milter.c2007-02-09 08:48:03.0 + @@ -63,6 +63,8 @@ #include libmilter/mfapi.h +#include php_getopt.h + #define OPTSTRING ac:d:Def:hnp:vVz:? #define MG(v) TSRMG(milter_globals_id, zend_milter_globals *, v) @@ -202,7 +204,7 @@ call_user_function(CG(function_table), NULL, function_name, retval, 1, param TSRMLS_CC); MG(state) = MLFI_NONE; - + zval_ptr_dtor(param); if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); } @@ -235,8 +237,8 @@ call_user_function(CG(function_table), NULL, function_name, retval, 1, param TSRMLS_CC); MG(state) = MLFI_NONE; + zval_ptr_dtor(param); - FREE_ZVAL(param[0]); if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -275,8 +277,8 @@ call_user_function(CG(function_table), NULL, function_name, retval, 1, param TSRMLS_CC); MG(state) = MLFI_NONE; + zval_ptr_dtor(param); - FREE_ZVAL(param[0]); if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -316,7 +318,8 @@ MG(state) = MLFI_NONE; - FREE_ZVAL(param[0]); + zval_ptr_dtor(param); + if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -354,8 +357,9 @@ MG(state) = MLFI_NONE; - FREE_ZVAL(param[0]); - FREE_ZVAL(param[1]); + zval_ptr_dtor(param[0]); + zval_ptr_dtor(param[1]); + if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -408,7 +412,7 @@ INIT_PZVAL(param[0]); ZVAL_STRING(function_name, milter_body, 0); - ZVAL_STRINGL(param[0], bodyp, len, 1); + ZVAL_STRINGL(param[0], (char*)bodyp, len, 1); /*alex*/ /* set the milter context for possible use in API functions */ MG(ctx) = ctx; @@ -418,7 +422,8 @@ MG(state) = MLFI_NONE; - FREE_ZVAL(param[0]); + zval_ptr_dtor(param); + if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -548,7 +553,7 @@ if (MG(state) != MLFI_INIT) { php_error(E_WARNING, NOT_INIT, get_active_function_name(TSRMLS_C)); } else if (zend_parse_parameters(1 TSRMLS_CC, l, flags) == SUCCESS) { - flags = flags SMFIF_ADDHDRS|SMFIF_CHGHDRS|SMFIF_CHGBODY|SMFIF_ADDRCPT|SMFIF_DELRCPT; + flags = flags (SMFIF_ADDHDRS|SMFIF_CHGHDRS|SMFIF_CHGBODY|SMFIF_ADDRCPT|SMFIF_DELRCPT); smfilter.xxfi_flags = flags; } } @@ -703,7 +708,7 @@ if (MG(state) != MLFI_EOM) { php_error(E_WARNING, NOT_EOM, get_active_function_name(TSRMLS_C)); } else if (zend_parse_parameters(1 TSRMLS_CC, s, body, len) == SUCCESS) { - if (smfi_replacebody(MG(ctx), body, len) == MI_SUCCESS) { + if (smfi_replacebody(MG(ctx), (u_char*)body, len) == MI_SUCCESS) { RETURN_TRUE; } } @@ -732,6 +737,8 @@ MG(state) = MLFI_NONE; MG(initialized) = 0; +return SUCCESS; + } /* }}} */ @@ -920,9 +927,7 @@ /* temporary locals */ int orig_optind=ap_php_optind; char *orig_optarg=ap_php_optarg; - char *arg_free=NULL, **arg_excp=arg_free; int interactive=0; - char *exec_direct=NULL; char *param_error=NULL; /* end of temporary locals */ @@ -1099,7 +1104,7 @@ openlog(php-milter, LOG_PID, LOG_MAIL); - if (exit_status = mlfi_init()) { + if ((exit_status = mlfi_init())) { syslog(1, mlfi_init failed.); exit(exit_status); } [2007-02-09 08:10:42] tuxracer69 at gmail dot com a longer patch aimed at fixing besides the mem leaks the compile warnings (type cast, declarations, parenthesis). diff -u php_milter.c.dist
#40759 [Opn-Fbk]: pspell_new_personal does not load custom dictionary
ID: 40759 Updated by: [EMAIL PROTECTED] Reported By: david at mytton dot net -Status: Open +Status: Feedback Bug Type: Pspell related Operating System: Windows XP PHP Version: 5.2.1 New Comment: We'll also need your dictionary to investigate it. Though I doubt it has something to do with PHP. If pspell doesn't use your dictionary, it's hardly PHP problem. Previous Comments: [2007-03-08 17:14:15] david at mytton dot net Corrected typo in summary [2007-03-08 17:13:40] david at mytton dot net Description: The personal dictionary does not appear to be used when asking pspell for suggestions. The same result occurs whether or not custom.dict actually exists. E.g. if I change the filename to customdict no error is output and the output is the same. I tried this with the latest php_pspell.dll from http://snaps.php.net/win32/php5.2-win32-200703081530.zip Reproduce code: --- ?php $spelling = pspell_new_personal('C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\custom.dict', 'en'); $suggestions = pspell_suggest($spelling, 'bloomsbur'); echo 'pre'; print_r($suggestions); '/pre'; ? custom.dict: personal_ws-1.1 en 1 bloomsbury Expected result: Array of suggestions including bloomsbury in the suggestions. Actual result: -- bloomsbury is not in the suggestions list: Array ( [0] = blooms bur [1] = blooms-bur [2] = blooms [3] = Bloom's [4] = bloom's [5] = bloomers [6] = Bloomer [7] = bloomer ) -- Edit this bug report at http://bugs.php.net/?id=40759edit=1
#40760 [Opn-Bgs]: not honoring mode of shm_attach
ID: 40760 Updated by: [EMAIL PROTECTED] Reported By: secker at careviewcom dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Debian 'Etch', kern 2.6.17-2-486 PHP Version: 5.2.1 New Comment: $sh = shm_attach($f); http://php.net/shm_attach ..and the optional perm-bits perm (default: 0666)... I would guess this is maybe because shm_attach can't open a segment as read-only, and always tried to open it as rw? Exactly. That's because by default it tries to open it in 0666 mode. Specify 0644 and voila.. Previous Comments: [2007-03-08 17:41:31] secker at careviewcom dot com Description: If I create a Shared memory segment using shm_attach with one user, and set it as readable by all users, but only writable by the owner, then other users cannot open the segment via shm_attach, they get permission denied errors. I would guess this is maybe because shm_attach can't open a segment as read-only, and always tried to open it as rw? Reproduce code: --- run as someuser1: ?php $f = ftok('somefile', 'I'); $sh = shm_attach($f, 1024000, 0644); ? works if its not already created by another user... run as someuser2: ?php $f = ftok('somefile', 'I'); $sh = shm_attach($f); ? Expected result: what I would expect is that since I created it as 0644, other users should be able to access it via read-only mode (which I can do if I open it using shmop_open with the read-only flag instead). Actual result: -- second user gets Permission Denied php warning messages. once again, I think this is mearly a result of shm_attach not actually ever opening an shm as read-only, always read-write... but I might be mistaken. Thanks. -- Edit this bug report at http://bugs.php.net/?id=40760edit=1
#40761 [Opn-Asn]: header() is wrongly handled, thus causing problems for browsers
ID: 40761 Updated by: [EMAIL PROTECTED] Reported By: c dot kirschnick at gmx dot net -Status: Open +Status: Assigned Bug Type: CGI related Operating System: * PHP Version: 4.4.5 -Assigned To: +Assigned To: mike Previous Comments: [2007-03-08 20:43:33] c dot kirschnick at gmx dot net Description: This bug was sent in before, but marked wrong bogus/won't fix. (See Bug #38369). PHP does not correctly handle calls such as header(Status: ...). In CGI mode it should process such a call as a changing the HTTP response code (consistent with its handling of, e.g., header(Location: ...)). However, at present there is no special handling of the Status: header. That's why sending Status: and then Location: causes a duplicate header: the Location: header is handled as a special case and causes sapi_update_response_code(302) to be called, whereas the Status: header is just added to the list of headers to be sent back to the web server (see bug #33225 incorrectly marked bogus, I think because the reviewer doesn't understand CGI). Note that sending two different Status: headers explicitly with header(Status: ...) doesn't give this error, because the default operation is to *replace* the header, not add a new one. Since PHP should conform to the CGI-norm, this bug should be fixed. Although the IE does not fully stick to this norm, the FF does - which ignores duplicated headers, resulting in different behaviour of both. Reproduce code: --- ? header(HTTP/1.1 403 Forbidden); ? Expected result: An error message created by the browser Actual result: -- IE: correct 403 FF: blank page (no output) The headers: HTTP/1.1 200 OK HTTP/1.1 403 Forbidden -- Edit this bug report at http://bugs.php.net/?id=40761edit=1
#40425 [Opn-Fbk]: php_getuid() always return 1.
ID: 40425 Updated by: [EMAIL PROTECTED] Reported By: priappub at yahoo dot fr -Status: Open +Status: Feedback Bug Type: Safe Mode/open_basedir Operating System: Solaris 10 PHP Version: 5.2.1 New Comment: And the same for Sun apache, please. Previous Comments: [2007-03-08 22:32:38] priappub at yahoo dot fr For the difference, I don't know... I have this: [EMAIL PROTECTED] ~]# /usr/apache2/bin/httpd -V Server version: Apache/2.0.58 Server built: Sep 5 2006 07:46:49 Server's Module Magic Number: 20020903:12 Server loaded: APR 0.9.12, APR-UTIL 0.9.12 Compiled using: APR 0.9.12, APR-UTIL 0.9.12 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/apache2 -D SUEXEC_BIN=/usr/apache2/bin/suexec -D DEFAULT_PIDLOG=/var/run/apache2/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=/var/run/apache2/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=/etc/apache2/mime.types -D SERVER_CONFIG_FILE=/etc/apache2/httpd.conf [2007-03-07 10:19:42] [EMAIL PROTECTED] What's the difference between Sun Apache and the one compiled from sources? [2007-03-07 10:13:40] priappub at yahoo dot fr Same problem with the snapshot. But it seems that the problem is the apache provided by SUN because if I compile apache from the source, safe_mode is OK. [2007-03-06 12:07:54] [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 [2007-02-11 09:34:03] [EMAIL PROTECTED] Then we will have to wait for someone with Solaris 10 to reproduce and fix it. 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/40425 -- Edit this bug report at http://bugs.php.net/?id=40425edit=1
#40751 [Opn-Fbk]: Apache segmentation fault
ID: 40751 Updated by: [EMAIL PROTECTED] Reported By: sti-pe2 at online dot no -Status: Open +Status: Feedback Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: Do you have open_basedir set? Previous Comments: [2007-03-09 09:02:42] sti-pe2 at online dot no I installed older versions of PHP, and 4.3.10(!) actually works... All newer versions result in the same error. Are there any known issues regarding sessions when upgrading from 4.3.10 to 4.3.11? Any config in Apache that may be a problem? [2007-03-08 07:37:27] sti-pe2 at online dot no Recompiled without --enable-versioning, but I still get the same error. [2007-03-07 21:57:46] [EMAIL PROTECTED] After 10 thousands requests with ab I still can't see anything except does this work?. --enable-versioning - could you please remove this option? [2007-03-07 21:39:16] sti-pe2 at online dot no Description: When running some of my php-pages, I get segmentation faults in Apache. I think I have narrowed it down to session-handling in php, see reproduce code. Pages not including sessions works fine. I have upgraded both Apache, PHP and MySQL lately, but don't know if this is related to the errors I experience. Systeminfo: FreeBSD 5.3-RELEASE Apache 1.3.37 PHP 4.4.6 ZendOptimizer 3.2.2 (disabled for now) MySQL 4.1.22 register_globals=on Tests with register_globals=off does not make any difference. PHP compile options: ./configure --enable-versioning --enable-memory-limit --with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php --disable-all --with-regex=php --with-apxs=/usr/local/sbin/apxs --disable-ipv6 --prefix=/usr/local Reproduce code: --- ? session_register(test_sessie); echo does this work?; ? Expected result: Output to screen/browser: does this work? Actual result: -- The browser returns a blank page, command line returns Segmentation fault (core dumped). /var/log/messages: kernel: pid 459 (httpd), uid 80: exited on signal 11 Apache's error.log: child pid 458 exit signal Segmentation fault (11) # gdb php GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-marcel-freebsd... (gdb) run test.php Starting program: /usr/local/bin/php test.php Program received signal SIGSEGV, Segmentation fault. 0x080cae9a in _zval_ptr_dtor (zval_ptr=0x282e7928) at /root/dl/php-4.4.6/Zend/zend_execute_API.c:287 287 (*zval_ptr)-refcount--; (gdb) -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#40761 [Asn-Fbk]: header() is wrongly handled, thus causing problems for browsers
ID: 40761 Updated by: [EMAIL PROTECTED] Reported By: c dot kirschnick at gmx dot net -Status: Assigned +Status: Feedback Bug Type: CGI related Operating System: * PHP Version: 4.4.5 Assigned To: mike New Comment: Please tell me your server software and your configure line. Cannot reproduce with 4.4.3 and 4.4-CVS: [EMAIL PROTECTED]:~/build/php-4.4-cgi-http$ cgi '?php header(HTTP/1.1 403 Forbidden);' Status: 403 X-Powered-By: PHP/4.4.7-dev Content-type: text/html As you write HTTP/1.1 200 OK HTTP/1.1 403 Forbidden as seen result, I think your server software exhibits this bug. Previous Comments: [2007-03-08 20:43:33] c dot kirschnick at gmx dot net Description: This bug was sent in before, but marked wrong bogus/won't fix. (See Bug #38369). PHP does not correctly handle calls such as header(Status: ...). In CGI mode it should process such a call as a changing the HTTP response code (consistent with its handling of, e.g., header(Location: ...)). However, at present there is no special handling of the Status: header. That's why sending Status: and then Location: causes a duplicate header: the Location: header is handled as a special case and causes sapi_update_response_code(302) to be called, whereas the Status: header is just added to the list of headers to be sent back to the web server (see bug #33225 incorrectly marked bogus, I think because the reviewer doesn't understand CGI). Note that sending two different Status: headers explicitly with header(Status: ...) doesn't give this error, because the default operation is to *replace* the header, not add a new one. Since PHP should conform to the CGI-norm, this bug should be fixed. Although the IE does not fully stick to this norm, the FF does - which ignores duplicated headers, resulting in different behaviour of both. Reproduce code: --- ? header(HTTP/1.1 403 Forbidden); ? Expected result: An error message created by the browser Actual result: -- IE: correct 403 FF: blank page (no output) The headers: HTTP/1.1 200 OK HTTP/1.1 403 Forbidden -- Edit this bug report at http://bugs.php.net/?id=40761edit=1
#40751 [Fbk-Opn]: Apache segmentation fault
ID: 40751 User updated by: sti-pe2 at online dot no Reported By: sti-pe2 at online dot no -Status: Feedback +Status: Open Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: No, my php.ini says ;open_basedir = Previous Comments: [2007-03-09 10:42:39] [EMAIL PROTECTED] Do you have open_basedir set? [2007-03-09 09:02:42] sti-pe2 at online dot no I installed older versions of PHP, and 4.3.10(!) actually works... All newer versions result in the same error. Are there any known issues regarding sessions when upgrading from 4.3.10 to 4.3.11? Any config in Apache that may be a problem? [2007-03-08 07:37:27] sti-pe2 at online dot no Recompiled without --enable-versioning, but I still get the same error. [2007-03-07 21:57:46] [EMAIL PROTECTED] After 10 thousands requests with ab I still can't see anything except does this work?. --enable-versioning - could you please remove this option? [2007-03-07 21:39:16] sti-pe2 at online dot no Description: When running some of my php-pages, I get segmentation faults in Apache. I think I have narrowed it down to session-handling in php, see reproduce code. Pages not including sessions works fine. I have upgraded both Apache, PHP and MySQL lately, but don't know if this is related to the errors I experience. Systeminfo: FreeBSD 5.3-RELEASE Apache 1.3.37 PHP 4.4.6 ZendOptimizer 3.2.2 (disabled for now) MySQL 4.1.22 register_globals=on Tests with register_globals=off does not make any difference. PHP compile options: ./configure --enable-versioning --enable-memory-limit --with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php --disable-all --with-regex=php --with-apxs=/usr/local/sbin/apxs --disable-ipv6 --prefix=/usr/local Reproduce code: --- ? session_register(test_sessie); echo does this work?; ? Expected result: Output to screen/browser: does this work? Actual result: -- The browser returns a blank page, command line returns Segmentation fault (core dumped). /var/log/messages: kernel: pid 459 (httpd), uid 80: exited on signal 11 Apache's error.log: child pid 458 exit signal Segmentation fault (11) # gdb php GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-marcel-freebsd... (gdb) run test.php Starting program: /usr/local/bin/php test.php Program received signal SIGSEGV, Segmentation fault. 0x080cae9a in _zval_ptr_dtor (zval_ptr=0x282e7928) at /root/dl/php-4.4.6/Zend/zend_execute_API.c:287 287 (*zval_ptr)-refcount--; (gdb) -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#40751 [Opn-Fbk]: Apache segmentation fault
ID: 40751 Updated by: [EMAIL PROTECTED] Reported By: sti-pe2 at online dot no -Status: Open +Status: Feedback Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: [2007-03-09 11:21:45] sti-pe2 at online dot no No, my php.ini says ;open_basedir = [2007-03-09 10:42:39] [EMAIL PROTECTED] Do you have open_basedir set? [2007-03-09 09:02:42] sti-pe2 at online dot no I installed older versions of PHP, and 4.3.10(!) actually works... All newer versions result in the same error. Are there any known issues regarding sessions when upgrading from 4.3.10 to 4.3.11? Any config in Apache that may be a problem? [2007-03-08 07:37:27] sti-pe2 at online dot no Recompiled without --enable-versioning, but I still get the same error. [2007-03-07 21:57:46] [EMAIL PROTECTED] After 10 thousands requests with ab I still can't see anything except does this work?. --enable-versioning - could you please remove this option? 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/40751 -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#40392 [Fbk-Opn]: memory leaks in PHP milter SAPI and proposed fix
ID: 40392 User updated by: tuxracer69 at gmail dot com Reported By: tuxracer69 at gmail dot com -Status: Feedback +Status: Open Bug Type: Unknown/Other Function Operating System: Linux 2.6.17-2-686 PHP Version: 5CVS-2007-02-07 (snap) New Comment: Hi Tony, I put the patch at the URL below: http://atpic.com/bug40392.patch.txt I included the php_getopt.h because the compiler complained about it. Thanks Alex Previous Comments: [2007-03-09 10:33:23] [EMAIL PROTECTED] Please upload the patch somewhere (applying copy/pasted patches is non-trivial). Why did you need to include php_getopt.h header, I wonder? [2007-03-08 13:52:10] tuxracer69 at gmail dot com Hi, Just to follow up on this bug, the patch above has now been running in a production server for a month and the whole setup sendmail+phpmilter was stable. Alex [2007-02-09 08:52:36] tuxracer69 at gmail dot com oops the exit_status was broken, should be: diff -u php_milter.c.dist php_milter.c --- php_milter.c.dist 2007-02-07 10:18:03.0 + +++ php_milter.c2007-02-09 08:48:03.0 + @@ -63,6 +63,8 @@ #include libmilter/mfapi.h +#include php_getopt.h + #define OPTSTRING ac:d:Def:hnp:vVz:? #define MG(v) TSRMG(milter_globals_id, zend_milter_globals *, v) @@ -202,7 +204,7 @@ call_user_function(CG(function_table), NULL, function_name, retval, 1, param TSRMLS_CC); MG(state) = MLFI_NONE; - + zval_ptr_dtor(param); if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); } @@ -235,8 +237,8 @@ call_user_function(CG(function_table), NULL, function_name, retval, 1, param TSRMLS_CC); MG(state) = MLFI_NONE; + zval_ptr_dtor(param); - FREE_ZVAL(param[0]); if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -275,8 +277,8 @@ call_user_function(CG(function_table), NULL, function_name, retval, 1, param TSRMLS_CC); MG(state) = MLFI_NONE; + zval_ptr_dtor(param); - FREE_ZVAL(param[0]); if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -316,7 +318,8 @@ MG(state) = MLFI_NONE; - FREE_ZVAL(param[0]); + zval_ptr_dtor(param); + if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -354,8 +357,9 @@ MG(state) = MLFI_NONE; - FREE_ZVAL(param[0]); - FREE_ZVAL(param[1]); + zval_ptr_dtor(param[0]); + zval_ptr_dtor(param[1]); + if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -408,7 +412,7 @@ INIT_PZVAL(param[0]); ZVAL_STRING(function_name, milter_body, 0); - ZVAL_STRINGL(param[0], bodyp, len, 1); + ZVAL_STRINGL(param[0], (char*)bodyp, len, 1); /*alex*/ /* set the milter context for possible use in API functions */ MG(ctx) = ctx; @@ -418,7 +422,8 @@ MG(state) = MLFI_NONE; - FREE_ZVAL(param[0]); + zval_ptr_dtor(param); + if (Z_TYPE(retval) == IS_LONG) { return Z_LVAL(retval); @@ -548,7 +553,7 @@ if (MG(state) != MLFI_INIT) { php_error(E_WARNING, NOT_INIT, get_active_function_name(TSRMLS_C)); } else if (zend_parse_parameters(1 TSRMLS_CC, l, flags) == SUCCESS) { - flags = flags SMFIF_ADDHDRS|SMFIF_CHGHDRS|SMFIF_CHGBODY|SMFIF_ADDRCPT|SMFIF_DELRCPT; + flags = flags (SMFIF_ADDHDRS|SMFIF_CHGHDRS|SMFIF_CHGBODY|SMFIF_ADDRCPT|SMFIF_DELRCPT); smfilter.xxfi_flags = flags; } } @@ -703,7 +708,7 @@ if (MG(state) != MLFI_EOM) { php_error(E_WARNING, NOT_EOM, get_active_function_name(TSRMLS_C)); } else if (zend_parse_parameters(1 TSRMLS_CC, s, body, len) == SUCCESS) { - if (smfi_replacebody(MG(ctx), body, len) == MI_SUCCESS) { + if (smfi_replacebody(MG(ctx), (u_char*)body, len) == MI_SUCCESS) { RETURN_TRUE; } } @@ -732,6 +737,8 @@ MG(state) = MLFI_NONE; MG(initialized) = 0; +return SUCCESS; + } /* }}} */ @@ -920,9 +927,7 @@ /* temporary locals */ int orig_optind=ap_php_optind; char *orig_optarg=ap_php_optarg; - char *arg_free=NULL, **arg_excp=arg_free; int interactive=0; - char *exec_direct=NULL; char *param_error=NULL; /* end of temporary locals */ @@ -1099,7 +1104,7 @@ openlog(php-milter, LOG_PID, LOG_MAIL); - if (exit_status = mlfi_init()) { + if ((exit_status = mlfi_init())) { syslog(1, mlfi_init failed.);
#40751 [Fbk-Opn]: Apache segmentation fault
ID: 40751 User updated by: sti-pe2 at online dot no Reported By: sti-pe2 at online dot no -Status: Feedback +Status: Open Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: Installed latest snapshot, but I still get the same error. Previous Comments: [2007-03-09 11:34:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2007-03-09 11:21:45] sti-pe2 at online dot no No, my php.ini says ;open_basedir = [2007-03-09 10:42:39] [EMAIL PROTECTED] Do you have open_basedir set? [2007-03-09 09:02:42] sti-pe2 at online dot no I installed older versions of PHP, and 4.3.10(!) actually works... All newer versions result in the same error. Are there any known issues regarding sessions when upgrading from 4.3.10 to 4.3.11? Any config in Apache that may be a problem? [2007-03-08 07:37:27] sti-pe2 at online dot no Recompiled without --enable-versioning, but I still get the same error. 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/40751 -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#40765 [NEW]: calling backtrace inside nested static class functions causes segfault
From: ndroege at bimp dot de Operating system: linux debian PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug description: calling backtrace inside nested static class functions causes segfault Description: Testet on 5.2.0 and 5.2.1 I was able to reproduce segfaults in this situation on the commandline and with apache! Reproduce code: --- ?php class CrashHelper { function call2($tpl_var, $value = null) {} function call1($value = null) {} } class Crash { static function outerCall($param) { $ch = new CrashHelper(); # $test = Crash::innerCall($param); # $ch-call2('test', $test); // don't crash # $ch-call1(Crash::innerCall($param)); // don't crash $ch-call2('test', Crash::innerCall($param)); // crash } static function innerCall($param) { $backtrace = debug_backtrace(); echo 'pre'.var_export($backtrace, true).'/pre'; } } function doCrash($param) { # $ch = new CrashHelper(); # $ch-call2('test', Crash::innerCall($param)); // don't crash Crash::outerCall($param); } doCrash($_GET['id']); ? Expected result: backtrace, no crash Actual result: -- Speicherzugriffsfehler -- Edit bug report at http://bugs.php.net/?id=40765edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40765r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40765r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40765r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40765r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40765r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40765r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40765r=needscript Try newer version:http://bugs.php.net/fix.php?id=40765r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40765r=support Expected behavior:http://bugs.php.net/fix.php?id=40765r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40765r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40765r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40765r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40765r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40765r=dst IIS Stability:http://bugs.php.net/fix.php?id=40765r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40765r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40765r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40765r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40765r=mysqlcfg
#40751 [Opn-Fbk]: Apache segmentation fault
ID: 40751 Updated by: [EMAIL PROTECTED] Reported By: sti-pe2 at online dot no -Status: Open +Status: Feedback Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: I'm still unable to reproduce it. Previous Comments: [2007-03-09 11:56:55] sti-pe2 at online dot no Installed latest snapshot, but I still get the same error. [2007-03-09 11:34:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2007-03-09 11:21:45] sti-pe2 at online dot no No, my php.ini says ;open_basedir = [2007-03-09 10:42:39] [EMAIL PROTECTED] Do you have open_basedir set? [2007-03-09 09:02:42] sti-pe2 at online dot no I installed older versions of PHP, and 4.3.10(!) actually works... All newer versions result in the same error. Are there any known issues regarding sessions when upgrading from 4.3.10 to 4.3.11? Any config in Apache that may be a problem? 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/40751 -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#40765 [Opn]: calling backtrace inside nested static class functions causes segfault
ID: 40765 User updated by: nd0 at gmx dot de -Reported By: ndroege at bimp dot de +Reported By: nd0 at gmx dot de Status: Open Bug Type: Reproducible crash Operating System: linux debian PHP Version: 5.2.1 New Comment: new email Previous Comments: [2007-03-09 12:20:28] nd0 at gmx dot de Description: Testet on 5.2.0 and 5.2.1 I was able to reproduce segfaults in this situation on the commandline and with apache! Reproduce code: --- ?php class CrashHelper { function call2($tpl_var, $value = null) {} function call1($value = null) {} } class Crash { static function outerCall($param) { $ch = new CrashHelper(); # $test = Crash::innerCall($param); # $ch-call2('test', $test); // don't crash # $ch-call1(Crash::innerCall($param)); // don't crash $ch-call2('test', Crash::innerCall($param)); // crash } static function innerCall($param) { $backtrace = debug_backtrace(); echo 'pre'.var_export($backtrace, true).'/pre'; } } function doCrash($param) { # $ch = new CrashHelper(); # $ch-call2('test', Crash::innerCall($param)); // don't crash Crash::outerCall($param); } doCrash($_GET['id']); ? Expected result: backtrace, no crash Actual result: -- Speicherzugriffsfehler -- Edit this bug report at http://bugs.php.net/?id=40765edit=1
#40765 [Opn-Fbk]: calling backtrace inside nested static class functions causes segfault
ID: 40765 Updated by: [EMAIL PROTECTED] Reported By: nd0 at gmx dot de -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: linux debian PHP Version: 5.2.1 New Comment: Cannot reproduce. Please make sure you've disabled all zend_extensions like Zend Optimizer, APC, Xdebug, ionCube etc. Previous Comments: [2007-03-09 12:29:45] nd0 at gmx dot de new email [2007-03-09 12:20:28] nd0 at gmx dot de Description: Testet on 5.2.0 and 5.2.1 I was able to reproduce segfaults in this situation on the commandline and with apache! Reproduce code: --- ?php class CrashHelper { function call2($tpl_var, $value = null) {} function call1($value = null) {} } class Crash { static function outerCall($param) { $ch = new CrashHelper(); # $test = Crash::innerCall($param); # $ch-call2('test', $test); // don't crash # $ch-call1(Crash::innerCall($param)); // don't crash $ch-call2('test', Crash::innerCall($param)); // crash } static function innerCall($param) { $backtrace = debug_backtrace(); echo 'pre'.var_export($backtrace, true).'/pre'; } } function doCrash($param) { # $ch = new CrashHelper(); # $ch-call2('test', Crash::innerCall($param)); // don't crash Crash::outerCall($param); } doCrash($_GET['id']); ? Expected result: backtrace, no crash Actual result: -- Speicherzugriffsfehler -- Edit this bug report at http://bugs.php.net/?id=40765edit=1
#40757 [Bgs-Opn]: get_object_vars get nothing in child class
ID: 40757 User updated by: nrspark at 163 dot com Reported By: nrspark at 163 dot com -Status: Bogus +Status: Open Bug Type: Class/Object related Operating System: Windows XP PHP Version: 5.2.1 New Comment: but it works expect if the method change to this function getFields($obj){ return array('p1'=$obj-p1); } and it work expect in java using reflection think about: Liskov Substitution Principle i thing this is the implemention bug of get_object_vars Previous Comments: [2007-03-09 10:14:42] [EMAIL PROTECTED] I would be very surprised to be able to access private properties of Base in the context of Child. What you see is expected. [2007-03-08 12:05:12] nrspark at 163 dot com Description: method to get the private properties of the base object in base class object, everything ok in child class use inherit method, get empty Reproduce code: --- class Base { private $p1='sadf'; function getFields($obj){ return get_object_vars($obj); } } class Child extends Base { } $base=new Base(); print_r($base-getFields(new Base())); $child=new Child(); print_r($child-getFields(new Base())); Expected result: Array ( [p1] = sadf )Array ( [p1] = sadf ) Actual result: -- Array ( [p1] = sadf ) Array ( ) -- Edit this bug report at http://bugs.php.net/?id=40757edit=1
#39858 [Com]: Lost connection to MySQL server during query by a repeated call stored proced
ID: 39858 Comment by: mike at we11er dot co dot uk Reported By: develar at gmail dot com Status: Assigned Bug Type: PDO related Operating System: Windows XP SP2 PHP Version: 5.2.0 Assigned To: wez New Comment: Hi everyone. We have a fixed php_pdo_mysql.dll in our svn repos - but the guy that compiled it all hasn't got the source together because it involved a massive overhaul of the php and extension code to support the latest mysql libs. I know your first thoughts will be There's no way I'm going to use a .dll from a *hackthissite*!, that's fine... but the guy that compiled it can be trusted, and I've been using it on my windows machine for a week or two now. http://source.hackthissite.org/wsvn/HTSv4/trunk/PDO/php_pdo_mysql.dll I'll see if we can get some sort of source code version together. Until then, use this at your own risk. Previous Comments: [2007-02-27 16:29:58] james dot cordon at btinternet dot com What I have stated previously works, but only with the PHP vers. of libmysql.dll {error lost connection} mysql vers. {error unbuffered queries} just keeps making new connections until it is maxed out, have found no solution to this. I am using the very latest vers of everything. [2007-02-23 12:09:20] james dot cordon at btinternet dot com previous doesn't address stored procedure prob (from what i've read this is a win prob only). my revised approach: Essentialy after you use a stored procedure call, burn another query to force an exception. ### private $connect_a=array(); private $connected=0; public function __construct($dsn=NULL, $user=NULL, $pass=NULL){ if(is_array($dsn)){ $this-connect_a['DSN']=$dsn[0]; $this-connect_a['U']=$dsn[1]; $this-connect_a['P']=$dsn[2]; } else { $this-connect_a['DSN']=$dsn; $this-connect_a['U']=$user; $this-connect_a['P']=$pass; } }// public function query($q){ if($this-connected==0){ $this-connect(); } return parent::query($q); }// public function dropConnection($stmt){ $stmt-closeCursor(); $this-connected=0; }## public function callStoredProcedure($stmt){ $resultset; try{ #multi array while ($row= $stmt-fetch()) { $resultset[]=$row; echo 'br /'; var_dump($row); echo 'br /'; } #burn if(stripos($_SERVER['SERVER_SOFTWARE'], 'win') ){ $stmt=$this-query(select 1+1); } }catch(PDOException $e){ if($e-getCode()=='HY000' AND strpos ($e-getMessage(), 'Lost connection' )){ print -!!!- Error!: Caught 'Lost connection error, dropConnection() -!!!-br /; $this-dropConnection($stmt); } else { throw $e; } } return $resultset; }// public function connect(){ #if($this-connected==1) return true; try{ parent::__construct($this-connect_a['DSN'], $this-connect_a['U'], $this-connect_a['P']); } catch (Exception $e) { throw($e); } $this-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this-connected=1; }// #EXAMPLE #just to prove obj is same one $pdodl_1-temp_id='AA'; $i=100; do{ echo 'LOOP NUM:'.$i.'br /'; echo 'br /PDODL OBJ: '; var_dump($pdodl_1); echo 'br /br /'; $stmt=$pdodl_1-query(call testMany()); $stmt-setFetchMode(PDO::FETCH_ASSOC); $rset=$pdodl_1-callStoredProcedure($stmt); $i--; } while($i0); This is all from another project, so may need some tinkering. [2007-02-23 11:29:16] martin dot schmitz at uni-bielefeld dot de I've got a dirty solution for your problem (works under linux, not tested on windows) if i do: $dbh-setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $dbh-setAttribute( PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); $datasets = $dbh-query( 'SELECT * FROM table_name_1 WHERE id=5); $datasets-execute(); $result_1 = $datasets-fetch( PDO::FETCH_ASSOC); $datasets = $dbh-query( 'SELECT * FROM table_name_2 WHERE id=7); $datasets-execute(); $address = $datasets-fetch( PDO::FETCH_ASSOC); it gets the same unbuffered error. But if I do a fetch twice on the first result and store it to a dummy array, the second query works: $datasets = $dbh-query( 'SELECT * FROM table_name_1 WHERE id=5); $datasets-execute(); $result_1 = $datasets-fetch( PDO::FETCH_ASSOC); // test, remove if bug is fixed $dummy = $datasets-fetch( PDO::FETCH_ASSOC); $datasets = $dbh-query( 'SELECT * FROM table_name_2 WHERE id=7); $datasets-execute(); $address = $datasets-fetch( PDO::FETCH_ASSOC); I think the cursor-pointer does not work correctly?? You can also do a fetchAll(), but then your result looks
#40758 [Asn-Fbk]: Test fcgi_is_fastcgi() is wrong on windows
ID: 40758 Updated by: [EMAIL PROTECTED] Reported By: jostb2345 at yahoo dot com -Status: Assigned +Status: Feedback Bug Type: CGI related Operating System: Windows (all versions) PHP Version: 5.2.1 Assigned To: dmitry New Comment: I don't see any difference with old code. See OS_IsFcgi() and OS_LibInit(). Also I don't understand for what reason some program passes stdout to PHP. Previous Comments: [2007-03-08 13:45:33] jostb2345 at yahoo dot com Description: On windows, php 5.2.0 and above the following code (written in pseudo-code) doesn't work anymore: socket = socket(AF_INET, ...); bind(socket, ...); listen(socket, ...); outputHandle=GetStdHandle(...); inputHandle=socket; CreateProcess(...,php-cgi.exe, ..., IOHandles); The problem is that is_fastcgi is only set if the OutputHandle and ErrorHandle are invalid. If both are invalid, InputHandle is assumed to be a named pipe. The Unix version still uses the old (correct) code. To correct this problem either the old FCGI_isfcgi() should be used or the test must be dublicated. See procedures: int fcgi_init(void); int fcgi_is_fastcgi(void); Regards, Jost Boekemeier Reproduce code: --- See above. If necessary I can provide a test program. -- Edit this bug report at http://bugs.php.net/?id=40758edit=1
#40765 [Fbk-Opn]: calling backtrace inside nested static class functions causes segfault
ID: 40765 Updated by: [EMAIL PROTECTED] Reported By: nd0 at gmx dot de -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: linux debian PHP Version: 5.2.1 New Comment: Do not file bugs when you have Zend extensions (zend_extension=) loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache, APC, Xdebug and ionCube loader. These extensions often modify engine behavior which is not related to PHP itself. Previous Comments: [2007-03-09 12:36:21] [EMAIL PROTECTED] Cannot reproduce. Please make sure you've disabled all zend_extensions like Zend Optimizer, APC, Xdebug, ionCube etc. [2007-03-09 12:29:45] nd0 at gmx dot de new email [2007-03-09 12:20:28] nd0 at gmx dot de Description: Testet on 5.2.0 and 5.2.1 I was able to reproduce segfaults in this situation on the commandline and with apache! Reproduce code: --- ?php class CrashHelper { function call2($tpl_var, $value = null) {} function call1($value = null) {} } class Crash { static function outerCall($param) { $ch = new CrashHelper(); # $test = Crash::innerCall($param); # $ch-call2('test', $test); // don't crash # $ch-call1(Crash::innerCall($param)); // don't crash $ch-call2('test', Crash::innerCall($param)); // crash } static function innerCall($param) { $backtrace = debug_backtrace(); echo 'pre'.var_export($backtrace, true).'/pre'; } } function doCrash($param) { # $ch = new CrashHelper(); # $ch-call2('test', Crash::innerCall($param)); // don't crash Crash::outerCall($param); } doCrash($_GET['id']); ? Expected result: backtrace, no crash Actual result: -- Speicherzugriffsfehler -- Edit this bug report at http://bugs.php.net/?id=40765edit=1
#40765 [Opn-Bgs]: calling backtrace inside nested static class functions causes segfault
ID: 40765 Updated by: [EMAIL PROTECTED] Reported By: nd0 at gmx dot de -Status: Open +Status: Bogus Bug Type: Reproducible crash Operating System: linux debian PHP Version: 5.2.1 New Comment: . Previous Comments: [2007-03-09 13:45:11] [EMAIL PROTECTED] Do not file bugs when you have Zend extensions (zend_extension=) loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache, APC, Xdebug and ionCube loader. These extensions often modify engine behavior which is not related to PHP itself. [2007-03-09 12:36:21] [EMAIL PROTECTED] Cannot reproduce. Please make sure you've disabled all zend_extensions like Zend Optimizer, APC, Xdebug, ionCube etc. [2007-03-09 12:29:45] nd0 at gmx dot de new email [2007-03-09 12:20:28] nd0 at gmx dot de Description: Testet on 5.2.0 and 5.2.1 I was able to reproduce segfaults in this situation on the commandline and with apache! Reproduce code: --- ?php class CrashHelper { function call2($tpl_var, $value = null) {} function call1($value = null) {} } class Crash { static function outerCall($param) { $ch = new CrashHelper(); # $test = Crash::innerCall($param); # $ch-call2('test', $test); // don't crash # $ch-call1(Crash::innerCall($param)); // don't crash $ch-call2('test', Crash::innerCall($param)); // crash } static function innerCall($param) { $backtrace = debug_backtrace(); echo 'pre'.var_export($backtrace, true).'/pre'; } } function doCrash($param) { # $ch = new CrashHelper(); # $ch-call2('test', Crash::innerCall($param)); // don't crash Crash::outerCall($param); } doCrash($_GET['id']); ? Expected result: backtrace, no crash Actual result: -- Speicherzugriffsfehler -- Edit this bug report at http://bugs.php.net/?id=40765edit=1
#40761 [Fbk-Csd]: header() is wrongly handled, thus causing problems for browsers
ID: 40761 User updated by: c dot kirschnick at gmx dot net Reported By: c dot kirschnick at gmx dot net -Status: Feedback +Status: Closed Bug Type: CGI related Operating System: * PHP Version: 4.4.5 Assigned To: mike New Comment: Hum, tried it again and again - came to the conclusion that it was a browser issue. Sorry, and keep up the good work. Previous Comments: [2007-03-09 11:14:34] [EMAIL PROTECTED] Please tell me your server software and your configure line. Cannot reproduce with 4.4.3 and 4.4-CVS: [EMAIL PROTECTED]:~/build/php-4.4-cgi-http$ cgi '?php header(HTTP/1.1 403 Forbidden);' Status: 403 X-Powered-By: PHP/4.4.7-dev Content-type: text/html As you write HTTP/1.1 200 OK HTTP/1.1 403 Forbidden as seen result, I think your server software exhibits this bug. [2007-03-08 20:43:33] c dot kirschnick at gmx dot net Description: This bug was sent in before, but marked wrong bogus/won't fix. (See Bug #38369). PHP does not correctly handle calls such as header(Status: ...). In CGI mode it should process such a call as a changing the HTTP response code (consistent with its handling of, e.g., header(Location: ...)). However, at present there is no special handling of the Status: header. That's why sending Status: and then Location: causes a duplicate header: the Location: header is handled as a special case and causes sapi_update_response_code(302) to be called, whereas the Status: header is just added to the list of headers to be sent back to the web server (see bug #33225 incorrectly marked bogus, I think because the reviewer doesn't understand CGI). Note that sending two different Status: headers explicitly with header(Status: ...) doesn't give this error, because the default operation is to *replace* the header, not add a new one. Since PHP should conform to the CGI-norm, this bug should be fixed. Although the IE does not fully stick to this norm, the FF does - which ignores duplicated headers, resulting in different behaviour of both. Reproduce code: --- ? header(HTTP/1.1 403 Forbidden); ? Expected result: An error message created by the browser Actual result: -- IE: correct 403 FF: blank page (no output) The headers: HTTP/1.1 200 OK HTTP/1.1 403 Forbidden -- Edit this bug report at http://bugs.php.net/?id=40761edit=1
#40761 [Csd-Bgs]: header() is wrongly handled, thus causing problems for browsers
ID: 40761 Updated by: [EMAIL PROTECTED] Reported By: c dot kirschnick at gmx dot net -Status: Closed +Status: Bogus Bug Type: CGI related Operating System: * PHP Version: 4.4.5 Assigned To: mike Previous Comments: [2007-03-09 14:24:56] c dot kirschnick at gmx dot net Hum, tried it again and again - came to the conclusion that it was a browser issue. Sorry, and keep up the good work. [2007-03-09 11:14:34] [EMAIL PROTECTED] Please tell me your server software and your configure line. Cannot reproduce with 4.4.3 and 4.4-CVS: [EMAIL PROTECTED]:~/build/php-4.4-cgi-http$ cgi '?php header(HTTP/1.1 403 Forbidden);' Status: 403 X-Powered-By: PHP/4.4.7-dev Content-type: text/html As you write HTTP/1.1 200 OK HTTP/1.1 403 Forbidden as seen result, I think your server software exhibits this bug. [2007-03-08 20:43:33] c dot kirschnick at gmx dot net Description: This bug was sent in before, but marked wrong bogus/won't fix. (See Bug #38369). PHP does not correctly handle calls such as header(Status: ...). In CGI mode it should process such a call as a changing the HTTP response code (consistent with its handling of, e.g., header(Location: ...)). However, at present there is no special handling of the Status: header. That's why sending Status: and then Location: causes a duplicate header: the Location: header is handled as a special case and causes sapi_update_response_code(302) to be called, whereas the Status: header is just added to the list of headers to be sent back to the web server (see bug #33225 incorrectly marked bogus, I think because the reviewer doesn't understand CGI). Note that sending two different Status: headers explicitly with header(Status: ...) doesn't give this error, because the default operation is to *replace* the header, not add a new one. Since PHP should conform to the CGI-norm, this bug should be fixed. Although the IE does not fully stick to this norm, the FF does - which ignores duplicated headers, resulting in different behaviour of both. Reproduce code: --- ? header(HTTP/1.1 403 Forbidden); ? Expected result: An error message created by the browser Actual result: -- IE: correct 403 FF: blank page (no output) The headers: HTTP/1.1 200 OK HTTP/1.1 403 Forbidden -- Edit this bug report at http://bugs.php.net/?id=40761edit=1
#40751 [Com]: Apache segmentation fault
ID: 40751 Comment by: scottmacvicar at ntlworld dot com Reported By: sti-pe2 at online dot no Status: Feedback Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: What other extensions do you load in php.ini an what order are they loaded? If you disable all apart from session do you still get the crash? Previous Comments: [2007-03-09 12:22:04] [EMAIL PROTECTED] I'm still unable to reproduce it. [2007-03-09 11:56:55] sti-pe2 at online dot no Installed latest snapshot, but I still get the same error. [2007-03-09 11:34:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2007-03-09 11:21:45] sti-pe2 at online dot no No, my php.ini says ;open_basedir = [2007-03-09 10:42:39] [EMAIL PROTECTED] Do you have open_basedir set? 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/40751 -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#40425 [Fbk-Opn]: php_getuid() always return 1.
ID: 40425 User updated by: priappub at yahoo dot fr Reported By: priappub at yahoo dot fr -Status: Feedback +Status: Open Bug Type: Safe Mode/open_basedir Operating System: Solaris 10 PHP Version: 5.2.1 New Comment: This is the httpd -V from apache provided by SUN. Previous Comments: [2007-03-09 10:40:27] [EMAIL PROTECTED] And the same for Sun apache, please. [2007-03-08 22:32:38] priappub at yahoo dot fr For the difference, I don't know... I have this: [EMAIL PROTECTED] ~]# /usr/apache2/bin/httpd -V Server version: Apache/2.0.58 Server built: Sep 5 2006 07:46:49 Server's Module Magic Number: 20020903:12 Server loaded: APR 0.9.12, APR-UTIL 0.9.12 Compiled using: APR 0.9.12, APR-UTIL 0.9.12 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/apache2 -D SUEXEC_BIN=/usr/apache2/bin/suexec -D DEFAULT_PIDLOG=/var/run/apache2/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=/var/run/apache2/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=/etc/apache2/mime.types -D SERVER_CONFIG_FILE=/etc/apache2/httpd.conf [2007-03-07 10:19:42] [EMAIL PROTECTED] What's the difference between Sun Apache and the one compiled from sources? [2007-03-07 10:13:40] priappub at yahoo dot fr Same problem with the snapshot. But it seems that the problem is the apache provided by SUN because if I compile apache from the source, safe_mode is OK. [2007-03-06 12:07:54] [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/40425 -- Edit this bug report at http://bugs.php.net/?id=40425edit=1
#40767 [NEW]: phpini
From: n dot vandervlist at xs4all dot nl Operating system: Cent OS 4.2 PHP version: 5.2.1 PHP Bug Type: *General Issues Bug description: phpini Description: Hello, I have changed succesfully my php version to php5. Evrything works great but there is a problem. When i change the php.ini file and after the changes restart apache. The changes i made doesn't have any affect. I can't see the changes that i have made. I have looked and changed al the php.ini files i can see. Please help me out. Thanks allready! -- Edit bug report at http://bugs.php.net/?id=40767edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40767r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40767r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40767r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40767r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40767r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40767r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40767r=needscript Try newer version:http://bugs.php.net/fix.php?id=40767r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40767r=support Expected behavior:http://bugs.php.net/fix.php?id=40767r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40767r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40767r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40767r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40767r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40767r=dst IIS Stability:http://bugs.php.net/fix.php?id=40767r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40767r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40767r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40767r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40767r=mysqlcfg
#40758 [Com]: Test fcgi_is_fastcgi() is wrong on windows
ID: 40758 Comment by: jostb2345 at yahoo dot de Reported By: jostb2345 at yahoo dot com Status: Feedback Bug Type: CGI related Operating System: Windows (all versions) PHP Version: 5.2.1 Assigned To: dmitry New Comment: # include windows.h # include winsock2.h # define close closesocket term() { printf(err:%d, (GetLastError())); exit(1); } struct sockaddr_in saddr; main() { SOCKET listen_handle; SOCKADDR_IN saServer; char *cmd = php-cgi.exe; STARTUPINFO su_info; SECURITY_ATTRIBUTES sa = { 0 }; WORD wVersionRequested = MAKEWORD(1,1); WSADATA wsaData; int n = WSAStartup(wVersionRequested, wsaData); if (wsaData.wVersion != wVersionRequested) term(); listen_handle = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); saServer.sin_family = AF_INET; saServer.sin_addr.s_addr = INADDR_ANY; saServer.sin_port = htons(9667); n = bind(listen_handle, (LPSOCKADDR)saServer, sizeof(struct sockaddr)); if (n == SOCKET_ERROR) term(); n = listen(listen_handle, 20); if (n == SOCKET_ERROR) term(); ZeroMemory(su_info, sizeof(STARTUPINFO)); su_info.cb = sizeof(STARTUPINFO); su_info.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; su_info.wShowWindow = SW_HIDE; su_info.hStdInput = listen_handle; su_info.hStdError = INVALID_HANDLE_VALUE; su_info.hStdOutput = INVALID_HANDLE_VALUE; SetHandleInformation(su_info.hStdInput, HANDLE_FLAG_INHERIT, TRUE); PROCESS_INFORMATION p; if(CreateProcess(NULL, cmd, NULL, NULL, 1, 0, NULL, NULL, su_info, p)) { CloseHandle(p.hThread); closesocket(listen_handle); } else { term(); } if( WaitForSingleObject(p.hProcess, INFINITE) == WAIT_FAILED ){ term(); } WSACleanup(); } Previous Comments: [2007-03-09 13:36:15] [EMAIL PROTECTED] I don't see any difference with old code. See OS_IsFcgi() and OS_LibInit(). Also I don't understand for what reason some program passes stdout to PHP. [2007-03-08 13:45:33] jostb2345 at yahoo dot com Description: On windows, php 5.2.0 and above the following code (written in pseudo-code) doesn't work anymore: socket = socket(AF_INET, ...); bind(socket, ...); listen(socket, ...); outputHandle=GetStdHandle(...); inputHandle=socket; CreateProcess(...,php-cgi.exe, ..., IOHandles); The problem is that is_fastcgi is only set if the OutputHandle and ErrorHandle are invalid. If both are invalid, InputHandle is assumed to be a named pipe. The Unix version still uses the old (correct) code. To correct this problem either the old FCGI_isfcgi() should be used or the test must be dublicated. See procedures: int fcgi_init(void); int fcgi_is_fastcgi(void); Regards, Jost Boekemeier Reproduce code: --- See above. If necessary I can provide a test program. -- Edit this bug report at http://bugs.php.net/?id=40758edit=1
#40758 [Fbk-Opn]: Test fcgi_is_fastcgi() is wrong on windows
ID: 40758 User updated by: jostb2345 at yahoo dot com Reported By: jostb2345 at yahoo dot com -Status: Feedback +Status: Open Bug Type: CGI related Operating System: Windows (all versions) PHP Version: 5.2.1 Assigned To: dmitry New Comment: I don't understand for what reason some program passes stdout to PHP Because I thought you need to distinguish sockets from named pipes. I have attached code which crashes php since 5.2.0. Regards, Jost Boekemeier Previous Comments: [2007-03-09 17:01:01] jostb2345 at yahoo dot de # include windows.h # include winsock2.h # define close closesocket term() { printf(err:%d, (GetLastError())); exit(1); } struct sockaddr_in saddr; main() { SOCKET listen_handle; SOCKADDR_IN saServer; char *cmd = php-cgi.exe; STARTUPINFO su_info; SECURITY_ATTRIBUTES sa = { 0 }; WORD wVersionRequested = MAKEWORD(1,1); WSADATA wsaData; int n = WSAStartup(wVersionRequested, wsaData); if (wsaData.wVersion != wVersionRequested) term(); listen_handle = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); saServer.sin_family = AF_INET; saServer.sin_addr.s_addr = INADDR_ANY; saServer.sin_port = htons(9667); n = bind(listen_handle, (LPSOCKADDR)saServer, sizeof(struct sockaddr)); if (n == SOCKET_ERROR) term(); n = listen(listen_handle, 20); if (n == SOCKET_ERROR) term(); ZeroMemory(su_info, sizeof(STARTUPINFO)); su_info.cb = sizeof(STARTUPINFO); su_info.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; su_info.wShowWindow = SW_HIDE; su_info.hStdInput = listen_handle; su_info.hStdError = INVALID_HANDLE_VALUE; su_info.hStdOutput = INVALID_HANDLE_VALUE; SetHandleInformation(su_info.hStdInput, HANDLE_FLAG_INHERIT, TRUE); PROCESS_INFORMATION p; if(CreateProcess(NULL, cmd, NULL, NULL, 1, 0, NULL, NULL, su_info, p)) { CloseHandle(p.hThread); closesocket(listen_handle); } else { term(); } if( WaitForSingleObject(p.hProcess, INFINITE) == WAIT_FAILED ){ term(); } WSACleanup(); } [2007-03-09 13:36:15] [EMAIL PROTECTED] I don't see any difference with old code. See OS_IsFcgi() and OS_LibInit(). Also I don't understand for what reason some program passes stdout to PHP. [2007-03-08 13:45:33] jostb2345 at yahoo dot com Description: On windows, php 5.2.0 and above the following code (written in pseudo-code) doesn't work anymore: socket = socket(AF_INET, ...); bind(socket, ...); listen(socket, ...); outputHandle=GetStdHandle(...); inputHandle=socket; CreateProcess(...,php-cgi.exe, ..., IOHandles); The problem is that is_fastcgi is only set if the OutputHandle and ErrorHandle are invalid. If both are invalid, InputHandle is assumed to be a named pipe. The Unix version still uses the old (correct) code. To correct this problem either the old FCGI_isfcgi() should be used or the test must be dublicated. See procedures: int fcgi_init(void); int fcgi_is_fastcgi(void); Regards, Jost Boekemeier Reproduce code: --- See above. If necessary I can provide a test program. -- Edit this bug report at http://bugs.php.net/?id=40758edit=1
#40767 [Opn-Bgs]: phpini
ID: 40767 Updated by: [EMAIL PROTECTED] Reported By: n dot vandervlist at xs4all dot nl -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Cent OS 4.2 PHP Version: 5.2.1 New Comment: Check the value of the PHP configuration (php.ini) path in the output of phpinfo() to see which php.ini file is being used. Previous Comments: [2007-03-09 16:22:20] n dot vandervlist at xs4all dot nl Description: Hello, I have changed succesfully my php version to php5. Evrything works great but there is a problem. When i change the php.ini file and after the changes restart apache. The changes i made doesn't have any affect. I can't see the changes that i have made. I have looked and changed al the php.ini files i can see. Please help me out. Thanks allready! -- Edit this bug report at http://bugs.php.net/?id=40767edit=1
#40768 [NEW]: nested foreach break -- infinite loop - serious
From: rave235 at gmail dot com Operating system: winxp PHP version: 5.2.1 PHP Bug Type: Scripting Engine problem Bug description: nested foreach break -- infinite loop - serious Description: i use just build i downloaded from site (5.2.1) no exts, no optimizers. it seem the $a,$b keep same internal pointer, this is quite serious error cos $b=$a should create separate array copy and it does but without the inner pointer. if you replace $b=$a with $b=array(1,2,3); it works as expected this was reported and ignored by someone on solaris before as well-- #40608 Reproduce code: --- $a=array(1,2,3); $b=$a; foreach($a as $A) { foreach($b as $B) { echo $A,$B\n; break; } } Expected result: 1,1 2,1 3,1 Actual result: -- 1,1 2,1 3,1 2,1 3,1 2,1 3,1 --infinite- -- Edit bug report at http://bugs.php.net/?id=40768edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40768r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40768r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40768r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40768r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40768r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40768r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40768r=needscript Try newer version:http://bugs.php.net/fix.php?id=40768r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40768r=support Expected behavior:http://bugs.php.net/fix.php?id=40768r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40768r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40768r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40768r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40768r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40768r=dst IIS Stability:http://bugs.php.net/fix.php?id=40768r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40768r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40768r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40768r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40768r=mysqlcfg
#40768 [Opn]: nested foreach break -- infinite loop - serious
ID: 40768 User updated by: abc at def dot ghi -Reported By: rave235 at gmail dot com +Reported By: abc at def dot ghi Status: Open Bug Type: Scripting Engine problem Operating System: winxp PHP Version: 5.2.1 New Comment: wonder if someone can check this on linux build if its win issue. Previous Comments: [2007-03-09 18:13:08] abc at def dot ghi Description: i use just build i downloaded from site (5.2.1) no exts, no optimizers. it seem the $a,$b keep same internal pointer, this is quite serious error cos $b=$a should create separate array copy and it does but without the inner pointer. if you replace $b=$a with $b=array(1,2,3); it works as expected this was reported and ignored by someone on solaris before as well-- #40608 Reproduce code: --- $a=array(1,2,3); $b=$a; foreach($a as $A) { foreach($b as $B) { echo $A,$B\n; break; } } Expected result: 1,1 2,1 3,1 Actual result: -- 1,1 2,1 3,1 2,1 3,1 2,1 3,1 --infinite- -- Edit this bug report at http://bugs.php.net/?id=40768edit=1
#40768 [Opn-Csd]: nested foreach break -- infinite loop - serious
ID: 40768 User updated by: abc at def dot ghi Reported By: abc at def dot ghi -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: winxp PHP Version: 5.2.1 New Comment: me again, i just tried latest snapshot and it works fine there so i guess new snapshot should be released as i walked around some other strange things in that current 5.2.1. Previous Comments: [2007-03-09 18:20:01] abc at def dot ghi wonder if someone can check this on linux build if its win issue. [2007-03-09 18:13:08] abc at def dot ghi Description: i use just build i downloaded from site (5.2.1) no exts, no optimizers. it seem the $a,$b keep same internal pointer, this is quite serious error cos $b=$a should create separate array copy and it does but without the inner pointer. if you replace $b=$a with $b=array(1,2,3); it works as expected this was reported and ignored by someone on solaris before as well-- #40608 Reproduce code: --- $a=array(1,2,3); $b=$a; foreach($a as $A) { foreach($b as $B) { echo $A,$B\n; break; } } Expected result: 1,1 2,1 3,1 Actual result: -- 1,1 2,1 3,1 2,1 3,1 2,1 3,1 --infinite- -- Edit this bug report at http://bugs.php.net/?id=40768edit=1
#40552 [Bgs]: donation
ID: 40552 User updated by: lepage at grm dot polymtl dot ca -Summary: is php crap ? Reported By: lepage at grm dot polymtl dot ca Status: Bogus Bug Type: Unknown/Other Function Operating System: Solaris 9 PHP Version: 5.2.1 New Comment: Do you mean this dot search path bug is only a problem on Solaris ? About the donation, yes I am willing to give you a working Sun system with Solaris. Contact me for the donation. Previous Comments: [2007-03-09 10:07:38] [EMAIL PROTECTED] Feel free to donate a Solaris 9 machine to me. Until then you'll have to test release candidates yourself. [2007-03-08 01:11:26] lepage at grm dot polymtl dot ca I am loosing fate in the php team. They have no test bench or what? No longer looking for '.' in the path is a pretty serious stupid bug. I was looking every where for a solution only thing I found looking for those keyword where site that are actually down..! I was even told here it's not a bug, I had to do coding to prove that include ./file does not work. hakkarainen, thank for tesing the latest version for me, I have no more time to test all the latest php crap. [2007-03-07 13:18:57] hakkarainen at cs dot joensuu dot fi I have the very same problem with php5.2-200703060530 and Solaris 9 (php5.2-200611160530 did not had this problem). [2007-03-07 01:00:00] 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-02-27 18:31:17] [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/40552 -- Edit this bug report at http://bugs.php.net/?id=40552edit=1
#40759 [Fbk-Opn]: pspell_new_personal does not load custom dictionary
ID: 40759 User updated by: david at mytton dot net Reported By: david at mytton dot net -Status: Feedback +Status: Open Bug Type: Pspell related Operating System: Windows XP PHP Version: 5.2.1 New Comment: The pspell dictionary or my custom one? The pspell one is a standard English dictionary downloaded from the Aspell website at http://ftp.gnu.org/gnu/aspell/w32/Aspell-en-0.50-2-3.exe. I included my custom dictionary at the bottom of the reproduce code. Previous Comments: [2007-03-09 10:34:36] [EMAIL PROTECTED] We'll also need your dictionary to investigate it. Though I doubt it has something to do with PHP. If pspell doesn't use your dictionary, it's hardly PHP problem. [2007-03-08 17:14:15] david at mytton dot net Corrected typo in summary [2007-03-08 17:13:40] david at mytton dot net Description: The personal dictionary does not appear to be used when asking pspell for suggestions. The same result occurs whether or not custom.dict actually exists. E.g. if I change the filename to customdict no error is output and the output is the same. I tried this with the latest php_pspell.dll from http://snaps.php.net/win32/php5.2-win32-200703081530.zip Reproduce code: --- ?php $spelling = pspell_new_personal('C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\custom.dict', 'en'); $suggestions = pspell_suggest($spelling, 'bloomsbur'); echo 'pre'; print_r($suggestions); '/pre'; ? custom.dict: personal_ws-1.1 en 1 bloomsbury Expected result: Array of suggestions including bloomsbury in the suggestions. Actual result: -- bloomsbury is not in the suggestions list: Array ( [0] = blooms bur [1] = blooms-bur [2] = blooms [3] = Bloom's [4] = bloom's [5] = bloomers [6] = Bloomer [7] = bloomer ) -- Edit this bug report at http://bugs.php.net/?id=40759edit=1
#40641 [Fbk-Opn]: open_basedir crash httpd
ID: 40641 User updated by: jfgingras at cegep-ste-foy dot qc dot ca Reported By: jfgingras at cegep-ste-foy dot qc dot ca -Status: Feedback +Status: Open Bug Type: Unknown/Other Function Operating System: FreeBSD 6.1-RELEASE PHP Version: 5.2.1 New Comment: Looks like the session extension is the root of the crash. We try every extionsions alone, and only session crashed httpd. I know it would be great if I was able to get that damn BT but I hope this new info can help to find a solution to this problem. If you you have any idea to fix this or new ways to get a BT, please let me know. Thx. Previous Comments: [2007-03-02 18:22:24] jfgingras at cegep-ste-foy dot qc dot ca Well, I compile PHP with --disable-debug and CFLAGS=-O0 -g, can't get a BT. I compile it with --enable-debug and CFLAGS=-O0 -g again, no BT. I even recompile httpd with either WITHDEBUG=yes and CFLAGS=-O0 -g still can get a BT. I still can get httpd to run in gdb : gdb in realloc(): error: junk pointer, too high to make sense Abort trap: 6 (core dumped) I'll try to know at least what is the problematic extension that cause httpd to crash when open_basedir is defined (see comment on [26 Feb 7:12pm UTC]). [2007-02-28 22:12:41] jfgingras at cegep-ste-foy dot qc dot ca We finaly found a machine on which we can reproduce the error. I'll compile PHP as you recommened. Three servers running FreeBSD 6.1, with the lastest patchs an all, all running on 64bits CPU. Two servers are running with 2x AMD64 Opteron Processor 248 (both crash with open_basedir) and one running with AMD64 Athlon Dual Core (doesn't crash with open_basedir). I'll try to run httpd under gdb again, I want that backtrace ;) [2007-02-28 15:00:00] [EMAIL PROTECTED] Try rebuilding PHP with --disable-debug and CFLAGS=-O0 -g. Btw, what GCC version do you use? [2007-02-28 14:53:57] jfgingras at cegep-ste-foy dot qc dot ca I should I have read more before posting my last comment, seems like the FreeBSD port only support i386 and the amd64 support is only for Linux right now. Guess I'll have to forget about open_basedir for now :( [2007-02-28 14:32:39] jfgingras at cegep-ste-foy dot qc dot ca Well, the portage of Valgrind under FreeBSD 6.1 is only for i386 and it complains because I'm on a amd64. So I can't get valgrind to compile. I'll try the source directly from http://valgrind.org/, they saids it support amd64. Stay tune! 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/40641 -- Edit this bug report at http://bugs.php.net/?id=40641edit=1
#39644 [Csd]: Update MySQL MySQLI Libraries
ID: 39644 User updated by: dj02 dot net at nbl dot fi Reported By: dj02 dot net at nbl dot fi Status: Closed Bug Type: Feature/Change Request Operating System: Windows XP 5.1.2600 PHP Version: 5CVS-2006-11-27 (snap) Assigned To: edink New Comment: Hi, Could you Update MySQL MySQLi Libraries against MySQL Version 5.0.37? Because MySQL Team have updated sources and WIN32 BINARIES to v5.0.37. v5.0.36 was only a source win32 release. Brevious win32 binary release was v5.0.27 so it would be good to build MySQL MySQLi Libraries against MySQL Version 5.0.37. Previous Comments: [2007-03-05 13:11:00] [EMAIL PROTECTED] Updated to latest ver. [2006-11-27 15:05:24] dj02 dot net at nbl dot fi Description: Hi, Could you Update MySQL MySQLi Libraries against MySQL Version 5.0.27? -- Edit this bug report at http://bugs.php.net/?id=39644edit=1
#39644 [Csd-Opn]: Update MySQL MySQLI Libraries
ID: 39644 User updated by: dj02 dot net at nbl dot fi Reported By: dj02 dot net at nbl dot fi -Status: Closed +Status: Open Bug Type: Feature/Change Request Operating System: Windows XP 5.1.2600 PHP Version: 5CVS-2006-11-27 (snap) Assigned To: edink New Comment: - Previous Comments: [2007-03-09 20:01:25] dj02 dot net at nbl dot fi Hi, Could you Update MySQL MySQLi Libraries against MySQL Version 5.0.37? Because MySQL Team have updated sources and WIN32 BINARIES to v5.0.37. v5.0.36 was only a source win32 release. Brevious win32 binary release was v5.0.27 so it would be good to build MySQL MySQLi Libraries against MySQL Version 5.0.37. [2007-03-05 13:11:00] [EMAIL PROTECTED] Updated to latest ver. [2006-11-27 15:05:24] dj02 dot net at nbl dot fi Description: Hi, Could you Update MySQL MySQLi Libraries against MySQL Version 5.0.27? -- Edit this bug report at http://bugs.php.net/?id=39644edit=1
#39644 [Opn]: Update MySQL MySQLI Libraries
ID: 39644 User updated by: dj02 dot net at nbl dot fi Reported By: dj02 dot net at nbl dot fi Status: Open Bug Type: Feature/Change Request Operating System: Windows XP 5.1.2600 -PHP Version: 5CVS-2006-11-27 (snap) +PHP Version: 5CVS-2007-03-09 (snap) Assigned To: edink New Comment: Updated bugreport PHP Version info. Previous Comments: [2007-03-09 20:01:58] dj02 dot net at nbl dot fi - [2007-03-09 20:01:25] dj02 dot net at nbl dot fi Hi, Could you Update MySQL MySQLi Libraries against MySQL Version 5.0.37? Because MySQL Team have updated sources and WIN32 BINARIES to v5.0.37. v5.0.36 was only a source win32 release. Brevious win32 binary release was v5.0.27 so it would be good to build MySQL MySQLi Libraries against MySQL Version 5.0.37. [2007-03-05 13:11:00] [EMAIL PROTECTED] Updated to latest ver. [2006-11-27 15:05:24] dj02 dot net at nbl dot fi Description: Hi, Could you Update MySQL MySQLi Libraries against MySQL Version 5.0.27? -- Edit this bug report at http://bugs.php.net/?id=39644edit=1
#40769 [NEW]: array_diff() doesn't compare booleans
From: phpreport at alecweb dot be Operating system: MacOSX PHP version: 5.2.1 PHP Bug Type: Arrays related Bug description: array_diff() doesn't compare booleans Description: array_diff doesn't compare booleans. Reproduce code: --- $array1 = Array ( [domains] = 300 [subdomains] = 120 [cgi] = [php] = [safemode] = 1 ) $array2 = Array ( [domains] = 300 [subdomains] = 120 [cgi] = 1 [php] = 1 [safemode] = ) $arrayres = array_diff($array1, $array2); Expected result: this is a vardump of $array1, $array2 and $arrayres array(5) { [domains]= string(3) 300 [subdomains]= string(3) 120 [cgi]= bool(false) [php]= bool(false) [safemode]= bool(true) } array(5) { [domains]= string(3) 300 [subdomains]= string(3) 120 [cgi]= bool(true) [php]= bool(true) [safemode]= bool(false) } array(0) { [cgi]= bool(false) [php]= bool(false) [safemode]= bool(true) } Actual result: -- this is a vardump of $array1, $array2 and $arrayres array(5) { [domains]= string(3) 300 [subdomains]= string(3) 120 [cgi]= bool(false) [php]= bool(false) [safemode]= bool(true) } array(5) { [domains]= string(3) 300 [subdomains]= string(3) 120 [cgi]= bool(true) [php]= bool(true) [safemode]= bool(false) } array(0) { } -- Edit bug report at http://bugs.php.net/?id=40769edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40769r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40769r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40769r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40769r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40769r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40769r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40769r=needscript Try newer version:http://bugs.php.net/fix.php?id=40769r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40769r=support Expected behavior:http://bugs.php.net/fix.php?id=40769r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40769r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40769r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40769r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40769r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40769r=dst IIS Stability:http://bugs.php.net/fix.php?id=40769r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40769r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40769r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40769r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40769r=mysqlcfg
#40751 [Fbk-Opn]: Apache segmentation fault
ID: 40751 User updated by: sti-pe2 at online dot no Reported By: sti-pe2 at online dot no -Status: Feedback +Status: Open Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: These are loaded, in this order: mysql.so pcre.so bz2.so session.so xml.so And guess what? Yes, it crashes even if just session is loaded... Previous Comments: [2007-03-09 14:43:35] scottmacvicar at ntlworld dot com What other extensions do you load in php.ini an what order are they loaded? If you disable all apart from session do you still get the crash? [2007-03-09 12:22:04] [EMAIL PROTECTED] I'm still unable to reproduce it. [2007-03-09 11:56:55] sti-pe2 at online dot no Installed latest snapshot, but I still get the same error. [2007-03-09 11:34:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2007-03-09 11:21:45] sti-pe2 at online dot no No, my php.ini says ;open_basedir = 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/40751 -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#40014 [Com]: try, catch -- Let's Empower It, Please!!!
ID: 40014 Comment by: bronner dot mike at gmail dot com Reported By: marcus3v at hotmail dot com Status: Open Bug Type:Feature/Change Request PHP Version: 6CVS-2007-01-03 (CVS) New Comment: Same here, have been getting that behavior as well. Keeping fatal errors from users would be nice. It would also let us exit gracefully, and not leave the users hanging. Previous Comments: [2007-01-03 20:44:54] marcus3v at hotmail dot com Description: Hey, men! What about to enhance the try, catch Statement so that the code inside try would transparently cause a Fatal Error that, then, is handled through the catch Blocks -- just as occurs in JavaScript?! Reproduce code: --- try { /*@@*/ echo([global] -- causing a Fatal Error...); $nonObjVar-method(); //## nonObjVar isn't defined } catch(Exception $error) { /*@@*/ echo([global] -- some handling being executed...); //## some handling... } /*@@*/ echo([global] -- [end]); Expected result: The output would be the following: # [global] -- causing a Fatal Error... # [global] -- some handling being executed... # [global] -- [end] Actual result: -- Obviously, the output with the current implementation is the following: # [global] -- causing a Fatal Error... # ( PHP Notice ) undefined Variable: nonObjVar # ( PHP Fatal Error ) call to member a Funcion ( method() ) on a non-Object -- Edit this bug report at http://bugs.php.net/?id=40014edit=1
#40425 [Opn-Fbk]: php_getuid() always return 1.
ID: 40425 Updated by: [EMAIL PROTECTED] Reported By: priappub at yahoo dot fr -Status: Open +Status: Feedback Bug Type: Safe Mode/open_basedir Operating System: Solaris 10 PHP Version: 5.2.1 New Comment: Well, then provide the one from the self-compiled apache. Previous Comments: [2007-03-09 16:09:31] priappub at yahoo dot fr This is the httpd -V from apache provided by SUN. [2007-03-09 10:40:27] [EMAIL PROTECTED] And the same for Sun apache, please. [2007-03-08 22:32:38] priappub at yahoo dot fr For the difference, I don't know... I have this: [EMAIL PROTECTED] ~]# /usr/apache2/bin/httpd -V Server version: Apache/2.0.58 Server built: Sep 5 2006 07:46:49 Server's Module Magic Number: 20020903:12 Server loaded: APR 0.9.12, APR-UTIL 0.9.12 Compiled using: APR 0.9.12, APR-UTIL 0.9.12 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/apache2 -D SUEXEC_BIN=/usr/apache2/bin/suexec -D DEFAULT_PIDLOG=/var/run/apache2/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=/var/run/apache2/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=/etc/apache2/mime.types -D SERVER_CONFIG_FILE=/etc/apache2/httpd.conf [2007-03-07 10:19:42] [EMAIL PROTECTED] What's the difference between Sun Apache and the one compiled from sources? [2007-03-07 10:13:40] priappub at yahoo dot fr Same problem with the snapshot. But it seems that the problem is the apache provided by SUN because if I compile apache from the source, safe_mode is OK. 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/40425 -- Edit this bug report at http://bugs.php.net/?id=40425edit=1
#40758 [Opn-Asn]: Test fcgi_is_fastcgi() is wrong on windows
ID: 40758 Updated by: [EMAIL PROTECTED] Reported By: jostb2345 at yahoo dot com -Status: Open +Status: Assigned Bug Type: CGI related Operating System: Windows (all versions) PHP Version: 5.2.1 Assigned To: dmitry Previous Comments: [2007-03-09 17:06:35] jostb2345 at yahoo dot com I don't understand for what reason some program passes stdout to PHP Because I thought you need to distinguish sockets from named pipes. I have attached code which crashes php since 5.2.0. Regards, Jost Boekemeier [2007-03-09 17:01:01] jostb2345 at yahoo dot de # include windows.h # include winsock2.h # define close closesocket term() { printf(err:%d, (GetLastError())); exit(1); } struct sockaddr_in saddr; main() { SOCKET listen_handle; SOCKADDR_IN saServer; char *cmd = php-cgi.exe; STARTUPINFO su_info; SECURITY_ATTRIBUTES sa = { 0 }; WORD wVersionRequested = MAKEWORD(1,1); WSADATA wsaData; int n = WSAStartup(wVersionRequested, wsaData); if (wsaData.wVersion != wVersionRequested) term(); listen_handle = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); saServer.sin_family = AF_INET; saServer.sin_addr.s_addr = INADDR_ANY; saServer.sin_port = htons(9667); n = bind(listen_handle, (LPSOCKADDR)saServer, sizeof(struct sockaddr)); if (n == SOCKET_ERROR) term(); n = listen(listen_handle, 20); if (n == SOCKET_ERROR) term(); ZeroMemory(su_info, sizeof(STARTUPINFO)); su_info.cb = sizeof(STARTUPINFO); su_info.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; su_info.wShowWindow = SW_HIDE; su_info.hStdInput = listen_handle; su_info.hStdError = INVALID_HANDLE_VALUE; su_info.hStdOutput = INVALID_HANDLE_VALUE; SetHandleInformation(su_info.hStdInput, HANDLE_FLAG_INHERIT, TRUE); PROCESS_INFORMATION p; if(CreateProcess(NULL, cmd, NULL, NULL, 1, 0, NULL, NULL, su_info, p)) { CloseHandle(p.hThread); closesocket(listen_handle); } else { term(); } if( WaitForSingleObject(p.hProcess, INFINITE) == WAIT_FAILED ){ term(); } WSACleanup(); } [2007-03-09 13:36:15] [EMAIL PROTECTED] I don't see any difference with old code. See OS_IsFcgi() and OS_LibInit(). Also I don't understand for what reason some program passes stdout to PHP. [2007-03-08 13:45:33] jostb2345 at yahoo dot com Description: On windows, php 5.2.0 and above the following code (written in pseudo-code) doesn't work anymore: socket = socket(AF_INET, ...); bind(socket, ...); listen(socket, ...); outputHandle=GetStdHandle(...); inputHandle=socket; CreateProcess(...,php-cgi.exe, ..., IOHandles); The problem is that is_fastcgi is only set if the OutputHandle and ErrorHandle are invalid. If both are invalid, InputHandle is assumed to be a named pipe. The Unix version still uses the old (correct) code. To correct this problem either the old FCGI_isfcgi() should be used or the test must be dublicated. See procedures: int fcgi_init(void); int fcgi_is_fastcgi(void); Regards, Jost Boekemeier Reproduce code: --- See above. If necessary I can provide a test program. -- Edit this bug report at http://bugs.php.net/?id=40758edit=1
#40552 [Bgs]: donation
ID: 40552 Updated by: [EMAIL PROTECTED] Reported By: lepage at grm dot polymtl dot ca Status: Bogus Bug Type: Unknown/Other Function Operating System: Solaris 9 PHP Version: 5.2.1 New Comment: Do you mean this dot search path bug is only a problem on Solaris ? Exactly. Solaris is a system with broken everything, including realpath() and other quite vital utilities. On other (working) systems it does work just fine. Previous Comments: [2007-03-09 19:03:30] lepage at grm dot polymtl dot ca Do you mean this dot search path bug is only a problem on Solaris ? About the donation, yes I am willing to give you a working Sun system with Solaris. Contact me for the donation. [2007-03-09 10:07:38] [EMAIL PROTECTED] Feel free to donate a Solaris 9 machine to me. Until then you'll have to test release candidates yourself. [2007-03-08 01:11:26] lepage at grm dot polymtl dot ca I am loosing fate in the php team. They have no test bench or what? No longer looking for '.' in the path is a pretty serious stupid bug. I was looking every where for a solution only thing I found looking for those keyword where site that are actually down..! I was even told here it's not a bug, I had to do coding to prove that include ./file does not work. hakkarainen, thank for tesing the latest version for me, I have no more time to test all the latest php crap. [2007-03-07 13:18:57] hakkarainen at cs dot joensuu dot fi I have the very same problem with php5.2-200703060530 and Solaris 9 (php5.2-200611160530 did not had this problem). [2007-03-07 01:00:00] 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. 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/40552 -- Edit this bug report at http://bugs.php.net/?id=40552edit=1
#40641 [Opn-Fbk]: open_basedir crash httpd
ID: 40641 Updated by: [EMAIL PROTECTED] Reported By: jfgingras at cegep-ste-foy dot qc dot ca -Status: Open +Status: Feedback Bug Type: Unknown/Other Function Operating System: FreeBSD 6.1-RELEASE PHP Version: 5.2.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: [2007-03-09 19:37:48] jfgingras at cegep-ste-foy dot qc dot ca Looks like the session extension is the root of the crash. We try every extionsions alone, and only session crashed httpd. I know it would be great if I was able to get that damn BT but I hope this new info can help to find a solution to this problem. If you you have any idea to fix this or new ways to get a BT, please let me know. Thx. [2007-03-02 18:22:24] jfgingras at cegep-ste-foy dot qc dot ca Well, I compile PHP with --disable-debug and CFLAGS=-O0 -g, can't get a BT. I compile it with --enable-debug and CFLAGS=-O0 -g again, no BT. I even recompile httpd with either WITHDEBUG=yes and CFLAGS=-O0 -g still can get a BT. I still can get httpd to run in gdb : gdb in realloc(): error: junk pointer, too high to make sense Abort trap: 6 (core dumped) I'll try to know at least what is the problematic extension that cause httpd to crash when open_basedir is defined (see comment on [26 Feb 7:12pm UTC]). [2007-02-28 22:12:41] jfgingras at cegep-ste-foy dot qc dot ca We finaly found a machine on which we can reproduce the error. I'll compile PHP as you recommened. Three servers running FreeBSD 6.1, with the lastest patchs an all, all running on 64bits CPU. Two servers are running with 2x AMD64 Opteron Processor 248 (both crash with open_basedir) and one running with AMD64 Athlon Dual Core (doesn't crash with open_basedir). I'll try to run httpd under gdb again, I want that backtrace ;) [2007-02-28 15:00:00] [EMAIL PROTECTED] Try rebuilding PHP with --disable-debug and CFLAGS=-O0 -g. Btw, what GCC version do you use? [2007-02-28 14:53:57] jfgingras at cegep-ste-foy dot qc dot ca I should I have read more before posting my last comment, seems like the FreeBSD port only support i386 and the amd64 support is only for Linux right now. Guess I'll have to forget about open_basedir for now :( 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/40641 -- Edit this bug report at http://bugs.php.net/?id=40641edit=1
#40769 [Opn-Bgs]: array_diff() doesn't compare booleans
ID: 40769 Updated by: [EMAIL PROTECTED] Reported By: phpreport at alecweb dot be -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: MacOSX PHP Version: 5.2.1 New Comment: http://php.net/array_diff array_diff() - returns an array containing all the values of array1 that are not present in any of the other arguments. Previous Comments: [2007-03-09 20:34:44] phpreport at alecweb dot be Description: array_diff doesn't compare booleans. Reproduce code: --- $array1 = Array ( [domains] = 300 [subdomains] = 120 [cgi] = [php] = [safemode] = 1 ) $array2 = Array ( [domains] = 300 [subdomains] = 120 [cgi] = 1 [php] = 1 [safemode] = ) $arrayres = array_diff($array1, $array2); Expected result: this is a vardump of $array1, $array2 and $arrayres array(5) { [domains]= string(3) 300 [subdomains]= string(3) 120 [cgi]= bool(false) [php]= bool(false) [safemode]= bool(true) } array(5) { [domains]= string(3) 300 [subdomains]= string(3) 120 [cgi]= bool(true) [php]= bool(true) [safemode]= bool(false) } array(0) { [cgi]= bool(false) [php]= bool(false) [safemode]= bool(true) } Actual result: -- this is a vardump of $array1, $array2 and $arrayres array(5) { [domains]= string(3) 300 [subdomains]= string(3) 120 [cgi]= bool(false) [php]= bool(false) [safemode]= bool(true) } array(5) { [domains]= string(3) 300 [subdomains]= string(3) 120 [cgi]= bool(true) [php]= bool(true) [safemode]= bool(false) } array(0) { } -- Edit this bug report at http://bugs.php.net/?id=40769edit=1
#40751 [Opn-Fbk]: Apache segmentation fault
ID: 40751 Updated by: [EMAIL PROTECTED] Reported By: sti-pe2 at online dot no -Status: Open +Status: Feedback Bug Type: Session related Operating System: FreeBSD 5.3-RELEASE PHP Version: 4.4.6 New Comment: Any other information? A working reproduce code? Full backtrace? Valgrind report? Anything? Previous Comments: [2007-03-09 21:06:09] sti-pe2 at online dot no These are loaded, in this order: mysql.so pcre.so bz2.so session.so xml.so And guess what? Yes, it crashes even if just session is loaded... [2007-03-09 14:43:35] scottmacvicar at ntlworld dot com What other extensions do you load in php.ini an what order are they loaded? If you disable all apart from session do you still get the crash? [2007-03-09 12:22:04] [EMAIL PROTECTED] I'm still unable to reproduce it. [2007-03-09 11:56:55] sti-pe2 at online dot no Installed latest snapshot, but I still get the same error. [2007-03-09 11:34:20] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-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/40751 -- Edit this bug report at http://bugs.php.net/?id=40751edit=1
#39644 [Opn-Csd]: Update MySQL MySQLI Libraries
ID: 39644 Updated by: [EMAIL PROTECTED] Reported By: dj02 dot net at nbl dot fi -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: Windows XP 5.1.2600 PHP Version: 5CVS-2007-03-09 (snap) Assigned To: edink New Comment: Updated- Previous Comments: [2007-03-09 20:05:41] dj02 dot net at nbl dot fi Updated bugreport PHP Version info. [2007-03-09 20:01:58] dj02 dot net at nbl dot fi - [2007-03-09 20:01:25] dj02 dot net at nbl dot fi Hi, Could you Update MySQL MySQLi Libraries against MySQL Version 5.0.37? Because MySQL Team have updated sources and WIN32 BINARIES to v5.0.37. v5.0.36 was only a source win32 release. Brevious win32 binary release was v5.0.27 so it would be good to build MySQL MySQLi Libraries against MySQL Version 5.0.37. [2007-03-05 13:11:00] [EMAIL PROTECTED] Updated to latest ver. [2006-11-27 15:05:24] dj02 dot net at nbl dot fi Description: Hi, Could you Update MySQL MySQLi Libraries against MySQL Version 5.0.27? -- Edit this bug report at http://bugs.php.net/?id=39644edit=1
#40759 [Opn-Fbk]: pspell_new_personal does not load custom dictionary
ID: 40759 Updated by: [EMAIL PROTECTED] Reported By: david at mytton dot net -Status: Open +Status: Feedback Bug Type: Pspell related Operating System: Windows XP PHP Version: 5.2.1 New Comment: Works perfectly fine here, on Linux. ?php $spelling = pspell_new_personal('/tmp/.aspell.en.pws', 'en'); $suggestions = pspell_suggest($spelling, 'bloomsbur'); var_dump(print_r($suggestions)); ? Array ( [0] = blooms bur [1] = blooms-bur [2] = Bloomsbury [3] = bloomsbury [4] = blooms [5] = Bloom's [6] = bloom's ) bool(true) Previous Comments: [2007-03-09 19:23:31] david at mytton dot net The pspell dictionary or my custom one? The pspell one is a standard English dictionary downloaded from the Aspell website at http://ftp.gnu.org/gnu/aspell/w32/Aspell-en-0.50-2-3.exe. I included my custom dictionary at the bottom of the reproduce code. [2007-03-09 10:34:36] [EMAIL PROTECTED] We'll also need your dictionary to investigate it. Though I doubt it has something to do with PHP. If pspell doesn't use your dictionary, it's hardly PHP problem. [2007-03-08 17:14:15] david at mytton dot net Corrected typo in summary [2007-03-08 17:13:40] david at mytton dot net Description: The personal dictionary does not appear to be used when asking pspell for suggestions. The same result occurs whether or not custom.dict actually exists. E.g. if I change the filename to customdict no error is output and the output is the same. I tried this with the latest php_pspell.dll from http://snaps.php.net/win32/php5.2-win32-200703081530.zip Reproduce code: --- ?php $spelling = pspell_new_personal('C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\custom.dict', 'en'); $suggestions = pspell_suggest($spelling, 'bloomsbur'); echo 'pre'; print_r($suggestions); '/pre'; ? custom.dict: personal_ws-1.1 en 1 bloomsbury Expected result: Array of suggestions including bloomsbury in the suggestions. Actual result: -- bloomsbury is not in the suggestions list: Array ( [0] = blooms bur [1] = blooms-bur [2] = blooms [3] = Bloom's [4] = bloom's [5] = bloomers [6] = Bloomer [7] = bloomer ) -- Edit this bug report at http://bugs.php.net/?id=40759edit=1
#38057 [Com]: closeCursor method not function with CALL statement
ID: 38057 Comment by: engine_no9 at gmx dot net Reported By: draeli at draeli dot com Status: No Feedback Bug Type: PDO related Operating System: Windows PHP Version: 5.1.4 New Comment: So far i can confirm this improper behaviour with using PDO and stored procedure calls. I've just updated my PHP version to the latest 5.2.1 release and PDO still won't allow multiple stored procedure calls even i've closed the cursor with the available method. // this won't work more than once $stmt = $db-prepare(CALL spListUsers()); $stmt-execute(); $data = $stmt-fetchAll(PDO::FETCH_OBJ); $stmt-closeCursor(); print_r($data); // while this instead will work fine, even more than once $stmt = $db-prepare(SELECT * FROM users); $stmt-execute(); $data = $stmt-fetchAll(PDO::FETCH_OBJ); $stmt-closeCursor(); print_r($data); I assuming that this kind of bug is not solved in PHP 5.2.1 so far. Previous Comments: [2006-07-18 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. [2006-07-10 12:26:26] [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-07-10 12:24:11] draeli at draeli dot com Description: I have this in my construct class : $result=$this-connexion_bd-query(CALL ListeGroupeGet($IDGroupe,'$type_sens')); Result is correctly put with fetch method but after if I try to close cursor with cluseCursor method nothing is do ... To confirm this behavior, I have put an other query statement after closeCursor method : $test=$this-connexion_bd-query(SELECT '1'); and do var_dump on result : bool(false) result of that as if cursor isnt close. Expected result: Fatal error: Call to a member function fetch() on a non-object -- Edit this bug report at http://bugs.php.net/?id=38057edit=1
#40764 [Fbk-Csd]: imageline() problem
ID: 40764 Updated by: [EMAIL PROTECTED] Reported By: php at lydiaade dot com -Status: Feedback +Status: Closed Bug Type: GD related Operating System: Redhat Enterprise 3 PHP Version: 5.2.1 Assigned To: pajoye 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-03-09 01:20:10] [EMAIL PROTECTED] You are right, my optimization did not care about line thickness. I committed a fix in PHP_5_2 (5.2 branch), please try it. I will merge in the other branches and add the test case tomorrow. [2007-03-09 00:54:38] php at lydiaade dot com Description: imageline() now draws all horizontal and vertical lines as one pixel thick, whichever line thickness has been set using imagesetthickness(). As it worked fine before I upgraded to 5.2.1, this is probably caused by the recent optimisation of imageline(). Reproduce code: --- ?php $image=imagecreatetruecolor(400, 400); $white = imagecolorallocate($image, 255, 255, 255); $black = imagecolorallocate($image, 0, 0, 0); imagefill($image, 0, 0, $white); imagesetthickness($image, 10); imageline($image, 200, 0, 200, 400, $black); imageline($image, 0, 200, 400, 200, $black); imageline($image, 0, 0, 392, 392, $black); header(Content-type: image/gif); imagegif($image); imagedestroy($image); ? Expected result: This should draw three lines, all 10 pixels thick. Actual result: -- Only the diagonal line is the correct thickness. -- Edit this bug report at http://bugs.php.net/?id=40764edit=1
#40766 [NEW]: static function string invoking
From: danieloltmanns at gmx dot de Operating system: Linux PHP version: 5.2.1 PHP Bug Type: *General Issues Bug description: static function string invoking Description: // works: class A { public function foo(){} } $bar = new A(); $bar-{'foo'}(); --- // works not: class A { public function static foo(){} } A::{'foo'}(); -- Edit bug report at http://bugs.php.net/?id=40766edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40766r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40766r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40766r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40766r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40766r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40766r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40766r=needscript Try newer version:http://bugs.php.net/fix.php?id=40766r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40766r=support Expected behavior:http://bugs.php.net/fix.php?id=40766r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40766r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40766r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40766r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40766r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40766r=dst IIS Stability:http://bugs.php.net/fix.php?id=40766r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40766r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40766r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40766r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40766r=mysqlcfg
#40770 [NEW]: Apache child exits when PHP memory limit reached
From: php at edwardk dot info Operating system: Windows 2003 PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug description: Apache child exits when PHP memory limit reached Description: Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit The following PHP code was called from a browser with the size=149 (to simulate 149MB use) and the PHP memory limit is 160M. Reproduce code: --- ? ini_set('display_errors',true); if (isset($_GET['size']) $_GET['size'] 200) { $mb = intval($_GET['size']); } else { $mb=5; } $var = ''; echo 'Memory limit: '.ini_get('memory_limit').'br'; for ($i=0; $i=$mb; $i++) { $var.= str_repeat('a',1*1024*1024); echo memory_get_usage().'br'; } echo 'String length: '. strlen($var); ? Expected result: PHP should, if it did run out of memory, exit with something along the lines of Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate yyy bytes) otherwise, the script should execute without crashing. Actual result: -- Apache child exits, browser waiting for the result of the page get a TCP connection reset and no page loaded. -- Edit bug report at http://bugs.php.net/?id=40770edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40770r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40770r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40770r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40770r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40770r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40770r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40770r=needscript Try newer version:http://bugs.php.net/fix.php?id=40770r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40770r=support Expected behavior:http://bugs.php.net/fix.php?id=40770r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40770r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40770r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40770r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40770r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40770r=dst IIS Stability:http://bugs.php.net/fix.php?id=40770r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40770r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40770r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40770r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40770r=mysqlcfg
#40771 [NEW]: php5-mysqli-5.2.1_3 have problem after install
From: ls at ispserver dot com Operating system: FreeBSD 6.2 PHP version: 5.2.1 PHP Bug Type: MySQLi related Bug description: php5-mysqli-5.2.1_3 have problem after install Description: after install php5-mysqli-5.2.1_3 extenrtion mysqli.so dont work because cant find file PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/mysql.so' - Shared object libmysqlclient.so.14 not found, required by mysql.so in Unknown on line 0 In server installed mysql-client-5.0.33 Multithreaded SQL database (client) mysql-server-5.0.33 Multithreaded SQL database (server) Expected result: # php -m PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613-debug/mysql.so' - Shared object libmysqlclient.so.14 not found, required by mysql.so in Unknown on line 0 [PHP Modules] bz2 ctype curl date dom filter gd gettext hash iconv json libxml mbstring mcrypt mhash mysqli openssl pcre pdf PDO pdo_sqlite posix Reflection session SimpleXML SPL SQLite standard tokenizer xml xmlreader xmlwriter zlib [Zend Modules] Actual result: -- I fix this by creating symbol link /usr/local/lib/mysql# ln -s libmysqlclient.so libmysqlclient.so.14 lrwxr-xr-x 1 root wheel 20 Mar 10 05:17 libmysqlclient.so - libmysqlclient.so.15 lrwxr-xr-x 1 root wheel 17 Mar 10 08:37 libmysqlclient.so.14 - libmysqlclient.so -rwxr-xr-x 1 root wheel 415293 Mar 10 05:17 libmysqlclient.so.15 -- Edit bug report at http://bugs.php.net/?id=40771edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40771r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40771r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40771r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40771r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40771r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40771r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40771r=needscript Try newer version:http://bugs.php.net/fix.php?id=40771r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40771r=support Expected behavior:http://bugs.php.net/fix.php?id=40771r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40771r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40771r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40771r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40771r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40771r=dst IIS Stability:http://bugs.php.net/fix.php?id=40771r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40771r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40771r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40771r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40771r=mysqlcfg