#48096 [NEW]: Error reading XML string
From: bbarnett at gt dot co dot cr Operating system: Windows 2003 Server R2 PHP version: 5.2.9 PHP Bug Type: DOM XML related Bug description: Error reading XML string Description: I'm receiving and errors when I try to read and XML string, previously generated by my code. Reproduce code: --- $doc = new DOMDocument('1.0'); $doc-formatOutput = true; $root = $doc-createElement('X_A_PagoGen'); $root = $doc-appendChild($root); $title = $doc-createElement('Banco'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($codigobanco)); $text = $title-appendChild($text); $title = $doc-createElement('Localizacion'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($localizacion)); $text = $title-appendChild($text); $title = $doc-createElement('NotaCredito'); $title = $root-appendChild($title); $text = $doc-createTextNode(llenacampo(trim($remesa),12,'0','derecha')); $text = $title-appendChild($text); $title = $doc-createElement('Correlativo'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($factura)); $text = $title-appendChild($text); $title = $doc-createElement('Self'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($self)); $text = $title-appendChild($text); $title = $doc-createElement('Monto'); $title = $root-appendChild($title); $text = $doc-createTextNode(llenacampo(trim($monto),10,'0','derecha')); $text = $title-appendChild($text); $title = $doc-createElement('Agencia'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($recaudadorCNFL)); $text = $title-appendChild($text); $title = $doc-createElement('FechaPago'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim(fecha1())); $text = $title-appendChild($text); $title = $doc-createElement('FechaCaja'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($deposito)); $text = $title-appendChild($text); $tramaxml=$doc-saveXML(); $xml2= simplexml_load_string(trim($tramaxml)); Expected result: XML Object Actual result: -- Error: Fatal Error 73: Couldn't find end of Start Tag Fech line 10 Line: 10 Column: 8 Fatal Error 77: Premature end of data in tag X_A_PagoGen line 2 Line: 10 Column: 8 -- Edit bug report at http://bugs.php.net/?id=48096edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48096r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48096r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48096r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48096r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48096r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48096r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48096r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48096r=needscript Try newer version: http://bugs.php.net/fix.php?id=48096r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48096r=support Expected behavior: http://bugs.php.net/fix.php?id=48096r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48096r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48096r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48096r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48096r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48096r=dst IIS Stability: http://bugs.php.net/fix.php?id=48096r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48096r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48096r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48096r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48096r=mysqlcfg
#48096 [Com]: Error reading XML string
ID: 48096 Comment by: bbarnett at gt dot co dot cr Reported By: bbarnett at gt dot co dot cr Status: Open Bug Type: DOM XML related Operating System: Windows 2003 Server R2 PHP Version: 5.2.9 New Comment: This is an example of the XML string: ?xml version=1.0? X_A_PagoGen Banco2/Banco Localizacion2603460081/Localizacion NotaCredito9787/NotaCredito Correlativo82108608/Correlativo Self9/Self Monto003930/Monto Agencia1400/Agencia FechaPago20090427/FechaPago FechaCaja20090428/FechaCaja /X_A_PagoGen Previous Comments: [2009-04-28 06:36:40] bbarnett at gt dot co dot cr Description: I'm receiving and errors when I try to read and XML string, previously generated by my code. Reproduce code: --- $doc = new DOMDocument('1.0'); $doc-formatOutput = true; $root = $doc-createElement('X_A_PagoGen'); $root = $doc-appendChild($root); $title = $doc-createElement('Banco'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($codigobanco)); $text = $title-appendChild($text); $title = $doc-createElement('Localizacion'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($localizacion)); $text = $title-appendChild($text); $title = $doc-createElement('NotaCredito'); $title = $root-appendChild($title); $text = $doc-createTextNode(llenacampo(trim($remesa),12,'0','derecha')); $text = $title-appendChild($text); $title = $doc-createElement('Correlativo'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($factura)); $text = $title-appendChild($text); $title = $doc-createElement('Self'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($self)); $text = $title-appendChild($text); $title = $doc-createElement('Monto'); $title = $root-appendChild($title); $text = $doc-createTextNode(llenacampo(trim($monto),10,'0','derecha')); $text = $title-appendChild($text); $title = $doc-createElement('Agencia'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($recaudadorCNFL)); $text = $title-appendChild($text); $title = $doc-createElement('FechaPago'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim(fecha1())); $text = $title-appendChild($text); $title = $doc-createElement('FechaCaja'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($deposito)); $text = $title-appendChild($text); $tramaxml=$doc-saveXML(); $xml2= simplexml_load_string(trim($tramaxml)); Expected result: XML Object Actual result: -- Error: Fatal Error 73: Couldn't find end of Start Tag Fech line 10 Line: 10 Column: 8 Fatal Error 77: Premature end of data in tag X_A_PagoGen line 2 Line: 10 Column: 8 -- Edit this bug report at http://bugs.php.net/?id=48096edit=1
#48034 [Ctl-Csd]: PHP crashes when script is 8192 (8KB) bytes long
ID: 48034 Updated by: dmi...@php.net Reported By: ninzya at inbox dot lv -Status: Critical +Status: Closed Bug Type: Reproducible crash Operating System: * PHP Version: 5.*, 6CVS (2009-04-21) -Assigned To: +Assigned To: dmitry New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2009-04-22 11:09:23] bj...@php.net See also bug#48043 [2009-04-21 17:20:21] ninzya at inbox dot lv I did everything mentioned in http://bugs.php.net/bugs-generating-backtrace-win32.php and got these results: Thread 250 - System ID 5552 Entry point msvcrt!_endthreadex+3a Create time 21.04.2009 15:20:51 Time spent in user mode 0 Days 0:0:0.656 Time spent in kernel mode 0 Days 0:0:0.921 Function Arg 1 Arg 2 Arg 3 Source php5ts!lex_scan+447c 0550fa34 010f54a0 002f php5ts!zend_register_auto_global+11f [2009-04-21 15:31:46] lbarn...@php.net It seems related to http://bugs.php.net/bug.php?id=47596 . Not exactly the same problem, though. It seems php_stream_open_for_zend() does not mmap() enough for ZEND_MMAP_AHEAD (PHP_STREAM_OPTION_MMAP_API in plain_wrapper adjusts the mmap length to the filesize, so ignoring ZEND_MMAP_AHEAD), and this may crash when the parser reads ahead of the mmap()ed region. [2009-04-21 11:50:51] ninzya at inbox dot lv PHP is installed as apache module. No fancy filtering, default php/apache installation. All php modules disabled. Bug hits only if file size is 8KB exactly (8192 bytes). PHP 5.2.9 also is affected. By the way, Apache 2.2 is not affected. Seems this is apache 2.0 specific problem. Don't know where to post this issue, here, or in Apache bugtracker. [2009-04-21 11:40:31] j...@php.net Which apache module? Do you have some fancy filtering going on? Does this happen with PHP 5.2.9 ? Do you have any shared extensions loaded? Any Zend extensions like debugger or cache? (disable those and retry) 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/48034 -- Edit this bug report at http://bugs.php.net/?id=48034edit=1
#45213 [Ver]: imap_utf7_encode() computes wrong UTF-7 data
ID: 45213 User updated by: thomas dot jarosch at intra2net dot com Reported By: thomas dot jarosch at intra2net dot com Status: Verified Bug Type: IMAP related Operating System: * PHP Version: 5.*, 6CVS (2009-04-27) New Comment: As far as I know, iconv does not support IMAP modified UTF7 out of the box. Atleast my version 1.9.1 does not and I have a patch for exactly that. Though we can't rely on people having a patched iconv version. The c-client IMAP library has support for UTF8 - modified UTF7. Maybe that would be an option? Previous Comments: [2009-04-27 20:31:15] paj...@php.net Should we not simply rely on iconv in 5.2/5.3 and ICU in HEAD? [2009-04-27 19:07:23] j...@php.net Here is short and reliable test: # sapi/cli/php -r '$tst = mb_convert_encoding(täst, ISO-8859-1, UTF8); echo $tst, \n; echo imap_utf7_encode($tst), \n, mb_convert_encoding($tst, UTF7-IMAP, ISO-8859-1), \n;' [2008-06-09 13:17:53] thomas dot jarosch at intra2net dot com Description: Hello together, I tried to encode german umlauts using imap_utf7_encode(), but the computed string is not understood by the cyrus IMAP server. This is pretty much related to bug #15630, but now I had the help of a coworker who is pretty fast decoding base64 by hand :-) UTF-7 is defined to encode special characters as two byte UTF-16 stream. Normally the ISO-8859-1 string täst should be encoded into tAOQ-st, which corresponds to 0x00, 0xe4. The current code in PHP 5.2.6 encodes it to t5A-st, which is 0xe4 without the leading 0x00. Would be nice if that could be resolved since it's not compatible with most IMAP implementations. Bug #15630 is around since 2002. Cheers, Thomas Reproduce code: --- echo imap_utf7_encode(täst); Expected result: tAOQ-st Actual result: -- t5A-st -- Edit this bug report at http://bugs.php.net/?id=45213edit=1
#48093 [Opn-Bgs]: Generated index is reset due to integer overflow
ID: 48093 Updated by: sni...@php.net Reported By: Marcel dot Glacki at stud dot fh-swf dot de -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: * PHP Version: 5.2.9 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: [2009-04-27 23:02:39] Marcel dot Glacki at stud dot fh-swf dot de Description: The generated index normally has the highest integer value regarding all integers it has encountered as indexes before. (And is automatically increased by +1) It is possible to reset this index (the internal pointer) not only by the functions intended to do so (like reset()) but also by increasing it above integers' max value (integer overflow). Reproduce code: --- ?php $max_int = 2147483647; // Max value for integer on a 32-bit system $arr = array(); $arr[1] = 'one'; // New index: 2 $arr[ $max_int ] = 'two'; // New index: -2147483648 $arr[0] = 'three'; // New index: 1 (already occupied with value 'foo') $arr[] = 'failure here'; // Warning: Cannot add element to the array as the next element is already occupied. ? -- Edit this bug report at http://bugs.php.net/?id=48093edit=1
#47367 [Fbk-Csd]: segfault when connecting while unbuffered query is running
ID: 47367 User updated by: Sjon at react dot nl Reported By: Sjon at react dot nl -Status: Feedback +Status: Closed Bug Type: MySQL related Operating System: Linux PHP Version: 5.2.9RC1 New Comment: This bug is no longer reproducible in 5.2.9 or PHP 5.2.10-dev; so I assume it is fixed Previous Comments: [2009-04-27 20:46:27] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2009-02-12 10:10:45] Sjon at react dot nl Description: PHP Segfaults when establishing a second connection when an unbuffered query is running Since I cannot report a bug in 5.2.8; I compiled php5.2-200902120730 and reproduced the bug with that version $ ./configure --with-mysql=shared $ make $ ./sapi/cli/php -v PHP 5.2.9RC2-dev (cli) (built: Feb 12 2009 10:52:08) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies $ ./sapi/cli/php -n -d extension_dir=./modules/ -d extension=mysql.so mysql-unbuffered-crash.php Reproduce code: --- ?PHP $rl1 = mysql_connect('localhost','Sjon','test') or die (mysql_error()); mysql_query(DROP DATABASE IF EXISTS mysql_unbuffered_crash); mysql_query(CREATE DATABASE mysql_unbuffered_crash); mysql_select_db('mysql_unbuffered_crash') or die (mysql_error()); mysql_query(CREATE TABLE test (`data` VARCHAR( 256 ) NOT NULL) ENGINE = innodb;); mysql_query(INSERT INTO test VALUES ('asdf');); $rs = mysql_unbuffered_query(SELECT data FROM test); # passing $rl1 will fix it while ($r = mysql_fetch_assoc($rs)) { // Setup another connection so we don't disturb the unbuffered_query $rl2 = mysql_connect('localhost','Sjon','test', TRUE) or die (mysql_error($rl2)); mysql_select_db('mysql_unbuffered_crash', $rl2) or die (mysql_error($rl2)); var_dump($r); } echo 'SUCCESS'; Expected result: array(1) { [data]= string(4) asdf } SUCCESS Actual result: -- array(1) { [data]= string(4) asdf } SUCCESS Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7d4f6c0 (LWP 21345)] zend_mm_add_to_free_list (heap=value optimized out, mm_block=0x9ee4e30) at /tmp/php5.2-200902120730/Zend/zend_alloc.c:747 747 if (ZEND_MM_FREE_BLOCK_SIZE(prev) != size) { (gdb) bt #0 zend_mm_add_to_free_list (heap=value optimized out, mm_block=0x9ee4e30) at /tmp/php5.2-200902120730/Zend/zend_alloc.c:747 #1 0x0826790b in _zend_mm_free_int (heap=0x9e2c1e8, p=value optimized out) at /tmp/php5.2-200902120730/Zend/zend_alloc.c:1987 #2 0x08277445 in shutdown_executor () at /tmp/php5.2-200902120730/Zend/zend_execute_API.c:283 #3 0x08281aa3 in zend_deactivate () at /tmp/php5.2-200902120730/Zend/zend.c:860 #4 0x08240857 in php_request_shutdown (dummy=0x0) at /tmp/php5.2-200902120730/main/main.c:1492 #5 0x082ecd71 in main (argc=7, argv=0xbf9c1a44) at /tmp/php5.2-200902120730/sapi/cli/php_cli.c:1314 -- Edit this bug report at http://bugs.php.net/?id=47367edit=1
#48097 [NEW]: date_timezone_set function produces wrong datetime result
From: energie at eox dot hu Operating system: linux/windows PHP version: 5.2.9 PHP Bug Type: Date/time related Bug description: date_timezone_set function produces wrong datetime result Description: Result of date_create with timezon given: Mon, 23 May 1955 00:00:00 +0200 After calling date_timezone_set for this date the expected result would be the same but instead the result is: Mon, 23 May 1955 01:00:00 +0200 In case of Europe/Budapest timezone 3 dates are affected between 1900.01.01 and 1999.12.31: [0] = Sun, 23 May 1954 00:00:00 +0200 [0] = Mon, 23 May 1955 00:00:00 +0200 [0] = Sun, 03 Jun 1956 00:00:00 +0200 There are timezones where everything works fine, and many ohters that have date inputs that cause this mis-calculation. Thers is no relation between the dates in different timezones but the wrong dates are always the same in a given timezone, so there are no random errors. Reproduce code: --- $errors = array(); $timezones = array('Europe/Budapest'); // Uncomment the following line to run on all timezones // $timezones = timezone_identifiers_list(); function generate_dates($timezone) { $dates = array(); for($y = 1900; $y = 1999; $y++) { for($m = 1; $m = 12; $m++) { for($d = 1; $d = 31; $d++) { $date = date_create(sprintf('%s-%s-%s 00:00:00', $y, $m, $d), timezone_open($timezone)); if ($date) { $dates[] = $date; } } } } return $dates; } foreach($timezones as $timezone) { $dates = generate_dates($timezone); foreach($dates as $date) { $test = date_format($date, 'r'); date_timezone_set($date, timezone_open($timezone)); if ($test != date_format($date, 'r')) { $errors[$timezone][] = array($test, date_format($date, 'r')); } } print('Timezone: '. $timezone . ', errors: '. count($errors[$timezone]) . \n); // Uncomment the following line to display all dates that calculated wrong // print_r($errors[$timezone]); // print \n; } Expected result: Timezone: Europe/Budapest, errors: 0 Actual result: -- Timezone: Europe/Budapest, errors: 3 -- Edit bug report at http://bugs.php.net/?id=48097edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48097r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48097r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48097r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48097r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48097r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48097r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48097r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48097r=needscript Try newer version: http://bugs.php.net/fix.php?id=48097r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48097r=support Expected behavior: http://bugs.php.net/fix.php?id=48097r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48097r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48097r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48097r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48097r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48097r=dst IIS Stability: http://bugs.php.net/fix.php?id=48097r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48097r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48097r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48097r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48097r=mysqlcfg
#46808 [Bgs]: Mysqli crashes on LONGTEXT columns
ID: 46808 User updated by: wcshields at gmail dot com Reported By: wcshields at gmail dot com Status: Bogus Bug Type: MySQLi related Operating System: Ubuntu 8.04 LTS x86 32 bit PHP Version: 5.2.8 New Comment: I sure wish I could figure out why someone marked this bug as Bogus rather than, you know, investigating it. Lo and behold it FINALLY is verified. Sorry but the treatment this issue has got (going on for 2+ years through various bugs) is nothing short of ludicrous. Previous Comments: [2009-04-19 14:13:16] j...@php.net Finally could reproduce this, see bug #47928 (I'm closing this report as the other has short and easy reproduce script now.. :) [2009-01-11 00:10:22] wcshields at gmail dot com Isn't the mysqlnd option for PHP 5.3+? If so, that's hardly a solution since 5.3 isn't out yet. [2008-12-11 16:09:15] webmaster at ajeux dot com Note: No bug when mysqlnd is used. (configure with --with-mysqli=mysqlnd) [2008-12-11 11:18:32] webmaster at ajeux dot com Bug confirmed here on PHP 5.3 with Mysql 5.0.51 SELECT query : SELECT id, UNCOMPRESS(myfield) FROM mytable ORDER BY id LIMIT 8 myfield is BLOB. How can we help to get it fixed ? Program received signal SIGSEGV, Segmentation fault. Backtrace: #0 0xb7aedb00 in mysqli_stmt_fetch_libmysql (ht=0, return_value=0xb71cbe4c, return_value_ptr=0x0, this_ptr=0xb7265748, return_value_used=1) at /usr/src/php5.3-200812091530/ext/mysqli/mysqli_api.c:842 #1 0xb7aedf0d in zif_mysqli_stmt_fetch (ht=0, return_value=0xb71cbe4c, return_value_ptr=0x0, this_ptr=0xb7265748, return_value_used=1) at /usr/src/php5.3-200812091530/ext/mysqli/mysqli_api.c:984 #2 0x0827a4b9 in zend_do_fcall_common_helper_SPEC (execute_data=0xb776af88) at /usr/src/php5.3-200812091530/Zend/zend_vm_execute.h:313 #3 0x08279a32 in execute (op_array=0xb738bd94) at /usr/src/php5.3-200812091530/Zend/zend_vm_execute.h:104 #4 0x08253c17 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/php5.3-200812091530/Zend/zend.c:1197 #5 0x081faf59 in php_execute_script (primary_file=0xbfb12090) at /usr/src/php5.3-200812091530/main/main.c:2080 #6 0x082ec5a9 in main (argc=1, argv=0xbfb121e4) at /usr/src/php5.3-200812091530/sapi/cgi/cgi_main.c:2000 [2008-12-09 07:31:00] wcshields at gmail dot com Description: Mysqli restores garbage from longtext columns in mysql 5.0.51a connected over TCP (also happens with Unix domain sockets) and, after a random number of rows, seg faults. The number of rows is unpredictable but consistent. If you find something that crashes after 11 rows, it will crash after 11 rows every time. Change the order by clause and it might crash every time after 3 rows. As per bugs #44867 and several others I've found, people have been reporting this issue since as early as 2005 and it still hasn't been addressed. Can someone PLEASE actually look into it? Reproduce code: --- ? $conn = new mysqli('localhost', 'user', 'password', 'db'); $stmt = $conn-prepare(SELECT name, longtext1 FROM sampletable); $stmt-execute(); $stmt-bind_result($name, $value); $count = 1; while ($stmt-fetch()) { $size = sizeof($value); echo $name $size\n; $count++; } $stmt-close(); ? Expected result: To retrieve the exact contents of all longtext values without crashing. Actual result: -- Segmentation fault. $ gdb php core GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as i486-linux-gnu... warning: Can't read pathname for load map: Input/output error. Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done. Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1 Reading symbols from /lib/tls/i686/cmov/librt.so.1...done. Loaded symbols for /lib/tls/i686/cmov/librt.so.1 Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done. Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2 Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done. Loaded symbols for /lib/tls/i686/cmov/libdl.so.2 Reading symbols from /usr/lib/libmysqlclient.so.15...done. Loaded symbols for /usr/lib/libmysqlclient.so.15 Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done. Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0 Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done. Loaded symbols for
#46808 [Bgs]: Mysqli crashes on LONGTEXT columns
ID: 46808 Updated by: paj...@php.net Reported By: wcshields at gmail dot com Status: Bogus Bug Type: MySQLi related Operating System: Ubuntu 8.04 LTS x86 32 bit PHP Version: 5.2.8 New Comment: The reason has been told: duplicated from #47928 Previous Comments: [2009-04-28 09:58:47] wcshields at gmail dot com I sure wish I could figure out why someone marked this bug as Bogus rather than, you know, investigating it. Lo and behold it FINALLY is verified. Sorry but the treatment this issue has got (going on for 2+ years through various bugs) is nothing short of ludicrous. [2009-04-19 14:13:16] j...@php.net Finally could reproduce this, see bug #47928 (I'm closing this report as the other has short and easy reproduce script now.. :) [2009-01-11 00:10:22] wcshields at gmail dot com Isn't the mysqlnd option for PHP 5.3+? If so, that's hardly a solution since 5.3 isn't out yet. [2008-12-11 16:09:15] webmaster at ajeux dot com Note: No bug when mysqlnd is used. (configure with --with-mysqli=mysqlnd) [2008-12-11 11:18:32] webmaster at ajeux dot com Bug confirmed here on PHP 5.3 with Mysql 5.0.51 SELECT query : SELECT id, UNCOMPRESS(myfield) FROM mytable ORDER BY id LIMIT 8 myfield is BLOB. How can we help to get it fixed ? Program received signal SIGSEGV, Segmentation fault. Backtrace: #0 0xb7aedb00 in mysqli_stmt_fetch_libmysql (ht=0, return_value=0xb71cbe4c, return_value_ptr=0x0, this_ptr=0xb7265748, return_value_used=1) at /usr/src/php5.3-200812091530/ext/mysqli/mysqli_api.c:842 #1 0xb7aedf0d in zif_mysqli_stmt_fetch (ht=0, return_value=0xb71cbe4c, return_value_ptr=0x0, this_ptr=0xb7265748, return_value_used=1) at /usr/src/php5.3-200812091530/ext/mysqli/mysqli_api.c:984 #2 0x0827a4b9 in zend_do_fcall_common_helper_SPEC (execute_data=0xb776af88) at /usr/src/php5.3-200812091530/Zend/zend_vm_execute.h:313 #3 0x08279a32 in execute (op_array=0xb738bd94) at /usr/src/php5.3-200812091530/Zend/zend_vm_execute.h:104 #4 0x08253c17 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/php5.3-200812091530/Zend/zend.c:1197 #5 0x081faf59 in php_execute_script (primary_file=0xbfb12090) at /usr/src/php5.3-200812091530/main/main.c:2080 #6 0x082ec5a9 in main (argc=1, argv=0xbfb121e4) at /usr/src/php5.3-200812091530/sapi/cgi/cgi_main.c:2000 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/46808 -- Edit this bug report at http://bugs.php.net/?id=46808edit=1
#48097 [Opn-Asn]: date_timezone_set function produces wrong datetime result
ID: 48097 Updated by: der...@php.net Reported By: energie at eox dot hu -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: linux/windows PHP Version: 5.2.9 -Assigned To: +Assigned To: derick Previous Comments: [2009-04-28 09:02:24] energie at eox dot hu Description: Result of date_create with timezon given: Mon, 23 May 1955 00:00:00 +0200 After calling date_timezone_set for this date the expected result would be the same but instead the result is: Mon, 23 May 1955 01:00:00 +0200 In case of Europe/Budapest timezone 3 dates are affected between 1900.01.01 and 1999.12.31: [0] = Sun, 23 May 1954 00:00:00 +0200 [0] = Mon, 23 May 1955 00:00:00 +0200 [0] = Sun, 03 Jun 1956 00:00:00 +0200 There are timezones where everything works fine, and many ohters that have date inputs that cause this mis-calculation. Thers is no relation between the dates in different timezones but the wrong dates are always the same in a given timezone, so there are no random errors. Reproduce code: --- $errors = array(); $timezones = array('Europe/Budapest'); // Uncomment the following line to run on all timezones // $timezones = timezone_identifiers_list(); function generate_dates($timezone) { $dates = array(); for($y = 1900; $y = 1999; $y++) { for($m = 1; $m = 12; $m++) { for($d = 1; $d = 31; $d++) { $date = date_create(sprintf('%s-%s-%s 00:00:00', $y, $m, $d), timezone_open($timezone)); if ($date) { $dates[] = $date; } } } } return $dates; } foreach($timezones as $timezone) { $dates = generate_dates($timezone); foreach($dates as $date) { $test = date_format($date, 'r'); date_timezone_set($date, timezone_open($timezone)); if ($test != date_format($date, 'r')) { $errors[$timezone][] = array($test, date_format($date, 'r')); } } print('Timezone: '. $timezone . ', errors: '. count($errors[$timezone]) . \n); // Uncomment the following line to display all dates that calculated wrong // print_r($errors[$timezone]); // print \n; } Expected result: Timezone: Europe/Budapest, errors: 0 Actual result: -- Timezone: Europe/Budapest, errors: 3 -- Edit this bug report at http://bugs.php.net/?id=48097edit=1
#48048 [Com]: Empty files corrupt zip
ID: 48048 Comment by: php at codecaster dot nl Reported By: php at codecaster dot nl Status: Feedback Bug Type: Zip Related Operating System: FreeBSD 7 PHP Version: 5.2.9 New Comment: I have installed the latest build, PHP 5.2.10-dev. Same results. From phpinfo(): Zip enabled Extension Version $Id: php_zip.c,v 1.1.2.50 2009/03/01 17:35:25 iliaa Exp $ Zip version 1.8.11 Libzip version 0.9.0 Updated test script (will output 2, should be 0): ?php // create empty file if (file_put_contents(empty.txt, ) === false) { die(Cannot write files); } // zip it using ZipArchive $zip = new ZipArchive(); $zip-open(corrupt.zip, ZIPARCHIVE::CREATE); $zip-addFile(empty.txt); $zip-close(); // open the file, show compressed size (returns 2, should be 0) if (($zip = zip_open(corrupt.zip))) { // read first entry $zip_entry = zip_read($zip); echo Compressed Size: . zip_entry_compressedsize($zip_entry); zip_close($zip); } ? Previous Comments: [2009-04-25 16:07:18] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I can't reproduce this with latest CVS checkout of PHP_5_2. [2009-04-22 14:38:46] php at codecaster dot nl Description: When you use ZipArchive-addFile() on an empty file, the file will be compressed anyway. This is incorrectly read by some (older) decompression programs. Reproduce code: --- if (file_put_contents(empty.txt, ) === false) { die(Cannot write files); } $zip = new ZipArchive(); $zip-open(corrupt.zip, ZIPARCHIVE::CREATE); $zip-addFile(empty.txt); $zip-close(); Expected result: A zip file containing empty.txt with a size of 0 bytes and a compressed size of 0 bytes. Actual result: -- A zip file containing empty.txt with a size of 0 bytes and a compressed size of 2 bytes. -- Edit this bug report at http://bugs.php.net/?id=48048edit=1
#48086 [Bgs]: PDO-OCI fails to configure due to lib suffix assumptions
ID: 48086 User updated by: petri dot mahanen at brainalliance dot com Reported By: petri dot mahanen at brainalliance dot com Status: Bogus Bug Type: PDO related Operating System: Mac OS X 10.5.6 PHP Version: 5.2.9 New Comment: Same as comment [29 Jan 11:37am UTC] michael-ring at t-online dot de in bug #39312. Previous Comments: [2009-04-27 15:11:27] j...@php.net Same as bug #39312 [2009-04-27 10:15:54] petri dot mahanen at brainalliance dot com Description: PDO OCI fails to configure on OS X, as the library suffix is assumed to be '.so', while it is '.dylib'. $SHLIB_SUFFIX_NAME is correctly set in configure, but not used in this case. The issue also seems to be reported in a comment to unrelated bug 39312, with a patch. Reproduce code: --- ./configure [...] --enable-pdo --with-pdo-oci=instantclient,/opt/instantclient_10_2,10.2.0.4 Expected result: successful configure Actual result: -- checking Oracle OCI support for PDO... yes checking Oracle Install-Dir... instantclient,/opt/instantclient_10_2,10.2.0.4 checking if that is sane... yes checking for oci.h... /opt/instantclient_10_2/sdk/include configure: error: I'm too dumb to figure out where the libraries are in your Instant Client install -- Edit this bug report at http://bugs.php.net/?id=48086edit=1
#48041 [Fbk-Opn]: no headers sent if output is blank
ID: 48041 User updated by: mortals at seznam dot cz Reported By: mortals at seznam dot cz -Status: Feedback +Status: Open Bug Type: CGI related Operating System: linux PHP Version: 5.2.9 New Comment: it works with mod_fastcgi hmm, perhaps bug in fcgid... Previous Comments: [2009-04-27 15:24:58] j...@php.net Can you reproduce this with mod_fastcgi? [2009-04-27 09:05:56] mortals at seznam dot cz reproduced only with version mod_fcgid 2.2. and php5.2.9 with mod_fcgid2.1 or with php5.2.8 headers are sent php5.2.9 and fcgid2.2 on 32bit system works on both system is same version of apache2.2.9 no different in ini settings, no errors after set display_errors on and no errors in apache log with loglevel debug same settings of apache and fcgid: IfModule mod_fcgid.c AddHandler fcgid-script .php SocketPath /var/tmp/fcgid-ipc IdleTimeout 60 MaxProcessCount 1000 IPCCommTimeout 30 IPCConnectTimeout 30 BusyTimeout 700 SharememPath /tmp/apache-fcgid-shm /IfModule [2009-04-24 13:38:22] lbarn...@php.net Both display_errors and log_errors are Off, please try enabling one of them and check if you have any error. Please also check if you have any differences compared to your 32bit setup (ini settings, fcgi module, etc). Also check your apache error log with LogLevel set to debug, eventually mod_fcgid logs, etc. [2009-04-24 13:00:44] mortals at seznam dot cz output of /usr/local/php5latest/bin/php-cgi -i http://www.korous.net/phpcgi_i.html [2009-04-24 11:53:19] lbarn...@php.net Could you please sent the output of the following command: /usr/local/php5latest/bin/php-cgi -i 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/48041 -- Edit this bug report at http://bugs.php.net/?id=48041edit=1
#48096 [Opn-Fbk]: Error reading XML string
ID: 48096 Updated by: rricha...@php.net Reported By: bbarnett at gt dot co dot cr -Status: Open +Status: Feedback Bug Type: DOM XML related Operating System: Windows 2003 Server R2 PHP Version: 5.2.9 New Comment: 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. Included script does not run because you are using functions and variables that are not included here. As I said before this is an encoding issue and I would bet it due to the values of them. Previous Comments: [2009-04-28 06:44:37] bbarnett at gt dot co dot cr This is an example of the XML string: ?xml version=1.0? X_A_PagoGen Banco2/Banco Localizacion2603460081/Localizacion NotaCredito9787/NotaCredito Correlativo82108608/Correlativo Self9/Self Monto003930/Monto Agencia1400/Agencia FechaPago20090427/FechaPago FechaCaja20090428/FechaCaja /X_A_PagoGen [2009-04-28 06:36:40] bbarnett at gt dot co dot cr Description: I'm receiving and errors when I try to read and XML string, previously generated by my code. Reproduce code: --- $doc = new DOMDocument('1.0'); $doc-formatOutput = true; $root = $doc-createElement('X_A_PagoGen'); $root = $doc-appendChild($root); $title = $doc-createElement('Banco'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($codigobanco)); $text = $title-appendChild($text); $title = $doc-createElement('Localizacion'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($localizacion)); $text = $title-appendChild($text); $title = $doc-createElement('NotaCredito'); $title = $root-appendChild($title); $text = $doc-createTextNode(llenacampo(trim($remesa),12,'0','derecha')); $text = $title-appendChild($text); $title = $doc-createElement('Correlativo'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($factura)); $text = $title-appendChild($text); $title = $doc-createElement('Self'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($self)); $text = $title-appendChild($text); $title = $doc-createElement('Monto'); $title = $root-appendChild($title); $text = $doc-createTextNode(llenacampo(trim($monto),10,'0','derecha')); $text = $title-appendChild($text); $title = $doc-createElement('Agencia'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($recaudadorCNFL)); $text = $title-appendChild($text); $title = $doc-createElement('FechaPago'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim(fecha1())); $text = $title-appendChild($text); $title = $doc-createElement('FechaCaja'); $title = $root-appendChild($title); $text = $doc-createTextNode(trim($deposito)); $text = $title-appendChild($text); $tramaxml=$doc-saveXML(); $xml2= simplexml_load_string(trim($tramaxml)); Expected result: XML Object Actual result: -- Error: Fatal Error 73: Couldn't find end of Start Tag Fech line 10 Line: 10 Column: 8 Fatal Error 77: Premature end of data in tag X_A_PagoGen line 2 Line: 10 Column: 8 -- Edit this bug report at http://bugs.php.net/?id=48096edit=1
#48079 [Bgs]: Provide a way to serialize classes to include files
ID: 48079 User updated by: php at prog dot hu Reported By: php at prog dot hu Status: Bogus Bug Type:Feature/Change Request PHP Version: 5.3.0RC1 New Comment: The purpose of the extension I'm proposing is to avoid the overhead of (re)parsing classic serialized strings, and enabling the use of opcodes caches (if present), by storing the object state in native PHP code, instead of the format used by serialize()/deserialize() (which is not native code, and thus cannot be opcode-cached, and needs to be re-parsed every time the object is loaded back). Now you recommend me to use serialize/deserialize? How does that make sense? Also __sleep() and __wakeup() is irrelevant for the problem I described, as the problem I'm having is that you can't construct (allocate space for) an object instance of a specific class (for the purpose of restoring its state from previously stored values) without calling the constructor in the first place. The latter is a problem because calling the regular constructor would require passing parameters you can't deduce from the object's state in general, thus preventing use of it in a dynamic object persistance framework. Also the constructor might execute operations that aren't desired in the case when the object is not really constructed for the first time, but loaded back from a persistent storage. That's why unserialize() doesn't call the constructor either when creating the object. This problem has nothing to do with __sleep() and __wakeup() which are called prior to and after serialization, but only _after the object instance has been allocated and its properties were restored_. The latter one is the problem I'm trying to solve, but it seems impossible with current PHP constructs (except deserialize() which is what I'm trying to circumvent). Previous Comments: [2009-04-27 08:25:44] johan...@php.net You can use the Serializeable interface or __sleep/__wakeup o do everything you want [2009-04-26 14:02:08] php at prog dot hu Description: This entry is about a feature request for a way to serialize/export complete class structures to include files. The purpose of this extensions would be to enable template systems, configuration intensive frameworks, etc. to use a persistent object storage which can take advantage of present opcode accelerators (eAccelerator, mmcache, etc), and thus avoid the overhead of classical parsing of serialized objects. Classical serialize()/unserialize() gets very slow when the serialized state grows large (100KB), and is also a waste of CPU with mostly static serialized objects, as it forces PHP to parse the serialized string over and over (even when it's more effective than direct PHP source parsing). The solution to this problem could be to provide a way to export complete objects and object structures (also including circular or back+forth references) to PHP include files, which then in turn - when stored in the file system - could be easily re-instantiated at any point without the need of a re-parse if an accelerator is present in the system. (Even if an accelerator isn't present, the overhead of parsing a var_export-style object-construction shouldn't be lot worser than parsing the output of serialize(), and shouldn't result in significantly larger output). Currently PHP provides no integral means to to such an export (var_export() fails on circular references and too deep object nesting), and even though this can be circumvented from custom PHP code (with a lot of tricks, like casting an object to an array to be able to enumerate all it's members, including hidden ones, and usage of reflection API to get the actual value of hidden member fields), there's practically no way to re-instantiate the class in/from the generated source (include), as the standard constructor can't be avoided/circumvented when re-instantiating an object, making it impossible to load an object state directly back into memory. To solve the problem PHP should provide a way to statically instantiate a class with predefined member field values (much like the __set_state() magic method, but _without the need of define this method in each classes_, and also without the method calling the normal constructor used for in-code instantiation, which defeats the purpose of serialization). This method the could be used in the generated include files to re-instantiate the class and restore it's state as it was when it was serialized. Circular references can be easily resolved with late-binding in the include, so practically the var_export() style can be preserved (with extra fixup code added after the basic construction of the object-hierarchy skeleton, to resolve the circular references). The extra method wouldn't open up any new security vulnerabilities and affect the object
#48098 [NEW]: ./configure --with-something-containing fails when LANG=et_EE.UTF-8
From: paabulaabu at gmail dot com Operating system: Ubuntu 9.04 PHP version: 5.2.9 PHP Bug Type: *Compile Issues Bug description: ./configure --with-something-containing fails when LANG=et_EE.UTF-8 Description: Solution: use [:alpha:] instead a-zA-z in various regular expressions. Bug: :/usr/src/php-5.2.9$ export LANG=et_EE.UTF-8 :/usr/src/php-5.2.9$ ./configure --with-curl configure: error: curl: invalid package name buggy code part in configure script: if test -n `echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`; then { echo configure: error: $ac_package: invalid package name 12; exit 1; } fi bug happens because Z isnt the final letter in estonian alphabet. proof of concept in shell: :~$ export LANG=en_GB.UTF-8 :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_[:alpha:]0-9]//g' :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_a-zA-Z0-9]//g' :~$ export LANG=et_EE.UTF-8 :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_a-zA-Z0-9]//g' tuvõäöüTUVÕÄÖÜ :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_[:alpha:]0-9]//g' pri...@vidrik:~$ -- Edit bug report at http://bugs.php.net/?id=48098edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48098r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48098r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48098r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48098r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48098r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48098r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48098r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48098r=needscript Try newer version: http://bugs.php.net/fix.php?id=48098r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48098r=support Expected behavior: http://bugs.php.net/fix.php?id=48098r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48098r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48098r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48098r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48098r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48098r=dst IIS Stability: http://bugs.php.net/fix.php?id=48098r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48098r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48098r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48098r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48098r=mysqlcfg
#48099 [NEW]: stat failed on a readable / writable file
From: offset at galvanet dot com Operating system: Linux PHP version: 5.2.9 PHP Bug Type: Filesystem function related Bug description: stat failed on a readable / writable file Description: is_file and filesize not working on a NFS mount. These files are readable and writable for user (Using PHP CLI). is_file and filesize working for local files. Not for NFS mounts. By the way, file_exist is working. The code is working under PHP 5.2.3 (cli). And not under PHP 5.2.9 (cli) Reproduce code: --- echo Full path : $SourceFile\n; if (!chmod($SourceFile, 0777)) { echo Unable to Chmod file\n; } clearstatcache(); if (!file_exists($SourceFile)) { echo Source file not found\n; } $FileSize = filesize($SourceFile); if (!$FileSize) { echo Source file empty !\n; } Expected result: Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 .. and continue the script Actual result: -- Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 Source file empty ! # ls -lah /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -rwxrwxrwx 1 nobody nobody 9.5M Apr 26 12:00 /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -- Edit bug report at http://bugs.php.net/?id=48099edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48099r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48099r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48099r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48099r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48099r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48099r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48099r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48099r=needscript Try newer version: http://bugs.php.net/fix.php?id=48099r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48099r=support Expected behavior: http://bugs.php.net/fix.php?id=48099r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48099r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48099r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48099r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48099r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48099r=dst IIS Stability: http://bugs.php.net/fix.php?id=48099r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48099r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48099r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48099r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48099r=mysqlcfg
#48098 [Opn]: ./configure --with-something fails when LANG=et_EE.UTF-8
ID: 48098 User updated by: paabulaabu at gmail dot com -Summary: ./configure --with-something-containing fails when LANG=et_EE.UTF-8 Reported By: paabulaabu at gmail dot com Status: Open Bug Type: *Compile Issues Operating System: Ubuntu 9.04 PHP Version: 5.2.9 New Comment: fixed summary. Previous Comments: [2009-04-28 13:04:08] paabulaabu at gmail dot com Description: Solution: use [:alpha:] instead a-zA-z in various regular expressions. Bug: :/usr/src/php-5.2.9$ export LANG=et_EE.UTF-8 :/usr/src/php-5.2.9$ ./configure --with-curl configure: error: curl: invalid package name buggy code part in configure script: if test -n `echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`; then { echo configure: error: $ac_package: invalid package name 12; exit 1; } fi bug happens because Z isnt the final letter in estonian alphabet. proof of concept in shell: :~$ export LANG=en_GB.UTF-8 :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_[:alpha:]0-9]//g' :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_a-zA-Z0-9]//g' :~$ export LANG=et_EE.UTF-8 :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_a-zA-Z0-9]//g' tuvõäöüTUVÕÄÖÜ :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_[:alpha:]0-9]//g' pri...@vidrik:~$ -- Edit this bug report at http://bugs.php.net/?id=48098edit=1
#46888 [Com]: copy() : safe_mode / allow_url_fopen does not allow opening urls
ID: 46888 Comment by: neo at nord-style dot com Reported By: php at degoulet dot net Status: Open Bug Type: Safe Mode/open_basedir Operating System: * PHP Version: 5.2.9 New Comment: Hello, I've the same problem but I don't understand how use this patch. Actually safe_mode off but it's not a solution. How and Where Am i use this : --- diff -Nur php-5.2.8/main/safe_mode.c php-5.2.8_1/main/safe_mode.c --- php-5.2.8/main/safe_mode.c 2008-07-24 18:01:59.0 +0200 +++ php-5.2.8_1/main/safe_mode.c2008-12-17 15:01:07.502862702 +0100 @@ -52,6 +52,7 @@ long uid=0L, gid=0L, duid=0L, dgid=0L; char path[MAXPATHLEN]; char *s, filenamecopy[MAXPATHLEN]; + php_stream_wrapper *wrapper = NULL; TSRMLS_FETCH(); path[0] = '\0'; @@ -72,6 +73,15 @@ mode = CHECKUID_CHECK_FILE_AND_DIR; } } + + /* +* If given filepath is a URL, allow - safe mode stuff +* related to URL's is checked in individual functions +* Possibly/likely allows for safe_mode bypass!!! +*/ + wrapper = php_stream_locate_url_wrapper(filename, NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC); + if ((wrapper != NULL) (strstr(filename, ..\/) == NULL)) + return 1; /* First we see if the file is owned by the same user... * If that fails, passthrough and check directory... --- Thx Previous Comments: [2009-03-12 13:44:07] fuxa_kos at unihost dot cz problem still in 5.2.9 [2008-12-17 15:22:50] php at degoulet dot net thanks : this workaround works fine ! [2008-12-17 14:58:32] christian at elmerot dot se The following patch restores part of behaviour from 5.2.6 yet has an extra check to see if the URL contains ../ which is where the removal came from. It is not a 100% correct fix in that it still allows for unknown URL vectors to bypass safe_mode, however, it is less broken this way for us. Perhaps the patch will help someone else. Remember, this is a safe_mode bypass issue that was fixed and the underlying cause (URLs: http: mapping to a local file incorrectly) looks to me unfixed. To me it looks as if safe_mode fails in this case but it also do no extra harm that won't be allowed with safe_mode disabled. Have I missed something? diff -Nur php-5.2.8/main/safe_mode.c php-5.2.8_1/main/safe_mode.c --- php-5.2.8/main/safe_mode.c 2008-07-24 18:01:59.0 +0200 +++ php-5.2.8_1/main/safe_mode.c2008-12-17 15:01:07.502862702 +0100 @@ -52,6 +52,7 @@ long uid=0L, gid=0L, duid=0L, dgid=0L; char path[MAXPATHLEN]; char *s, filenamecopy[MAXPATHLEN]; + php_stream_wrapper *wrapper = NULL; TSRMLS_FETCH(); path[0] = '\0'; @@ -72,6 +73,15 @@ mode = CHECKUID_CHECK_FILE_AND_DIR; } } + + /* +* If given filepath is a URL, allow - safe mode stuff +* related to URL's is checked in individual functions +* Possibly/likely allows for safe_mode bypass!!! +*/ + wrapper = php_stream_locate_url_wrapper(filename, NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC); + if ((wrapper != NULL) (strstr(filename, ..\/) == NULL)) + return 1; /* First we see if the file is owned by the same user... * If that fails, passthrough and check directory... [2008-12-17 14:44:14] php at degoulet dot net error msg : Warning: copy(): Unable to access http://www.x.com/testcopy/nok.jpg in //test.php [2008-12-17 14:17:58] php at degoulet dot net Description: copy() does not use the allow_url_fopen status ? Reproduce code: --- ?php // Fonction copie distante ne fonctionnant plus copy(http://www.xx.com/testcopy/nok.jpg;, nok_copy.jpg); ? Expected result: works fine in php 5.2.6 : with allow_url_fopen = On safe_mode = On doesn't work with the same config php 5.2.8 now, it works only if safe_mode off ? -- Edit this bug report at http://bugs.php.net/?id=46888edit=1
#48062 [Com]: file_exists() and clearstatcache() not working on network volume
ID: 48062 Comment by: dlafond at lenouvelliste dot qc dot ca Reported By: dlafond at lenouvelliste dot qc dot ca Status: Analyzed Bug Type: Filesystem function related Operating System: MacOSX Server 10.5.6 PHP Version: 5.2.9 New Comment: A workaround to get rid of this persistent stat cache when using file_exists is to combine the file_exists function with the function realpath(). $ttt=/Volumes/testdaniel/ttt.txt; if(file_exists(realpath($ttt))){ echo exists; }else{ echo not exists; } Previous Comments: [2009-04-27 15:30:57] j...@php.net Same issue as in bug #46245 [2009-04-23 15:39:27] dlafond at lenouvelliste dot qc dot ca Description: When files are saved on AFP or SMB mounted sharing, file_exists() and clearstatcache() function are not working as expected. No problem when files are saved on local disk. On AFP or SMB volume, file_exists continue to return true when the file is deleted outside of PHP. clearstatcache() function seems to have no effect. But, if the file is deleted with the unlink() function in php, file_exists return false. Reproduce code: --- ? header(Content-type: text/html); header(Expires: Mon, 26 Jul 1997 05:00:00 GMT); header(Cache-Control: no-store, no-cache,must-revalidate); header(Cache-Control: post-check=0, pre-check=0,false); header(Pragma: no-cache); clearstatcache(); $ttt=/Volumes/testdaniel/ttt.txt; #exec(touch .$ttt); #...@unlink($ttt); if(file_exists($ttt)){ echo exists; }else{ echo not exists; } clearstatcache(); ? Expected result: exists when file really exists not exists when file doesn't exists Actual result: -- exists even after the file was deleted -- Edit this bug report at http://bugs.php.net/?id=48062edit=1
#48100 [NEW]: Make serialize()d objects shorter by omitting default values
From: php at prog dot hu Operating system: PHP version: 5.3.0RC1 PHP Bug Type: Feature/Change Request Bug description: Make serialize()d objects shorter by omitting default values Description: This entry is about a feature request for the extension of the serialize() function, to optinally enable applications to store their persisent objects in a shorter, more efficient way than now. Currently serialize() stores all member fields of the objects in the output string, even if most of those member fields still have their default values as defined in their appropriate class' defintion. This is a waste of storage space and processing power at re-parse time (deserialization). Applications therefore should have the option to tell PHP to store only those member fields in serialized object descriptions, which have non-default values. This could be achieved by adding a second, optional parameter to serialize(), which (if set to true for ex) would invoke this optimized behaviour. Reloading (deserialization)of the objects stored in this optimized format should occour the same way as now (with a regular unserialize()). The modification I'm proposing has practically no compatibility impacts, as serialize() currently has no second parameter, so old code would still emit full object defintions (with all member fields included, even those with default values), and provide byte-to-byte the same output as in older version. Also unserialization would require no code change, since even in current PHP implementations, if a member field is not included in the string passed to unserialize(), the value of the field in the returned object will default to the value set forth in the class defintion field (if any). That means that the same unserialize() call could take both the old full and the new optimized strings, and would construct exactly the same object from them, provided the member fields' definitions in the class file wasn't changed in regard to the default values of those field (that's why we need to make the change optional, so applications developers can meet their choice whether they prefer speed/storage space benefits over strict compatibility, especially, that the latter one can be taken care of from application code, too). -- Edit bug report at http://bugs.php.net/?id=48100edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48100r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48100r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48100r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48100r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48100r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48100r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48100r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48100r=needscript Try newer version: http://bugs.php.net/fix.php?id=48100r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48100r=support Expected behavior: http://bugs.php.net/fix.php?id=48100r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48100r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48100r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48100r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48100r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48100r=dst IIS Stability: http://bugs.php.net/fix.php?id=48100r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48100r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48100r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48100r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48100r=mysqlcfg
#48101 [NEW]: PHP resore old session values after session_destroy
From: gianksmail at gmail dot com Operating system: Debian Lenny PHP version: 5.2.9 PHP Bug Type: Session related Bug description: PHP resore old session values after session_destroy Description: Hi, i'm having an issue with session_destroy(); This is a script sample: $_SESSION['username'] = (isset($_POST['username']))? $_POST['username']: $_SESSION['username']; In this case, after user login, than logout via session_destroy, if the user reloads the page, the first time the server raises this warning: Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 in var_dump i can see $_SESSION['username'] and $_SESSION['password'] to be unset after session_destroy. the second time, just reloading the page, these variables are set to NULL (correctly i think, missing the previous value for them). The third time the user may now access all contents as still logged in: i can see the old variables values restored as before the session destroy, now! -- Edit bug report at http://bugs.php.net/?id=48101edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48101r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48101r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48101r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48101r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48101r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48101r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48101r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48101r=needscript Try newer version: http://bugs.php.net/fix.php?id=48101r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48101r=support Expected behavior: http://bugs.php.net/fix.php?id=48101r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48101r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48101r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48101r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48101r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48101r=dst IIS Stability: http://bugs.php.net/fix.php?id=48101r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48101r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48101r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48101r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48101r=mysqlcfg
#48100 [Com]: Make serialize()d objects shorter by omitting default values
ID: 48100 Comment by: php at prog dot hu Reported By: php at prog dot hu Status: Open Bug Type:Feature/Change Request PHP Version: 5.3.0RC1 New Comment: I forgot to mention it, but of course member fields with no default values set forth in the class definition, but an actual value of NULL could be handled the same way (eg. omitted from output) in the optimized serialization mode, as member fields default to that value anyway after construction, so unserialize() would still produce the same object from the full and optimized strings. Previous Comments: [2009-04-28 13:51:17] php at prog dot hu Description: This entry is about a feature request for the extension of the serialize() function, to optinally enable applications to store their persisent objects in a shorter, more efficient way than now. Currently serialize() stores all member fields of the objects in the output string, even if most of those member fields still have their default values as defined in their appropriate class' defintion. This is a waste of storage space and processing power at re-parse time (deserialization). Applications therefore should have the option to tell PHP to store only those member fields in serialized object descriptions, which have non-default values. This could be achieved by adding a second, optional parameter to serialize(), which (if set to true for ex) would invoke this optimized behaviour. Reloading (deserialization)of the objects stored in this optimized format should occour the same way as now (with a regular unserialize()). The modification I'm proposing has practically no compatibility impacts, as serialize() currently has no second parameter, so old code would still emit full object defintions (with all member fields included, even those with default values), and provide byte-to-byte the same output as in older version. Also unserialization would require no code change, since even in current PHP implementations, if a member field is not included in the string passed to unserialize(), the value of the field in the returned object will default to the value set forth in the class defintion field (if any). That means that the same unserialize() call could take both the old full and the new optimized strings, and would construct exactly the same object from them, provided the member fields' definitions in the class file wasn't changed in regard to the default values of those field (that's why we need to make the change optional, so applications developers can meet their choice whether they prefer speed/storage space benefits over strict compatibility, especially, that the latter one can be taken care of from application code, too). -- Edit this bug report at http://bugs.php.net/?id=48100edit=1
#48093 [Bgs]: Generated index is reset due to integer overflow
ID: 48093 User updated by: Marcel dot Glacki at stud dot fh-swf dot de Reported By: Marcel dot Glacki at stud dot fh-swf dot de Status: Bogus Bug Type: Arrays related Operating System: * PHP Version: 5.2.9 New Comment: Hi, well, I checked the manual (even in other languages). But if I missed something essential let me know. What I wanted to point out is, that the manual says integers are converted to float if an integer overflow is encountered. (See: http://www.php.net/manual/en/language.types.integer.php at section Integer overflow) Furthermore the manual says about using arrays if when no index is given the array generates itself an index to use. (See: http://www.php.net/manual/en/language.types.array.php at section Creating/modifying with square bracket syntax) It says: As mentioned above, if no key is specified, the maximum of the existing integer indices is taken, and the new key will be that maximum value plus 1. So what happens when this maximum value is already MAX_INT ? It then is not converted to float and if so, it would then be truncated to integer ... and then the integer overflow comes across. Again, the manual says the MAXIMUM of the existing integer indices ... is taken and that's just not true for the code I provided in the first post and the one down below. Here's another code sample to show: ?php $max_int = 2147483647; // Max integer value on a 32-bit system $arr = array(); $arr[] = 'some'; $arr[ $max_int ] = 'values'; $arr[] = 'another'; // The max of int indices is taken +1 for this key/index $arr[] = 'value'; // This should be the same index as for value 'another' as max_int is the maximum integer indice in the array. But it doesn't happen. print_r( $arr ); ? Which prints: Array ( [0] = some [2147483647] = values [-2147483648] = another [-2147483647] = value ) Regards, Marcel Previous Comments: [2009-04-28 07:55:29] sni...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php [2009-04-27 23:02:39] Marcel dot Glacki at stud dot fh-swf dot de Description: The generated index normally has the highest integer value regarding all integers it has encountered as indexes before. (And is automatically increased by +1) It is possible to reset this index (the internal pointer) not only by the functions intended to do so (like reset()) but also by increasing it above integers' max value (integer overflow). Reproduce code: --- ?php $max_int = 2147483647; // Max value for integer on a 32-bit system $arr = array(); $arr[1] = 'one'; // New index: 2 $arr[ $max_int ] = 'two'; // New index: -2147483648 $arr[0] = 'three'; // New index: 1 (already occupied with value 'foo') $arr[] = 'failure here'; // Warning: Cannot add element to the array as the next element is already occupied. ? -- Edit this bug report at http://bugs.php.net/?id=48093edit=1
#48099 [Opn]: stat failed on a readable / writable file
ID: 48099 User updated by: offset at galvanet dot com Reported By: offset at galvanet dot com Status: Open Bug Type: Filesystem function related Operating System: Linux PHP Version: 5.2.9 New Comment: Strace on php execution return that : stat64(/home/files/3/4/0/340db92364af5c0616187f6e1db86ed7, {st_mode=S_IFREG|0444, st_size=9888768, ...}) = 0 write(2, PHP Warning: filesize(): stat f..., 139PHP Warning: filesize(): stat failed for /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 in /root/test.php on line 3 Previous Comments: [2009-04-28 13:23:26] offset at galvanet dot com Description: is_file and filesize not working on a NFS mount. These files are readable and writable for user (Using PHP CLI). is_file and filesize working for local files. Not for NFS mounts. By the way, file_exist is working. The code is working under PHP 5.2.3 (cli). And not under PHP 5.2.9 (cli) Reproduce code: --- echo Full path : $SourceFile\n; if (!chmod($SourceFile, 0777)) { echo Unable to Chmod file\n; } clearstatcache(); if (!file_exists($SourceFile)) { echo Source file not found\n; } $FileSize = filesize($SourceFile); if (!$FileSize) { echo Source file empty !\n; } Expected result: Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 .. and continue the script Actual result: -- Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 Source file empty ! # ls -lah /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -rwxrwxrwx 1 nobody nobody 9.5M Apr 26 12:00 /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -- Edit this bug report at http://bugs.php.net/?id=48099edit=1
#41712 [Com]: [PATCH] Add CURL Progress Function Callback
ID: 41712 Comment by: frase at cs dot wisc dot edu Reported By: sdteffen at gmail dot com Status: Assigned Bug Type: Feature/Change Request Operating System: SuSE Linux 10.2 PHP Version: 5CVS-2007-06-16 (CVS) Assigned To: iliaa New Comment: What happened here? A patch was offered for this feature almost two years ago, and was assigned to the maintainer a week later. The next six months saw some tweaks and corrections, and yet here we are two years later with this still languishing in assigned limbo, neither accepted and merged nor rejected and closed. Ilia? Tony? Bueller? Previous Comments: [2009-02-20 09:27:43] php41712 at brainpower dot no-ip dot org can somewone submit this to the php code as this will help a lot of users [2008-02-16 15:00:15] sdteffen at gmail dot com The last patch is missing the changes to php_curl.h from the previous patch. A file containing the complete patch with changes for both files can be found under this URL: http://sdteffen.de/php/php_curl_progress_callback.patch [2008-02-06 21:35:33] renatobraga at gmail dot com Thanks Steffen, Worked like a charm [2008-02-06 18:14:12] sdteffen at gmail dot com I've updated the patch to pass the return value from the callback function as Renato suggested: --- php-5.2.5.orig/ext/curl/interface.c 2007-10-13 13:35:35.0 +0200 +++ php-5.2.5.patch/ext/curl/interface.c2008-02-06 18:43:41.0 +0100 @@ -368,6 +368,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_HEADER); REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER); REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS); + REGISTER_CURL_CONSTANT(CURLOPT_PROGRESSFUNCTION); REGISTER_CURL_CONSTANT(CURLOPT_NOBODY); REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR); REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD); @@ -780,6 +781,87 @@ } /* }}} */ +/* {{{ curl_progress + */ +static size_t curl_progress(void *clientp, +double dltotal, +double dlnow, +double ultotal, +double ulnow) +{ + php_curl *ch = (php_curl *) clientp; + php_curl_progress *t = ch-handlers-progress; + int length = -1; + size_t rval = 0; + +#if PHP_CURL_DEBUG + fprintf(stderr, curl_progress() called\n); + fprintf(stderr, clientp = %x, dltotal = %f, dlnow = %f, ultotal = %f, ulnow = %f\n, clientp, dltotal, dlnow, ultotal, ulnow); +#endif + + switch (t-method) { + case PHP_CURL_USER: { + zval **argv[4]; + zval *zdltotal = NULL; + zval *zdlnow = NULL; + zval *zultotal = NULL; + zval *zulnow = NULL; + zval *retval_ptr; + int error; + zend_fcall_info fci; + TSRMLS_FETCH_FROM_CTX(ch-thread_ctx); + + MAKE_STD_ZVAL(zdltotal); + MAKE_STD_ZVAL(zdlnow); + MAKE_STD_ZVAL(zultotal); + MAKE_STD_ZVAL(zulnow); + + ZVAL_LONG(zdltotal, dltotal); + ZVAL_LONG(zdlnow, dlnow); + ZVAL_LONG(zultotal, ultotal); + ZVAL_LONG(zulnow, ulnow); + + argv[0] = zdltotal; + argv[1] = zdlnow; + argv[2] = zultotal; + argv[3] = zulnow; + + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = t-func_name; + fci.object_pp = NULL; + fci.retval_ptr_ptr = retval_ptr; + fci.param_count = 4; + fci.params = argv; + fci.no_separation = 0; + fci.symbol_table = NULL; + + ch-in_callback = 1; + error = zend_call_function(fci, t-fci_cache TSRMLS_CC); + ch-in_callback = 0; + if (error == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot call the CURLOPT_READFUNCTION); + length = -1; + } else if (retval_ptr) { + if (Z_TYPE_P(retval_ptr) != IS_LONG) { + convert_to_long_ex(retval_ptr); + } + if(0
#48098 [Opn-Sus]: ./configure --with-something fails when LANG=et_EE.UTF-8
ID: 48098 Updated by: j...@php.net Reported By: paabulaabu at gmail dot com -Status: Open +Status: Suspended Bug Type: Compile Failure Operating System: Ubuntu 9.04 PHP Version: 5.2.9 New Comment: Impossible to fix by PHP (completely) since most of this stuff is produced by autoconf which is 3rd party tool. Report it to the autoconf folks.. Previous Comments: [2009-04-28 13:04:08] paabulaabu at gmail dot com Description: Solution: use [:alpha:] instead a-zA-z in various regular expressions. Bug: :/usr/src/php-5.2.9$ export LANG=et_EE.UTF-8 :/usr/src/php-5.2.9$ ./configure --with-curl configure: error: curl: invalid package name buggy code part in configure script: if test -n `echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`; then { echo configure: error: $ac_package: invalid package name 12; exit 1; } fi bug happens because Z isnt the final letter in estonian alphabet. proof of concept in shell: :~$ export LANG=en_GB.UTF-8 :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_[:alpha:]0-9]//g' :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_a-zA-Z0-9]//g' :~$ export LANG=et_EE.UTF-8 :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_a-zA-Z0-9]//g' tuvõäöüTUVÕÄÖÜ :~$ echo abcdefghijklmnopqrstuvõäöüABCDEFGHIJLKMNOPQRSTUVÕÄÖÜ123456789 |sed 's/[-_[:alpha:]0-9]//g' pri...@vidrik:~$ -- Edit this bug report at http://bugs.php.net/?id=48098edit=1
#48101 [Opn-Bgs]: PHP resore old session values after session_destroy
ID: 48101 Updated by: j...@php.net Reported By: gianksmail at gmail dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: Debian Lenny PHP Version: 5.2.9 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: [2009-04-28 13:55:46] gianksmail at gmail dot com Description: Hi, i'm having an issue with session_destroy(); This is a script sample: $_SESSION['username'] = (isset($_POST['username']))? $_POST['username']: $_SESSION['username']; In this case, after user login, than logout via session_destroy, if the user reloads the page, the first time the server raises this warning: Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0 in var_dump i can see $_SESSION['username'] and $_SESSION['password'] to be unset after session_destroy. the second time, just reloading the page, these variables are set to NULL (correctly i think, missing the previous value for them). The third time the user may now access all contents as still logged in: i can see the old variables values restored as before the session destroy, now! -- Edit this bug report at http://bugs.php.net/?id=48101edit=1
#48041 [Opn-Fbk]: no headers sent if output is blank
ID: 48041 Updated by: j...@php.net Reported By: mortals at seznam dot cz -Status: Open +Status: Feedback Bug Type: CGI related Operating System: linux PHP Version: 5.2.9 New Comment: Please report this to the mod_fcgid people. It seems more like a bug in mod_fcgid since I can't reproduce it with lighttpd's fastcgi either.. Previous Comments: [2009-04-28 12:12:45] mortals at seznam dot cz it works with mod_fastcgi hmm, perhaps bug in fcgid... [2009-04-27 15:24:58] j...@php.net Can you reproduce this with mod_fastcgi? [2009-04-27 09:05:56] mortals at seznam dot cz reproduced only with version mod_fcgid 2.2. and php5.2.9 with mod_fcgid2.1 or with php5.2.8 headers are sent php5.2.9 and fcgid2.2 on 32bit system works on both system is same version of apache2.2.9 no different in ini settings, no errors after set display_errors on and no errors in apache log with loglevel debug same settings of apache and fcgid: IfModule mod_fcgid.c AddHandler fcgid-script .php SocketPath /var/tmp/fcgid-ipc IdleTimeout 60 MaxProcessCount 1000 IPCCommTimeout 30 IPCConnectTimeout 30 BusyTimeout 700 SharememPath /tmp/apache-fcgid-shm /IfModule [2009-04-24 13:38:22] lbarn...@php.net Both display_errors and log_errors are Off, please try enabling one of them and check if you have any error. Please also check if you have any differences compared to your 32bit setup (ini settings, fcgi module, etc). Also check your apache error log with LogLevel set to debug, eventually mod_fcgid logs, etc. [2009-04-24 13:00:44] mortals at seznam dot cz output of /usr/local/php5latest/bin/php-cgi -i http://www.korous.net/phpcgi_i.html 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/48041 -- Edit this bug report at http://bugs.php.net/?id=48041edit=1
#41712 [Asn-Fbk]: [PATCH] Add CURL Progress Function Callback
ID: 41712 Updated by: paj...@php.net Reported By: sdteffen at gmail dot com -Status: Assigned +Status: Feedback Bug Type: Feature/Change Request Operating System: SuSE Linux 10.2 PHP Version: 5CVS-2007-06-16 (CVS) -Assigned To: iliaa +Assigned To: pajoye New Comment: Did you test your with 5.3? If not can you post a URL to an updated patch with a test script please? It can still make it this week for 5.3+. Previous Comments: [2009-04-28 15:09:26] frase at cs dot wisc dot edu What happened here? A patch was offered for this feature almost two years ago, and was assigned to the maintainer a week later. The next six months saw some tweaks and corrections, and yet here we are two years later with this still languishing in assigned limbo, neither accepted and merged nor rejected and closed. Ilia? Tony? Bueller? [2009-02-20 09:27:43] php41712 at brainpower dot no-ip dot org can somewone submit this to the php code as this will help a lot of users [2008-02-16 15:00:15] sdteffen at gmail dot com The last patch is missing the changes to php_curl.h from the previous patch. A file containing the complete patch with changes for both files can be found under this URL: http://sdteffen.de/php/php_curl_progress_callback.patch [2008-02-06 21:35:33] renatobraga at gmail dot com Thanks Steffen, Worked like a charm [2008-02-06 18:14:12] sdteffen at gmail dot com I've updated the patch to pass the return value from the callback function as Renato suggested: --- php-5.2.5.orig/ext/curl/interface.c 2007-10-13 13:35:35.0 +0200 +++ php-5.2.5.patch/ext/curl/interface.c2008-02-06 18:43:41.0 +0100 @@ -368,6 +368,7 @@ REGISTER_CURL_CONSTANT(CURLOPT_HEADER); REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER); REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS); + REGISTER_CURL_CONSTANT(CURLOPT_PROGRESSFUNCTION); REGISTER_CURL_CONSTANT(CURLOPT_NOBODY); REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR); REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD); @@ -780,6 +781,87 @@ } /* }}} */ +/* {{{ curl_progress + */ +static size_t curl_progress(void *clientp, +double dltotal, +double dlnow, +double ultotal, +double ulnow) +{ + php_curl *ch = (php_curl *) clientp; + php_curl_progress *t = ch-handlers-progress; + int length = -1; + size_t rval = 0; + +#if PHP_CURL_DEBUG + fprintf(stderr, curl_progress() called\n); + fprintf(stderr, clientp = %x, dltotal = %f, dlnow = %f, ultotal = %f, ulnow = %f\n, clientp, dltotal, dlnow, ultotal, ulnow); +#endif + + switch (t-method) { + case PHP_CURL_USER: { + zval **argv[4]; + zval *zdltotal = NULL; + zval *zdlnow = NULL; + zval *zultotal = NULL; + zval *zulnow = NULL; + zval *retval_ptr; + int error; + zend_fcall_info fci; + TSRMLS_FETCH_FROM_CTX(ch-thread_ctx); + + MAKE_STD_ZVAL(zdltotal); + MAKE_STD_ZVAL(zdlnow); + MAKE_STD_ZVAL(zultotal); + MAKE_STD_ZVAL(zulnow); + + ZVAL_LONG(zdltotal, dltotal); + ZVAL_LONG(zdlnow, dlnow); + ZVAL_LONG(zultotal, ultotal); + ZVAL_LONG(zulnow, ulnow); + + argv[0] = zdltotal; + argv[1] = zdlnow; + argv[2] = zultotal; + argv[3] = zulnow; + + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = t-func_name; + fci.object_pp = NULL; + fci.retval_ptr_ptr = retval_ptr; + fci.param_count = 4; + fci.params = argv; + fci.no_separation = 0; + fci.symbol_table = NULL; + + ch-in_callback = 1; + error = zend_call_function(fci, t-fci_cache TSRMLS_CC); + ch-in_callback = 0; + if (error == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot call the CURLOPT_READFUNCTION);
#48099 [Opn]: stat failed on a readable / writable file in NFS mount
ID: 48099 Updated by: j...@php.net Reported By: offset at galvanet dot com Status: Open Bug Type: Filesystem function related Operating System: Linux PHP Version: 5.2.9 New Comment: This might be related to ug #45040 (And LFS support in general..) Previous Comments: [2009-04-28 14:50:36] offset at galvanet dot com Strace on php execution return that : stat64(/home/files/3/4/0/340db92364af5c0616187f6e1db86ed7, {st_mode=S_IFREG|0444, st_size=9888768, ...}) = 0 write(2, PHP Warning: filesize(): stat f..., 139PHP Warning: filesize(): stat failed for /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 in /root/test.php on line 3 [2009-04-28 13:23:26] offset at galvanet dot com Description: is_file and filesize not working on a NFS mount. These files are readable and writable for user (Using PHP CLI). is_file and filesize working for local files. Not for NFS mounts. By the way, file_exist is working. The code is working under PHP 5.2.3 (cli). And not under PHP 5.2.9 (cli) Reproduce code: --- echo Full path : $SourceFile\n; if (!chmod($SourceFile, 0777)) { echo Unable to Chmod file\n; } clearstatcache(); if (!file_exists($SourceFile)) { echo Source file not found\n; } $FileSize = filesize($SourceFile); if (!$FileSize) { echo Source file empty !\n; } Expected result: Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 .. and continue the script Actual result: -- Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 Source file empty ! # ls -lah /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -rwxrwxrwx 1 nobody nobody 9.5M Apr 26 12:00 /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -- Edit this bug report at http://bugs.php.net/?id=48099edit=1
#43462 [Opn-Fbk]: SOAPClient does not report an error if server returns an empty document
ID: 43462 Updated by: j...@php.net Reported By: andrew at is dot co dot za -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Fedora Core release 6 PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2007-11-30 10:57:26] andrew at is dot co dot za Description: SOAPClient does not report an error when it issues a request to a server and that server returns an empty document instead of a valid SOAP response. In the client.php script below, setting $break_me=false results in SOAPClient not reporting an error. Setting $break_me=true results in the SOAPFault 'looks like we got no XML document'. Both cases should return this error. Reproduce code: --- server.php: ?php $break_me = false; if ($break_me) echo Corrupt XML data; ? client.php: ?php $client = new SoapClient(dirname(__FILE__) . '/soaptest.wsdl', array('exceptions' = false)); $ret = $client-Test123(); if (is_soap_fault($ret)) echo SOAP Fault: . $ret-faultstring; else echo Result: '$ret'; ? soaptest.wsdl: ?xml version=1.0? definitions xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:tns=urn:soaptest xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; targetNamespace=urn:soaptest types xsd:schema targetNamespace=urn:soaptest/ /types message name=Test123Input/ message name=Test123Output part name=return type=xsd:string/ /message portType name=SOAPTestPortType operation name=Test123 input message=tns:Test123Input/ output message=tns:Test123Output/ /operation /portType binding name=SOAPTestBinding type=tns:SOAPTestPortType soap:binding xmlns=http://schemas.xmlsoap.org/wsdl/soap/; style=rpc transport=http://schemas.xmlsoap.org/soap/http/ operation xmlns:default=http://schemas.xmlsoap.org/wsdl/soap/; name=Test123 input xmlns:default=http://schemas.xmlsoap.org/wsdl/soap/; soap:body xmlns=http://schemas.xmlsoap.org/wsdl/soap/; use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:soaptest/ /input output xmlns:default=http://schemas.xmlsoap.org/wsdl/soap/; soap:body xmlns=http://schemas.xmlsoap.org/wsdl/soap/; use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:soaptest/ /output /operation /binding service name=SOAPTestService port xmlns:default=http://schemas.xmlsoap.org/wsdl/soap/; name=SOAPTestPort binding=tns:SOAPTestBinding soap:address xmlns=http://schemas.xmlsoap.org/wsdl/soap/; location=http://localhost/server.php/ /port /service /definitions Expected result: $ret in client.php should be a SOAPFault indicating that the server did not return an XML document Actual result: -- $ret == null, resulting in output of Result: '' There is no way do distinguish this null value from a null value legitimately returned by a function on the SOAP server. -- Edit this bug report at http://bugs.php.net/?id=43462edit=1
#43464 [Opn-Fbk]: Using 'soapenc:array' instead of 'soapenc:Array' in WSDL doc causes timeout
ID: 43464 Updated by: j...@php.net Reported By: andrew at is dot co dot za -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Fedora Core release 6 PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-10-02 14:31:45] david dot chanial at gmail dot com Yes, I confirm this bug. How to demonstrate it with strace : http://www.craigbrasssystems.com/forum/index.php?showtopic=107st=0#entry158 Please correct it :) Best regards, -- DaviXX [2007-11-30 11:20:53] andrew at is dot co dot za Description: The server.php script shown below fails with a 'PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/server.php on line 9' when executed with the supplied soaptest.wsdl file. However, if you edit soaptest.wsdl and replace 'soapenc:array' with 'soapenc:Array' (i.e., change the lower case 'a' to an upper case 'A'), then the script executes correctly. The first case should at least return an error, rather than seemingly causing the server to enter an infinite loop. Reproduce code: --- server.php: ?php class SOAPTest { public function GetArray() { return array('one', 'two', 'three'); } } $server = new SoapServer(dirname(__FILE__) . '/soaptest.wsdl'); $server-setClass('SOAPTest'); $server-handle(); ? client.php: ?php $client = new SoapClient(dirname(__FILE__) . '/soaptest.wsdl', array('exceptions' = false)); header('Content-Type: text/plain'); $ret = $client-GetArray(); if (is_soap_fault($ret)) echo SOAP Fault: . $ret-faultstring; else var_dump($ret); ? soaptest.wsdl: ?xml version=1.0? definitions xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:tns=urn:SOAPTest xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; targetNamespace=urn:SOAPTest types xsd:schema targetNamespace=urn:SOAPTest xsd:complexType name=ArrayOfString xsd:complexContent xsd:restriction base=soapenc:array xsd:attribute ref=soapenc:arrayType arrayType=xsd:string[]/ /xsd:restriction /xsd:complexContent /xsd:complexType /xsd:schema /types message name=GetArrayInput/ message name=GetArrayOutput part name=return type=tns:ArrayOfString/ /message portType name=SOAPTestPortType operation name=GetArray input message=tns:GetArrayInput/ output message=tns:GetArrayOutput/ /operation /portType binding name=SOAPTestBinding type=tns:SOAPTestPortType soap:binding xmlns=http://schemas.xmlsoap.org/wsdl/soap/; style=rpc transport=http://schemas.xmlsoap.org/soap/http/ operation xmlns:default=http://schemas.xmlsoap.org/wsdl/soap/; name=GetArray input xmlns:default=http://schemas.xmlsoap.org/wsdl/soap/; soap:body xmlns=http://schemas.xmlsoap.org/wsdl/soap/; use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:SOAPTest/ /input output xmlns:default=http://schemas.xmlsoap.org/wsdl/soap/; soap:body xmlns=http://schemas.xmlsoap.org/wsdl/soap/; use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:SOAPTest/ /output /operation /binding service name=SOAPTestService port xmlns:default=http://schemas.xmlsoap.org/wsdl/soap/; name=SOAPTestPort binding=tns:SOAPTestBinding soap:address xmlns=http://schemas.xmlsoap.org/wsdl/soap/; location=http://localhost/server.php/ /port /service /definitions Expected result: array(3) { [0]= string(3) one [1]= string(3) two [2]= string(5) three } Actual result: -- SOAP Fault: Maximum execution time of 30 seconds exceeded -- Edit this bug report at http://bugs.php.net/?id=43464edit=1
#43991 [Opn-Bgs]: Content-Length in HTTP header from PHP SOAP wrong
ID: 43991 Updated by: j...@php.net Reported By: s dot slater at cabletime dot com -Status: Open +Status: Bogus Bug Type: SOAP related Operating System: Windows Vista + IIS7.0 PHP Version: 5.2.5 New Comment: No need to keep this report open then. We have other reports about similar issue with active users. Previous Comments: [2009-04-20 10:12:19] s dot slater at cabletime dot com We are no longer using the PHP SOAP interface, but for the benefit of anyone reading this report I never tried Win2003 Server or IIS6, only the environments listed in the report. [2009-04-08 07:20:47] zkroecher at gingco dot net Okay, we probably found the problem: In our case there was a BOM anywhere in the included PHP Files of our App. Now that we removed it this problem doesn't occur anymore an we get wellformed XML with correct Content-Length. But we reproduced the same error on a Win2003 Server with IIS6 before as well. Submitter S Dot Slater tested this but couldn't reproduce the problem on such an environment. [2009-03-31 08:34:15] zkroecher at gingco dot net We have the same problem on Windows 2008 Server with IIS7, using php5ispai.dll. No solution yet? [2008-01-31 12:13:12] s dot slater at cabletime dot com Description: PHP SOAP seems to return an incorrect Content-Length in the HTTP header (8 bytes too small) which causes a problem with IIS7 on Windows Vista. Note that the incorrect value is present but does not cause a problem with IIS5.1 on XP or with Apache on Vista, XP or Linux. You don't see any symptoms unless using IIS7. Reproduce code: --- The problem seems to occur on any response I get from PHP SOAP. Used 5.2.5 installed with Windows installer with SOAP + PDO SQLite modules and running as CGI Expected result: Looking at a specific example with Wireshark on various servers, the full body of the SOAP response consists of 578 bytes: SP CR LF 569 bytes of XML LF SP CR LF CR LF I would expect the HTTP header to include Content-Length: 578 Actual result: -- The HTTP header contains Content-Length: 570 What I actually receive in the client is: With IIS7: 570 bytes of body, so the last two bytes of the XML are truncated and my Java applet client software won't parse it With IIS5.1: 570 bytes of body followed by a second HTTP packet containing the last 8 bytes, which works With Apache: The whole response in one HTTP packet with no truncation, which works So the SOAP communication still works OK on the older IIS and Apache even with the incorrect content length, but on each message sent by vista the response ends with /SOAP-ENV:Envelop and the e and terminating bytes are missing. -- Edit this bug report at http://bugs.php.net/?id=43991edit=1
#44248 [Opn-Fbk]: RFC2616 transgression while HTTPS request through proxy with SoapClient object
ID: 44248 Updated by: j...@php.net Reported By: jboffel at gmail dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Linux RedHat Enterprise PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-02-25 22:03:51] jboffel at gmail dot com Description: Configure line : No need for a configure line here, just need the php extension soap.so Setup : You have to make a soap call on an https based webservice through an Apache proxy (Apache or any proxy which is following rfc2616). Explanation : When you make an HTTPS connection in HTTP/1.1 through a proxy you MUST include an host parameter in the HTTP header like that : CONNECT uri-test:443 HTTP/1.1 Host: uri-test And what's done today is : CONNECT uri-test:443 HTTP/1.1 So we're clearly missing the Host parameter like explaining below, rfc2616 require this : A client MUST include a Host header field in all HTTP/1.1 request messages . If the requested URI does not include an Internet host name for the service being requested, then the Host header field MUST be given with an empty value. An HTTP/1.1 proxy MUST ensure that any request message it forwards does contain an appropriate Host header field that identifies the service being requested by the proxy. All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field. The problem is based in php_http.c in ext/soap/ of ANY existing version of PHP (not only 5.2.5) Well, there is two possible fix at least : 1) Add after line 169 : smart_str_append_const(soap_headers, Host: ); smart_str_appends(soap_headers, phpurl-host); smart_str_append_const(soap_headers, \r\n); The problem here is that I'm NOT sure that every time in HTTPS connection we need to put exactly the value of phpurl-host. For example I don't know if it's possible to be in a situation like this : (IP like x.x.x.x) CONNECT IP:443 HTTP/1.1 Host: www.test.com If yes, this fix is not perfect. 2) Modify line 169 from : smart_str_append_const(soap_headers, HTTP/1.1\r\n); to : smart_str_append_const(soap_headers, HTTP/1.0\r\n); Of course solution 2 force us to downgrade to protocol HTTP/1.0 which won't be able to access HTTPS virtualhosted website on a single IP address. Reproduce code: --- Short script : ?php $client = new SoapClient(some.wsdl, array('proxy_host'=localhost, 'proxy_port'= 8080,'uri'=https://test-uri/;)); $client-SomeFunction($a, $b, $c); ? Expected result: HTTP header like that : CONNECT uri-test:443 HTTP/1.1 Host: uri-test Actual result: -- CONNECT uri-test:443 HTTP/1.1 -- Edit this bug report at http://bugs.php.net/?id=44248edit=1
#44332 [Opn-Fbk]: Construct SoapClient against Java6 running Axis2 causes page to download
ID: 44332 Updated by: j...@php.net Reported By: nick at stinemates dot org -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Linux - Gentoo PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-03-04 20:08:29] nick at stinemates dot org Description: The summary basically states the issue. I wrote a simple client which connects to a Java1.6.03 Axis2 implementation of SOAP and, whenever: $client = new SoapClient($url_to_wsdl); is called, instead of displaying ANY text on the page, the browser thinks it should download the resulting php file. I have tested it with the following browser: Mozilla, Links, Lynx, W3M, Python urllib.urlopen. If I point the WSDL url to something which is running the same software, Java 1.5.09-1.5.14, the request completes as expected. Reproduce code: --- $client = new SoapClient($url_to_wsdl); Expected result: It is executed appropriately Actual result: -- Page attempts to download -- Edit this bug report at http://bugs.php.net/?id=44332edit=1
#44383 [Opn-Fbk]: PHP DateTime not converted to xsd:datetime
ID: 44383 Updated by: j...@php.net Reported By: kevin dot craft at gmail dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Windows XP -PHP Version: 5.2.5 +PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-12-10 13:44:17] martijn dot zijlstra at gmail dot com still not fixed in 5.2.6-0.dotdeb.1 [2008-06-30 12:00:56] r dot janssen at keensystems dot eu I am, too, looking for a solution for this problem. I can specify parameters as dateTime type but when generating the WSDL the generation stops and does nothing. [2008-05-13 04:40:11] barth at pbx-network dot de Anyone has a soluiton or workaround for this issue? How can a date/time been passed over to a webservice endpoint? [2008-03-17 01:17:47] kevin dot craft at gmail dot com Exactly. The SOAP extension should know what format to output the DateTime as because it should be specified as a W3C standard somewhere in the SOAP or XML Schema definition. When the SOAP extension encounters an xsd:datetime (or related type), it should output the DateTime object according to the standard for that type. [2008-03-16 07:09:07] der...@php.net We can't add __toString() to the date class, as it would have no idea on which format to use to render it. So it should be done in the SOAP ext. 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/44383 -- Edit this bug report at http://bugs.php.net/?id=44383edit=1
#44469 [Opn-Fbk]: problems with creating xml from array(SOAPCLIENT)
ID: 44469 Updated by: j...@php.net Reported By: potyomkine at gmail dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: FreeBSD PHP Version: 5.2.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-10-02 19:16:43] bugs dot php dot net at ceesco dot com I think the SOAP client can't handle complex types and nested nodes. [2008-04-07 15:41:11] aurelien at proprenetworks dot net Maybe the same bug here with a simple case : The array used to construct the xml ?php $param_searchPlace = array( 'idProduct' ='15', 'idSite' ='17' ); $param_ctx = array( 'idUser' ='someUser', 'password'='somePassword', 'language'='fr', 'arrival' ='2008-10-01T00:00:00+02:00', 'duration'='P5D', 'person' ='4', 'deltaArrival'='3', 'deltaDuration' ='2', 'searchPlace' =$param_searchPlace ); $parametres = array( 'RequestCpgAvailability' =$param_ctx ); ? The resulting XML : soap-env:body ns1:cpg_Availability RequestCpgAvailability_1 idUsersomeUser/idUser passwordsomePassword/password languagefr/language arrival2008-10-01T00:00:00+02:00/arrival deltaArrival3/deltAarrival deltaDuration2/deltaDuration durationP5D/duration person4/person searchPlace idProduct idSite17/idSite /idProduct /searchPlace /RequestCpgAvailability_1 /ns1:cpg_Availability /soap-env:body The expected XML : soap-env:body ns1:cpg_Availability RequestCpgAvailability_1 idUsersomeUser/idUser passwordsomePassword/password languagefr/language arrival2008-10-01T00:00:00+02:00/arrival deltaArrival3/deltAarrival deltaDuration2/deltaDuration durationP5D/duration person4/person searchPlace idProduct15/idProduct idSite17/idSite /searchPlace /RequestCpgAvailability_1 /ns1:cpg_Availability /soap-env:body [2008-03-18 15:40:03] potyomkine at gmail dot com Description: problem with creating xml from array I call function $client = new SoapClient(WSDL); $client-function($arr); where var_dump($arr) === array(1) { [Items]= array(1) { [BatchFileItem]= array(1) { [0]= array(9) { [ProgMFG]= string(13) progmfg-0 [ProdLine]= string(14) prodline-0 [ArtNumber]= string(9) art-0 [Vendor]= string(5) Luval [Measure]= string(2) kg [Group]= string(10) skovorodki [Cube]= string(8) 232.5655 [Weight]= string(9) 2323.2323 [DescriptionList]= array(1) { [LocalizedDescription]= array(3) { [0]= array(2) { [Language]= string(2) EN [Description]= array(2) { [Short]= string(15) eng short descr [Long]= string(24) english long description } } [1]= array(2) { [Language]= string(2) RU [Description]= array(2) { [Short]= string(15) rus short descr [Long]= string(24) russian long description } } [2]= array(2) { [Language]= string(2) RU [Description]= array(2) { [Short]= string(15) rus short descr [Long]= string(24) russian long description } } } } } } } } but when I see request it is look like this ?xml version=1.0 encoding=UTF-8? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://localhost/; SOAP-ENV:Body ns1:function ns1:Items ns1:BatchFileItem ns1:ProgMFGprogmfg-0/ns1:ProgMFG ns1:ProdLineprodline-0/ns1:ProdLine ns1:ArtNumberart-0/ns1:ArtNumber ns1:VendorLuval/ns1:Vendor ns1:Measurekg/ns1:Measure
#45084 [Opn-Fbk]: SoapServer Don't Work at Windows Vista
ID: 45084 Updated by: j...@php.net Reported By: neumann at ntech dot com dot br -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Windows Vista PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ And instead of localhost try 127.0.0.1 :) Previous Comments: [2008-08-12 23:24:54] neumann at ntech dot com dot br the error returned is: PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\\wwwroot\\soap\\HelloClient.php The error don't occurs with the same script running at XP or Linux. I turn off the firewall, was increased the PHP parameter 'max_execution_time' but allways return the same error. [2008-06-02 12:08:32] albert at insad dot nl Did you check your firewall rules? To me it looks like Vista is blocking you :) [2008-06-02 06:42:35] ka...@php.net Have you checked your error log for any errors? When I try to run the reproduce script I get a maximum execution error, I've seen on some setups that PHP errors mixed with output buffering may cause HTTP 500 errors. [02-Jun-2008 08:37:56] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\webserver\www\HelloClient.php on line 9 [2008-05-24 00:59:42] neumann at ntech dot com dot br Description: If I execute HelloClient.php with the HelloServer.php at windows vista, don't work(error 500). If I Copy the same HelloServer.php to another server, and execute the same HelloClient.php at Windows Vista, it work well... PS:. Remember to change the param location in HelloClient.php, point it to the HelloServer.php location URL. Reproduce code: --- ?php #HelloClient.php $client = new SoapClient(null, array( 'location' = http://localhost/soap/HelloServer.php;, 'uri' = http://localhost/;, 'trace'= 1 )); $return = $client-__soapCall(hello,array(world)); echo $return; ? * ?php #HelloServer.php function hello($someone) { return new SoapParam(Hello . $someone . !,myparam); } $server = new SoapServer(null, array('uri' = http://localhost/;)); $server-addFunction(hello); $server-handle(); ? Expected result: display the text: Hello world! Actual result: -- http server error 500 -- Edit this bug report at http://bugs.php.net/?id=45084edit=1
#45155 [Opn-Fbk]: Constructors not called when using classmap option in SoapClient
ID: 45155 Updated by: j...@php.net Reported By: david at globulebleu dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: * PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2009-02-03 09:44:08] r dot swets at gmail dot com i can imagine that instead of using the constructor, the __wakeup method is called. [2008-06-03 09:43:30] david at globulebleu dot com Description: When using classmap to map the SOAP results to a class, the constructor of the object you've mapped to is not called. Reproduce code: --- $client = new SoapClient(url_to_wsdl, array('classmap' = array('contact' = Contact)); $params = array(1); $contact = $client-__soapCall(get_contact, $params); Expected result: A contact object that has properties initialized (i.e. db connections, ...). Actual result: -- A contact object without the properties. -- Edit this bug report at http://bugs.php.net/?id=45155edit=1
#45282 [Opn-Ver]: SoapClient has namespace issues when WSDL is distributed
ID: 45282 Updated by: j...@php.net Reported By: Martin dot Bosslet at googlemail dot com -Status: Open +Status: Verified Bug Type: SOAP related -Operating System: Windows XP SP2 +Operating System: * -PHP Version: 5.2.6 +PHP Version: 5.*, 6CVS (2009-04-28) Previous Comments: [2008-12-12 18:13:38] clwells at nocworx dot com This WSDL exhibits this behavior: http://www.swsoft.com/webservices/vza/4.0.0/VZA.wsdl [2008-06-16 15:54:52] Martin dot Bosslet at googlemail dot com Description: I have tried to access a web service whose WSDL is distributed among several files each of which contains references to several further XSDs. Now the WSDL itself is valid, as .NET or Java clients have accessed the services without any problems. But when creating a new instance of SoapClient it fails because I'm told that a certain element has already been defined. The problem is, that there are message elements with the same name, but they DO differ in namespaces. Reproduce code: --- $client = new SoapClient('someURI'); /* Please email me to get a copy of the WSDLs producing the error. They're too large to be posted here (although I tried to keep them small already) and I have no facility to make them available online. */ Expected result: No error when parsing the WSDL. Actual result: -- SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: 'Element' already defined in FILE -- Edit this bug report at http://bugs.php.net/?id=45282edit=1
#45308 [Opn-Fbk]: SoapClient() does not use the https cert to fetch the wsdl file
ID: 45308 Updated by: j...@php.net Reported By: edman007 at edman007 dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Linux PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-06-19 02:22:59] edman007 at edman007 dot com Description: when using the local_cert/passphrase options to soapclient() soapclient will not use the https cert specified with local_cert to connect to the server that contains the wsdl file (it will however use it when making the actual soap request). I understand that this may not always be needed, but their should be no reason that a wsdl file need to be public, so maybe there could be an option to use the local_cert/passphrase when fetching the wsdl (and automatically disable wsdl cache for those urls if need be [not sure if you guys consider that a security issue]) Reproduce code: --- $mailer = new SoapClient(EMAIL_ACCESS_URL, array('classmap', $wsdl_classmap, 'local_cert' = EMAIL_HTTPS_CERT,'passphrase' = EMAIL_CERT_PASS)); Expected result: not throw an error Actual result: -- throws error saying it cannot parse the wsdl...which is very misleading, it mentions about errors fetching the file Note: It can be worked around by fetching it with curl and writing to a temp file and using that to construct the SoapClient() object -- Edit this bug report at http://bugs.php.net/?id=45308edit=1
#45404 [Opn-Fbk]: SoapClient.__getTypes don't care about inheritance
ID: 45404 Updated by: j...@php.net Reported By: oamblet at vmware dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: MacOSX 10.5 PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-07-01 14:59:22] oamblet at vmware dot com Perhaps a good alternative could be to add the extension information in the output of __getTypes(). [2008-07-01 14:42:39] oamblet at vmware dot com Description: the __getTypes() function return a list of structs which represents the various types from the parsed WSDL. However, the inherited attributes are not listed in the struct. It becomes hard to introspect a WSDL file with this __getTypes() give this limitation. Reproduce code: --- Given this WSDL fragment: ... xs:element name=Entry type=tns:Entry/ xs:element name=ManagedEntry type=tns:ManagedEntry/ xs:complexType name=ManagedEntry xs:complexContent xs:extension base=tns:Entry xs:sequence xs:element minOccurs=0 name=id type=xs:string/ xs:element minOccurs=0 name=stringRepresentation type=xs:string/ /xs:sequence /xs:extension /xs:complexContent /xs:complexType xs:complexType name=Entry xs:sequence xs:element minOccurs=0 name=name type=xs:string/ xs:element maxOccurs=unbounded minOccurs=0 name=properties nillable=true type=tns:EntryProperty/ xs:element minOccurs=0 name=type type=xs:string/ /xs:sequence /xs:complexType ... ?php $client = new SoapClient(http://x.x.x.x/echo?WSDL;); $client-__getTypes(); ? Expected result: [ struct ManagedEntry { string id; string stringRepresentation; string name; EntryProperty properties; string type; }, struct Entry { string name; EntryProperty properties; string type; } ] Actual result: -- [ struct ManagedEntry { string id; string stringRepresentation; }, struct Entry { string name; EntryProperty properties; string type; } ] -- Edit this bug report at http://bugs.php.net/?id=45404edit=1
#46203 [Opn-Fbk]: Error Fetching HTTP header
ID: 46203 Updated by: j...@php.net Reported By: kk86bioinfo at gmail dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Vista PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-09-30 17:02:15] kk86bioinfo at gmail dot com Description: I have an error Error Fetching HTTP header... when trying to use webservices from Interpro (WSInterproScan). My script run well before. Reproduce code: --- # URL for the service WSDL $wsdlUrl= 'http://www.ebi.ac.uk/Tools/webservices/wsdl/WSInterProScan.wsdl'; # Get the object from the WSDL $proxy = new SoapClient($wsdlUrl, array(user_agent=eudbase)); $params = array(); $params['email'] = 'kk86bioi...@gmail.com'; $params['seqtype'] = 'P'; $data = array(); $data[0]['type'] = 'sequence'; $data[0]['content'] = cn1\nMWCAMGQVFEELSKESEAIRCYERARDCDEDEDSIALAKLAEGYEKMAREAAKDGRQ; $jobId = $proxy-runInterProScan($params, $data); echo $jobId\n; Expected result: I should received the job submission ID for the service. Actual result: -- 1AA0ED3D70F28F23 (generated randomly from the service) -- Edit this bug report at http://bugs.php.net/?id=46203edit=1
#46113 [Opn-Fbk]: SOAP can't handle ZIP response
ID: 46113 Updated by: j...@php.net Reported By: syabro at gmail dot com -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Windows XP PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-09-19 05:57:51] syabro at gmail dot com OK I'll try to say more. I try use standart SoapClient to work with SOAP service at http://portal.crog.ru/spo.asmx?WSDL with WS-Security and WS- Addressing with libraries http://www.cdatazone.org/index.php?/pages/source.html and use modified script from http://www.cdatazone.org/files/soap-wsa-example.phps sources to reproduce error are here http://sybro.com/capital.zip php -f parse.php When I call SOAP method GetSpoPartById I get segmentation fault on php5.2.6 under windows xp and linux debian etch Let's see CapitalTourUpdater::getSpoByGuid() ... public function getSpoByGuid( $guid ) { // error produced here - segmentation fault // soapClient extended from SoapClient $response = $this-soapClient-GetSpoPartById( array('id'=$guid) ); var_dump( $response ); } By the way SOAP method GetSpoCardLog calls normally Let's see CapitalTourUpdater::getUpdatedSpoGuids() //normal executin of Soap call $response = $this-soapClient-GetSpoCardLog($arrParameters_Query); With HTTP sniffer I've seen that request goes to server, and server return valid response As I write before response's example available at http://syabro.com/response.xml Linux callstack: gdb php gdb run -f parse.php gdbbt #0 0x2ba6682085d0 in strlen () from /lib/libc.so.6 #1 0x005ce244 in delete_encoder () #2 0x005cfc6d in master_to_zval () #3 0x005d002c in master_to_zval () #4 0x005d071f in master_to_zval () #5 0x005ce56b in get_conversion () #6 0x005cff0a in master_to_zval () #7 0x005cfe62 in master_to_zval () #8 0x005d071f in master_to_zval () #9 0x005ce56b in get_conversion () #10 0x005d014e in master_to_zval () #11 0x005cfe62 in master_to_zval () #12 0x005d071f in master_to_zval () #13 0x005ce56b in get_conversion () error in parsing SOAP Response packet #14 0x005df61a in parse_packet_soap () - --- #15 0x005c8313 in zim_SoapClient_SoapClient () #16 0x005c8b82 in zim_SoapClient___call () #17 0x00700c0d in zend_call_function () #18 0x0071f5d4 in zend_call_method () #19 0x00726191 in zend_std_call_user_call () #20 0x2ba668795f8a in xdebug_execute_internal (current_execute_data=0x7fff444ae010, return_value_used=1) at /home/xen/img/deb/xdebug-2.0.0/xdebug-2.0.0/xdebug.c:1570 #21 0x00739148 in execute () #22 0x007296a3 in execute () #23 0x2ba668795c40 in xdebug_execute (op_array=0x2ba2a798) at /home/xen/img/deb/xdebug-2.0.0/xdebug-2.0.0/xdebug.c:1506 #24 0x00738da5 in execute () #25 0x007296a3 in execute () #26 0x2ba668795c40 in xdebug_execute (op_array=0x2ba22b30) at /home/xen/img/deb/xdebug-2.0.0/xdebug-2.0.0/xdebug.c:1506 #27 0x0070b603 in zend_execute_scripts () #28 0x006cbb98 in php_execute_script () #29 0x0078862b in main () [2008-09-18 11:09:59] syabro at gmail dot com Hm... I said wrong. Request is not zipped. It's CONTAINS zip in response. If you look in my response example U'll see an CDATA content with zip. [2008-09-18 10:59:33] paj...@php.net Does it use the stream zip format? Like what is available in java's soap or rpc? [2008-09-18 10:21:25] syabro at gmail dot com Probally error occurs wher SOAPClient tried to parse zipped data in data tag or with CDATA section. [2008-09-18 10:12:03] syabro at gmail dot com Description: When soap response is zipped php fails with windows error Memory can't be read. Reproduce code: --- Response example: http://syabro.com/response.xml Expected result: String variable, that contain's zip. -- Edit this bug report at http://bugs.php.net/?id=46113edit=1
#46121 [Opn-Fbk]: SoapServer doesn't support SOAP 1.2 in WSDL-Mode
ID: 46121 Updated by: j...@php.net Reported By: d dot reiche at gmx dot ch -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Linux PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-09-19 09:35:20] d dot reiche at gmx dot ch Description: When creating a SoapServer in WSDL-Mode the server fails to import the SOAP-1.2 compliant WSDL with a error message stating that the SOAP 1.2 HTTP transport binding is not supported. However this transport binding is necessary for clients in other languages (i.e. axis2/java) to handle the messages correctly. Currently, the SoapServer only handles SOAP 1.1 compliant bindings correctly (using: schema: http://schemas.xmlsoap.org/wsdl/soap/ transport: http://schemas.xmlsoap.org/soap/http ). SOAP 1.2 compliant bindings require both of the following schemas to be present: schema: http://schemas.xmlsoap.org/wsdl/soap12/ transport: http://www.w3.org/2003/05/soap/bindings/HTTP/ Reproduce code: --- Set up a WSDL file with the following entries: wsdl:definitions ... xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap12/; ... !-- snip : types, messages and porttype -- wsdl:binding name=test type=tns:test soap:binding style=rpc transport=http://www.w3.org/2003/05/soap/bindings/HTTP/; / !-- snip: binding operations and the service element-- Setup a SoapServer using: ?php $SoapServer = new SoapServer( 'test.wsdl', array( 'soap_version'= SOAP_1_2, 'uri' = 'http://example.org/test/', 'encoding'= 'UTF-8', )); $SoapServer-setClass('test'); $SoapServer-handle(); ? and a testclass that handles the requests. Expected result: the Service should be callable Actual result: -- SOAP-ENV:Envelope SOAP-ENV:Body SOAP-ENV:Fault faultcodeWSDL/faultcode faultstring SOAP-ERROR: Parsing WSDL: PHP-SOAP doesn't support transport 'http://www.w3.org/2003/05/soap/bindings/HTTP/' /faultstring /SOAP-ENV:Fault /SOAP-ENV:Body /SOAP-ENV:Envelope -- Edit this bug report at http://bugs.php.net/?id=46121edit=1
#48099 [Opn-Fbk]: stat failed on a readable / writable file in NFS mount
ID: 48099 Updated by: j...@php.net Reported By: offset at galvanet dot com -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Linux PHP Version: 5.2.9 New Comment: As I don't have any NFS mounted stuff available anywhere, can you try this: # CFLAGS=`getconf LFS_CFLAGS` ./config.nice # make clean make And then try that script of yours. Previous Comments: [2009-04-28 18:14:00] j...@php.net This might be related to ug #45040 (And LFS support in general..) [2009-04-28 14:50:36] offset at galvanet dot com Strace on php execution return that : stat64(/home/files/3/4/0/340db92364af5c0616187f6e1db86ed7, {st_mode=S_IFREG|0444, st_size=9888768, ...}) = 0 write(2, PHP Warning: filesize(): stat f..., 139PHP Warning: filesize(): stat failed for /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 in /root/test.php on line 3 [2009-04-28 13:23:26] offset at galvanet dot com Description: is_file and filesize not working on a NFS mount. These files are readable and writable for user (Using PHP CLI). is_file and filesize working for local files. Not for NFS mounts. By the way, file_exist is working. The code is working under PHP 5.2.3 (cli). And not under PHP 5.2.9 (cli) Reproduce code: --- echo Full path : $SourceFile\n; if (!chmod($SourceFile, 0777)) { echo Unable to Chmod file\n; } clearstatcache(); if (!file_exists($SourceFile)) { echo Source file not found\n; } $FileSize = filesize($SourceFile); if (!$FileSize) { echo Source file empty !\n; } Expected result: Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 .. and continue the script Actual result: -- Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 Source file empty ! # ls -lah /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -rwxrwxrwx 1 nobody nobody 9.5M Apr 26 12:00 /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -- Edit this bug report at http://bugs.php.net/?id=48099edit=1
#47596 [Csd-Asn]: Bus error on parsing file
ID: 47596 Updated by: paj...@php.net Reported By: pahan at hubbitus dot info -Status: Closed +Status: Assigned Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.3.0beta1 -Assigned To: scottmac +Assigned To: dmitry New Comment: reopen as the fix is temporary and ugly :) Previous Comments: [2009-03-26 17:32:31] dmi...@php.net 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. [2009-03-22 01:19:06] sh...@php.net This is being caused because of mis-use of mmap(). We are currently relying on mmap to pad the end of our mmap'd file with zeros for detection of EOF in the scanner and scanning ahead. We specifically add ZEND_MMAP_AHEAD to the len passed to mmap in zend_stream_fixup(): /* *buf[size] is zeroed automatically by the kernel */ *buf = mmap(0, size + ZEND_MMAP_AHEAD, PROT_READ, MAP_PRIVATE, fileno(file_handle-handle.fp), 0); But AFAIK mmap does not support this usage of the len parameter, as it's a limit rather than able to extend the mmap region. This appears to work under most cases as mmap will pad zeroes up to PAGESIZE. This error will occur anytime we use mmap in this way on a file that is not ZEND_MMAP_AHEAD bytes less than PAGESIZE and therefore attempt to access a byte over PAGESIZE. It will be easy to fix the mmap calls, however this will break the re2c scanner. Originally for the EOF checks I was going to re-implement YYFILL to malloc additional space for the scanner after EOF, this may be an option to correct this. [2009-03-10 18:23:04] scott...@php.net Looks like something in the re2c stuff that's causing it to overread. [2009-03-10 18:13:53] pahan at hubbitus dot info No, as I also mentioned abowe, this is not require any externul stuff (include_path=: even . dir not contain!, so, can't be include files). [2009-03-10 16:59:28] j...@php.net That script requires some external crap that is NOT included. At least provide ALL the files necessary to run the script. Otherwise the next status this report gets is Bogus. 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/47596 -- Edit this bug report at http://bugs.php.net/?id=47596edit=1
#44248 [Fbk-Opn]: RFC2616 transgression while HTTPS request through proxy with SoapClient object
ID: 44248 User updated by: jboffel at gmail dot com Reported By: jboffel at gmail dot com -Status: Feedback +Status: Open Bug Type: SOAP related Operating System: Linux RedHat Enterprise PHP Version: 5.2.5 New Comment: I checked source code of last CVS snapshot you gave with your link. I can't easily test in same conditions than before so I just compared source code. I could be wrong but I'm pretty sure there is no difference and that the bug is still present. smart_str_append_const(soap_headers, CONNECT ); smart_str_appends(soap_headers, phpurl-host); smart_str_appendc(soap_headers, ':'); smart_str_append_unsigned(soap_headers, phpurl-port); smart_str_append_const(soap_headers, HTTP/1.1\r\n); proxy_authentication(this_ptr, soap_headers TSRMLS_CC); smart_str_append_const(soap_headers, \r\n); proxy_authentication just add basic auth if necessary. Nothing to do with Host: header parameter. And it's still in HTTP/1.1, so for me, no news. Previous Comments: [2009-04-28 18:36:31] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-02-25 22:03:51] jboffel at gmail dot com Description: Configure line : No need for a configure line here, just need the php extension soap.so Setup : You have to make a soap call on an https based webservice through an Apache proxy (Apache or any proxy which is following rfc2616). Explanation : When you make an HTTPS connection in HTTP/1.1 through a proxy you MUST include an host parameter in the HTTP header like that : CONNECT uri-test:443 HTTP/1.1 Host: uri-test And what's done today is : CONNECT uri-test:443 HTTP/1.1 So we're clearly missing the Host parameter like explaining below, rfc2616 require this : A client MUST include a Host header field in all HTTP/1.1 request messages . If the requested URI does not include an Internet host name for the service being requested, then the Host header field MUST be given with an empty value. An HTTP/1.1 proxy MUST ensure that any request message it forwards does contain an appropriate Host header field that identifies the service being requested by the proxy. All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field. The problem is based in php_http.c in ext/soap/ of ANY existing version of PHP (not only 5.2.5) Well, there is two possible fix at least : 1) Add after line 169 : smart_str_append_const(soap_headers, Host: ); smart_str_appends(soap_headers, phpurl-host); smart_str_append_const(soap_headers, \r\n); The problem here is that I'm NOT sure that every time in HTTPS connection we need to put exactly the value of phpurl-host. For example I don't know if it's possible to be in a situation like this : (IP like x.x.x.x) CONNECT IP:443 HTTP/1.1 Host: www.test.com If yes, this fix is not perfect. 2) Modify line 169 from : smart_str_append_const(soap_headers, HTTP/1.1\r\n); to : smart_str_append_const(soap_headers, HTTP/1.0\r\n); Of course solution 2 force us to downgrade to protocol HTTP/1.0 which won't be able to access HTTPS virtualhosted website on a single IP address. Reproduce code: --- Short script : ?php $client = new SoapClient(some.wsdl, array('proxy_host'=localhost, 'proxy_port'= 8080,'uri'=https://test-uri/;)); $client-SomeFunction($a, $b, $c); ? Expected result: HTTP header like that : CONNECT uri-test:443 HTTP/1.1 Host: uri-test Actual result: -- CONNECT uri-test:443 HTTP/1.1 -- Edit this bug report at http://bugs.php.net/?id=44248edit=1
#41712 [Fbk-Opn]: [PATCH] Add CURL Progress Function Callback
ID: 41712 User updated by: sdteffen at gmail dot com Reported By: sdteffen at gmail dot com -Status: Feedback +Status: Open Bug Type: Feature/Change Request Operating System: SuSE Linux 10.2 PHP Version: 5CVS-2007-06-16 (CVS) Assigned To: pajoye New Comment: Thanks for responding to this issue. I've updated and tested the patch once more with the PHP_5_3 sources from CVS today: http://sdteffen.de/php/php_curl_progress_callback.patch The test script is the same as mentioned under Reproduce code, but I've added an explanatory comment to the version on my website: http://sdteffen.de/php/index_en.html Previous Comments: [2009-04-28 18:10:56] paj...@php.net Did you test your with 5.3? If not can you post a URL to an updated patch with a test script please? It can still make it this week for 5.3+. [2009-04-28 15:09:26] frase at cs dot wisc dot edu What happened here? A patch was offered for this feature almost two years ago, and was assigned to the maintainer a week later. The next six months saw some tweaks and corrections, and yet here we are two years later with this still languishing in assigned limbo, neither accepted and merged nor rejected and closed. Ilia? Tony? Bueller? [2009-02-20 09:27:43] php41712 at brainpower dot no-ip dot org can somewone submit this to the php code as this will help a lot of users [2008-02-16 15:00:15] sdteffen at gmail dot com The last patch is missing the changes to php_curl.h from the previous patch. A file containing the complete patch with changes for both files can be found under this URL: http://sdteffen.de/php/php_curl_progress_callback.patch [2008-02-06 21:35:33] renatobraga at gmail dot com Thanks Steffen, Worked like a charm 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/41712 -- Edit this bug report at http://bugs.php.net/?id=41712edit=1
#41712 [Opn-Asn]: [PATCH] Add CURL Progress Function Callback
ID: 41712 Updated by: paj...@php.net Reported By: sdteffen at gmail dot com -Status: Open +Status: Assigned Bug Type: Feature/Change Request Operating System: SuSE Linux 10.2 PHP Version: 5CVS-2007-06-16 (CVS) Assigned To: pajoye New Comment: Thanks for the update. The PHP part looks and the curl as well (thx to cURL's Daniel for the quick review). I will test and apply it this week. Previous Comments: [2009-04-28 20:05:49] sdteffen at gmail dot com Thanks for responding to this issue. I've updated and tested the patch once more with the PHP_5_3 sources from CVS today: http://sdteffen.de/php/php_curl_progress_callback.patch The test script is the same as mentioned under Reproduce code, but I've added an explanatory comment to the version on my website: http://sdteffen.de/php/index_en.html [2009-04-28 18:10:56] paj...@php.net Did you test your with 5.3? If not can you post a URL to an updated patch with a test script please? It can still make it this week for 5.3+. [2009-04-28 15:09:26] frase at cs dot wisc dot edu What happened here? A patch was offered for this feature almost two years ago, and was assigned to the maintainer a week later. The next six months saw some tweaks and corrections, and yet here we are two years later with this still languishing in assigned limbo, neither accepted and merged nor rejected and closed. Ilia? Tony? Bueller? [2009-02-20 09:27:43] php41712 at brainpower dot no-ip dot org can somewone submit this to the php code as this will help a lot of users [2008-02-16 15:00:15] sdteffen at gmail dot com The last patch is missing the changes to php_curl.h from the previous patch. A file containing the complete patch with changes for both files can be found under this URL: http://sdteffen.de/php/php_curl_progress_callback.patch 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/41712 -- Edit this bug report at http://bugs.php.net/?id=41712edit=1
#48065 [Bgs]: mysqli can not have two called procedure queries active at once
ID: 48065 User updated by: schwern at pobox dot com Reported By: schwern at pobox dot com Status: Bogus Bug Type: MySQLi related Operating System: OS X PHP Version: 5.2CVS-2009-04-23 (snap) New Comment: http://news.php.net/php.internals/43773 contains a patch to fix this issue. Previous Comments: [2009-04-24 16:58:24] schwern at pobox dot com I strongly disagree with the conclusion in #35203. Querying a called procedure should not act any different than querying a normal statement. That's the point of an database abstraction layer. * To the user, its a single query. There's no user visible reason to suspect I might need to use multi_query() and pull out some invisible second result. That's all internal details that I should not be privy to. * It violates OO encapsulation to have one query effect another. * DB abstraction layers like Drupal's do not allow me to tweak how it calls mysqli. There's no db_multi_query(). I have no solution but to make a complete end run around Drupal's DB layer and drop into mysqli just to call a stored procedure safely. This is a mysqli implementation detail leaking out breaking encapsulation, and its a user trap. I understand resources are tight to fix it, but it would be nice if it was at least acknowledged as a bug/misfeature. [2009-04-24 13:35:45] j...@php.net See bug #35203 [2009-04-23 23:25:10] schwern at pobox dot com For reference, here's the MySQL 5.0 docs on Commands out of sync. http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html [2009-04-23 23:10:26] schwern at pobox dot com Description: mysqli does not like having two query results active at the same time if a stored procedure was queried. MySQL balks with Commands out of sync; you can't run this command now. The equivalent SELECT does not have this problem, nor does Perl's DBD::mysql for comparison. Work arounds appear to be explicitly free'ing the result before calling the next one, but that is not easily possible through the Drupal DB API, for example. Also I might want to return a query result from a function and have it live on out of my function's control. And its a general violation of OO to have the two result objects interfere with each other. Reproduce code: --- http://rafb.net/p/XnP3AN31.html (Writes to the test database and user) The script creates a table with a few rows and a stored procedure doing a select * on that table. It then illustrates that two concurrent calls to that procedure cause an error while two SELECT * queries do not. Replicated on OS X with their stock PHP 5.2.6 and a fresh php5.2-200904232230 snapshot with --with-mysqli. Using a local mysql server compiled from MacPorts. mysql Ver 14.12 Distrib 5.0.77, for apple-darwin9.6.0 (i386) using readline 6.0 Expected result: Doing call get_stuff Done Doing select * from stuff Done Actual result: -- Doing call get_stuff Second query FAILED: Commands out of sync; you can't run this command now Done Doing select * from stuff Done -- Edit this bug report at http://bugs.php.net/?id=48065edit=1
#48102 [NEW]: run-tests.php and symlinked tests
From: f...@php.net Operating system: Linux PHP version: 6CVS-2009-04-28 (CVS) PHP Bug Type: Feature/Change Request Bug description: run-tests.php and symlinked tests Description: I was just trying out some tests written for 5.3 with HEAD, when I noticed the following: $ make test TESTS=ext/whatever Warning: fopen(): Filename cannot be empty in /root/src/php6/run-tests.php on line 1164 ERROR: Cannot open test file: make: [test] Error 1 (ignored) That means if there's a symlink with no endpoint, the whole testsuite can't run. It works fine if the symlinked file is just an empty (existing) file: BORK cannot read test [/tmp/foo] Yes, having tests only symlinked inside the source dir might be weird, so I filed this as feature request and not bug Reproduce code: --- $ touch /tmp/foo $ ln -s /tmp/foo /path/to/php-src/ext/whatever/tests/foo.phpt $ rm /tmp/foo $ make test TESTS=ext/whatever Expected result: $ make test TESTS=ext/whatever [...] BORK symlink endpoint /tmp/foo doesn't exist Actual result: -- $ make test TESTS=ext/whatever Warning: fopen(): Filename cannot be empty in /root/src/php6/run-tests.php on line 1164 ERROR: Cannot open test file: make: [test] Error 1 (ignored) -- Edit bug report at http://bugs.php.net/?id=48102edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48102r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48102r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48102r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48102r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48102r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48102r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48102r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48102r=needscript Try newer version: http://bugs.php.net/fix.php?id=48102r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48102r=support Expected behavior: http://bugs.php.net/fix.php?id=48102r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48102r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48102r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48102r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48102r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48102r=dst IIS Stability: http://bugs.php.net/fix.php?id=48102r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48102r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48102r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48102r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48102r=mysqlcfg
#48095 [Opn-Ver]: Load RDF Format Error
ID: 48095 Updated by: f...@php.net Reported By: pigo_chu at hotmail dot com -Status: Open +Status: Verified Bug Type: *XML functions Operating System: win32 only - Windows XP SP3 PHP Version: 5.2.9 New Comment: The URL mentioned passes http://www.w3.org/RDF/Validator/ as of now. 5.2.9 on Linux reads it correctly, 5.2.9-2 on XP / SP3 yields this result: PHP Warning: simplexml_load_file(): input conversion failed due to input error, bytes 0xA1 0xFE 0xA6 0xCC in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file(): input conversion failed due to input error, bytes 0xA1 0xFE 0xA6 0xCC in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file(): encoder errorhttp://www.nownews.com/rss/realtime.rdf:79: parser error : Premature end of data in tag title line 79 in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file(): title#31933;#23376;#25512;#34214; in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file():^ in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file(): http://www.nownews.com/rss/realtime.rdf:79: parser error : Premature end of data in tag item line 77 in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file(): title#31933;#23376;#25512;#34214; in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file():^ in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file(): http://www.nownews.com/rss/realtime.rdf:79: parser error : Premature end of data in tag RDF line 2 in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file(): title#31933;#23376;#25512;#34214; in D:\code\48095.php on line 2 PHP Warning: simplexml_load_file():^ in D:\code\48095.php on line 2 Previous Comments: [2009-04-28 03:25:07] pigo_chu at hotmail dot com Description: The url http://www.nownews.com/rss/realtime.rdf is rdf document Use any xml function(simplexml or domdocument) to load the url On Linux PHP 5.2.9 is ok On Windows XP SP3 has error Reproduce code: --- $doc = simplexml_load_file('http://www.nownews.com/rss/realtime.rdf'); var_dump($doc); Expected result: output is 'false' -- Edit this bug report at http://bugs.php.net/?id=48095edit=1
#48099 [Com]: stat failed on a readable / writable file in NFS mount
ID: 48099 Comment by: offset at galvanet dot com Reported By: offset at galvanet dot com Status: Feedback Bug Type: Filesystem function related Operating System: Linux PHP Version: 5.2.9 New Comment: It's working with LFS support. Stat is exactly the same : stat64(/home/files/3/4/0/340db92364af5c0616187f6e1db86ed7, {st_mode=S_IFREG|0444, st_size=9888768, ...}) = 0 But after the size is writen correctly : write(1, 9888768, 79888768) = 7 (Working on a 32bit system) Thanks Previous Comments: [2009-04-28 18:57:09] j...@php.net As I don't have any NFS mounted stuff available anywhere, can you try this: # CFLAGS=`getconf LFS_CFLAGS` ./config.nice # make clean make And then try that script of yours. [2009-04-28 18:14:00] j...@php.net This might be related to ug #45040 (And LFS support in general..) [2009-04-28 14:50:36] offset at galvanet dot com Strace on php execution return that : stat64(/home/files/3/4/0/340db92364af5c0616187f6e1db86ed7, {st_mode=S_IFREG|0444, st_size=9888768, ...}) = 0 write(2, PHP Warning: filesize(): stat f..., 139PHP Warning: filesize(): stat failed for /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 in /root/test.php on line 3 [2009-04-28 13:23:26] offset at galvanet dot com Description: is_file and filesize not working on a NFS mount. These files are readable and writable for user (Using PHP CLI). is_file and filesize working for local files. Not for NFS mounts. By the way, file_exist is working. The code is working under PHP 5.2.3 (cli). And not under PHP 5.2.9 (cli) Reproduce code: --- echo Full path : $SourceFile\n; if (!chmod($SourceFile, 0777)) { echo Unable to Chmod file\n; } clearstatcache(); if (!file_exists($SourceFile)) { echo Source file not found\n; } $FileSize = filesize($SourceFile); if (!$FileSize) { echo Source file empty !\n; } Expected result: Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 .. and continue the script Actual result: -- Full path : /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 Source file empty ! # ls -lah /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -rwxrwxrwx 1 nobody nobody 9.5M Apr 26 12:00 /home/files/3/4/0/340db92364af5c0616187f6e1db86ed7 -- Edit this bug report at http://bugs.php.net/?id=48099edit=1
#47365 [Asn-Csd]: ip2long: 32bit vs. 64bit
ID: 47365 Updated by: il...@php.net Reported By: flobee at gmail dot com -Status: Assigned +Status: Closed Bug Type: Network related Operating System: SunOS PHP Version: 5.2.9 Assigned To: dsp 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: [2009-03-26 01:22:34] pada at hrz dot tu-chemnitz dot de Hi, I can confirm the bug on Solaris (not OpenSolaris) Version 10 x86_64 # isainfo -b 64 # uname -srvmpi SunOS 5.10 Generic_118855-33 i86pc i386 i86pc # Results with unpatched 64 Bit PHP 5.2.8: # php5 -r var_dump(ip2long('example.com')); int(4294967295) # WRONG, should be bool(false), this is not a valid IP # php5 -r var_dump(ip2long(\1\x00x\)); int(1) # correct? # php5 -r var_dump(ip2long('0.1')); int(1) # correct? # php5 -r var_dump(ip2long('')); bool(false) # correct # php5 -r var_dump(ip2long('0.0.0.0')); int(0) # correct # php5 -r var_dump(ip2long('0.0.0.1')); int(1) # correct # php5 -r var_dump(ip2long('1.2.3.4')); int(16909060) # correct # php5 -r var_dump(ip2long('4.3.2.1')); int(67305985) # correct # php5 -r var_dump(ip2long('255.255.255.254')); int(4294967294) # correct # php5 -r var_dump(ip2long('255.255.255.255')); int(4294967295) # correct There is a problem in PHP function ip2long() with the comparison with INADDR_NONE on 64 bit Solaris systems, since the return value of function inet_addr is stored in an unsigned long int variable while struct inet_addr is only 32 bit wide. The RETURN_FALSE branch will never be reached when a string like example.com is supplied, since the comparison of ip and INADDR_NONE evaluates to false (it should be true in case of error). # Patch worked as expected on Debian GNU/Linux squeeze x86_64 with PHP 5.2.6: # php5 -r var_dump(ip2long('example.com')); bool(false) # correct # php5 -r var_dump(ip2long(\1\x00x\)); int(1) # correct? # php5 -r var_dump(ip2long('0.1')); int(1) # correct? # php5 -r var_dump(ip2long('')); bool(false) # correct # php5 -r var_dump(ip2long('0.0.0.0')); int(0) # correct # php5 -r var_dump(ip2long('0.0.0.1')); int(1) # correct # php5 -r var_dump(ip2long('1.2.3.4')); int(16909060) # correct # php5 -r var_dump(ip2long('4.3.2.1')); int(67305985) # correct # php5 -r var_dump(ip2long('255.255.255.254')); int(4294967294) # correct # php5 -r var_dump(ip2long('255.255.255.255')); int(4294967295) # correct I propose the following patch to simplify the code and fix the problem at the same time. Will this code work on all platforms (Linux, Solaris, BSD, Windows, etc.)? Your hints and suggestions are welcome. start of patch diff -ru php-5.2.9.orig/ext/standard/basic_functions.c php-5.2.9/ext/standard/basic_functions.c --- php-5.2.9.orig/ext/standard/basic_functions.c 2008-12-31 12:17:44.0 +0100 +++ php-5.2.9/ext/standard/basic_functions.c 2009-03-25 19:00:15.0 +0100 @@ -97,10 +97,6 @@ # include win32/unistd.h #endif -#ifndef INADDR_NONE -#define INADDR_NONE ((unsigned long int) -1) -#endif - #include zend_globals.h #include php_globals.h #include SAPI.h @@ -4336,7 +4332,7 @@ PHP_FUNCTION(ip2long) { zval **str; - unsigned long int ip; + struct in_addr addr; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, str) == FAILURE) { WRONG_PARAM_COUNT; @@ -4344,20 +4340,11 @@ convert_to_string_ex(str); - if (Z_STRLEN_PP(str) == 0 || (ip = inet_addr(Z_STRVAL_PP(str))) == INADDR_NONE) { - /* the only special case when we should return -1 ourselves, -* because inet_addr() considers it wrong. We return 0x and -* not -1 or ~0 because of 32/64bit issues. -*/ - if (Z_STRLEN_PP(str) == sizeof(255.255.255.255) - 1 - !memcmp(Z_STRVAL_PP(str), 255.255.255.255, sizeof(255.255.255.255) - 1)) { - RETURN_LONG(0x); - } - - RETURN_FALSE; - } + if (Z_STRLEN_PP(str) == 0 || inet_pton(AF_INET, Z_STRVAL_PP(str), addr) != 1) { +RETURN_FALSE; + } - RETURN_LONG(ntohl(ip)); + RETURN_LONG(ntohl(addr.s_addr)); } /* }}} */ end of patch Kind regards, Daniel [2009-02-12 13:09:49] d...@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to Open. Thank you for your interest in PHP. Which Solaris Version. Solaris 10. On Sparc or on x86? On OpenSolaris x86 64 bit it returns false as expected: ~/ php -r var_dump(ip2long('web.de'));
#44994 [Com]: exec() produces zombie processes on Windows, hangs Apache
ID: 44994 Comment by: diackne at gmail dot com Reported By: dbarrett at vistaprint dot com Status: Assigned Bug Type: Program Execution Operating System: win32 only - 2003 Server, 64-bit PHP Version: 5.2.6 Assigned To: pajoye New Comment: I have the same issue in windows 2008 web server iis 7 !!! Previous Comments: [2009-04-22 02:03:38] aliks0905 at gmail dot com I have the same issue as well. I use the exec() function to simultaneously upload files and sometimes cmd.exe freezes and all following uploads fail. I run on a Windows 2003 Server using Apache 2.2.11 and PHP 5.2.9 Looking forward to hearing a solution. [2009-02-27 18:58:20] alex at alexi dot ch Hi all, I can fully confirm the above behaviour on the Windows platform. We are using Apache FOP to create PDF-Files out of PHP, so we are invoking exec() to start the command line FOP processor. With several versions of PHP 5.2.x (5.2.4, 5.2.6, 5.2.8), this problem occurs soon as more than one user is invoking the exec(). Luckily we could not reproduce this behaviour using PHP 5.1.x, so downgrading to a 5.1.x version might also be an option for you. Regards alex [2009-01-16 17:17:44] schreiber at cs-itc dot de Same problems on w2k3 server x64 SP2 with apache 2.2.8 + 2.2.11 and php 5.2.0 up to 5.2.8 - using exec() the shellproc cmd.exe hangs and httpd is blocked for further ops, can just be cured by restart of apache services. Workaround with COM object helps, but thats no lucky solution... [2009-01-13 18:44:15] irdev at rogers dot com I have been experiencing this issue as well. The server is Windows 2003 with all patches up to date running IIS. PHP version is 5.2.5. I am running a commandline process using exec(). I have also tried passthru and shell_exec with the same results. Problem is intermittent and can not be replicated on demand. The processes themselves can not be killed until the IIS worker process is killed first although they do complete all the work they are supposed to. The commands do not die on script timeout. [2008-12-02 14:34:25] brem at martinbreton dot com If that's any help, I'm using a COM object as a workaround for this bug, and while it makes this bug appear less frequently, it still happens, randomly, from time to time. Here's what i did as a workaround using the exec() function call: $WshShell = new COM(WScript.Shell); $OutputFile = C:\\Temp\\output.txt; $Command = cmd /C MyApp.exe $OutputFile; $WshShell-Run( $Command, 0, true ); file_get_contents( $OutputFile ) ); unlink( $OutputFile ); 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/44994 -- Edit this bug report at http://bugs.php.net/?id=44994edit=1
#47871 [Opn]: PHPIniScanDir directive for apache allows scanning for extension ini files
ID: 47871 Updated by: d...@php.net Reported By: sriram dot natarajan at gmail dot com Status: Open Bug Type: Feature/Change Request Operating System: unix and linux PHP Version: 5.3.0RC1 -Assigned To: +Assigned To: dsp New Comment: I think that's a good one. I assign it to me so that we don't forget about that one. Previous Comments: [2009-04-02 02:47:47] sriram dot natarajan at gmail dot com hi here is the patch to address this issue http://cr.opensolaris.org/~sn123202/php53-47871.patch http://cr.opensolaris.org/~sn123202/php52-47871.patch let me know with your comments.. [2009-04-02 02:28:41] sriram dot natarajan at gmail dot com Description: Provide PHPIniScanDir directive similar to PHPIniDir for apache. this directive can perform the functionality of PHP_INI_SCAN_DIR environment variable. for more information on what PHP_INI_SCAN_DIR, please refer to bug http://bugs.php.net/bug.php?id=45114 Expected result: PHPIniScanDir directive should be accepted and php should load extension specific ini files from this location -- Edit this bug report at http://bugs.php.net/?id=47871edit=1
#47930 [Asn]: ext/filter crashes when module startup bails out
ID: 47930 Updated by: s...@php.net Reported By: stas at zend dot com Status: Assigned Bug Type: Reproducible crash Operating System: * PHP Version: 5.*, 6CVS (2009-04-25) Assigned To: derick New Comment: fixed for 5.3/HEAD, 5.2 fix still required, since 5.3+ fix changes binary API Previous Comments: [2009-04-08 23:01:04] stas at zend dot com Description: 1. If one of the modules startup bails out, that leads to aborting the startup sequence and PG(modules_activated) be 0. This, in turn, precludes running RSHUTDOWN functions on modules. 2. ext/filter allocates IF_G(get_array), etc. in the course of the request startup, and if RSHUTDOWN is not called, they are not cleaned up. 3. Since ext/filter does not initialize IF_G arrays, on the next request uncleaned value will be used. Since these arrays are no longer pointing to a valid memory (which was cleaned on the end of the previous request), this will result in a crash. Reproduce code: --- 1. Create extension that uses zend_bailout in RINIT. 2. Run two requests while ext/filter is present and turned on 3. Crash! -- Edit this bug report at http://bugs.php.net/?id=47930edit=1
#48103 [NEW]: compile error with sjsws 7 sp5 on fedora core 10
From: inetquestion at hotmail dot com Operating system: Fedora core 10 PHP version: 5.2.9 PHP Bug Type: Compile Failure Bug description: compile error with sjsws 7 sp5 on fedora core 10 Description: I am trying to compile php 5.2.9 and get the following error during make: sapi/nsapi/nsapi.c:62:19: error: nsapi.h: No such file or directory There was a post (http://developers.sun.com/webtier/reference/techart/php2.html) which seemed to address this problem, but it didn't fix the issue. Also, I have searched for nsapi.h and it is not on the system anywhere... Has anyone come across this problem or have suggestions on how to resolve it? OS: fedora core 10 SJSWS: 7.0 sp5 ./configure --with-mysql --with-nsapi=/opt/iplanet/current --enable-libgcc --with-gd=/usr --enable-sockets ... /bin/sh /root/installs/php/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile /root/installs/php/php-5.2.9/meta_ccld -Isapi/nsapi/ -I/root/installs/php/php-5.2.9/sapi/nsapi/ -DPHP_ATOMINC -I/root/installs/php/php-5.2.9/include -I/root/installs/php/php-5.2.9/main -I/root/installs/php/php-5.2.9 -I/opt/iplanet/current/include -I/opt/iplanet/current/plugins/include -I/usr/include/lbxml2 -I/root/installs/php/php-5.2.9/ext/date/lib -I/usr/include/mysql -I/root/installs/php/php-5.2.9/TSRM -I/root/installs/php/php-5.2.9/Zend -D_REENTRANT -DTHREAD=1 -I/usr/include -g -O2 -pthrad -DZTS -prefer-non-pic -c /root/installs/php/php-5.2.9/sapi/nsapi/nsapi.c -o sapi/nsapi/nsapi.lo ... /root/installs/php/php-5.2.9/sapi/nsapi/nsapi.c:62:19: error: nsapi.h: No such file or directory /root/installs/php/php-5.2.9/sapi/nsapi/nsapi.c:81: error: expected specifier-qualifier-list before 'pblock' /root/installs/php/php-5.2.9/sapi/nsapi/nsapi.c: In function 'nsapi_strdup': /root/installs/php/php-5.2.9/sapi/nsapi/nsapi.c:130: warning: return makes pointer from integer without a cast ... make: *** [sapi/nsapi/nsapi.lo] Error 1 -- Edit bug report at http://bugs.php.net/?id=48103edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48103r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48103r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48103r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48103r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48103r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48103r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48103r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48103r=needscript Try newer version: http://bugs.php.net/fix.php?id=48103r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48103r=support Expected behavior: http://bugs.php.net/fix.php?id=48103r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48103r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48103r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48103r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48103r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=48103r=dst IIS Stability: http://bugs.php.net/fix.php?id=48103r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48103r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48103r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48103r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48103r=mysqlcfg
#39287 [Com]: PDO: Get last executed query
ID: 39287 Comment by: fcardinaux at gmail dot com Reported By: waax at yahoo dot com Status: Open Bug Type:Feature/Change Request PHP Version: 5.1.6 New Comment: Such a feature would be useful for profiling as well. The software profiler I use transforms each SELECT statement into an EXPLAIN SELECT, which cannot work unless the parameters are replaced by the values used when the query is executed. Previous Comments: [2006-10-28 03:26:53] waax at yahoo dot com Description: Getting the last executed query would be helpful for debugging. Something like: ?php $stmt-execute(); print $stmt-getLastQuery(); ? -- Edit this bug report at http://bugs.php.net/?id=39287edit=1
#47168 [Bgs-Opn]: printf of floating point variable prints maximum of 40 decimal places
ID: 47168 Updated by: ras...@php.net Reported By: exploringbinary at gmail dot com -Status: Bogus +Status: Open Bug Type: Math related Operating System: Windows PHP Version: 5.2.8 -Assigned To: +Assigned To: rasmus New Comment: I agree with Rick here. The 40-digit limit is strangely arbitrary and doesn't match the size of the double. We are hiding available precision here. Previous Comments: [2009-01-30 21:51:56] exploringbinary at gmail dot com Since I didn't find anything in the documentation, I poked around in the source code. In php-5.2.8\ext\standard\formatted_print.c I found this: #define MAX_FLOAT_PRECISION 40 There is no explanation as to why it's capped at 40. What's interesting is that this code prints only 40 decimal places (0.4547473508864641189575195312), without a warning: ?php /* Print 2^-41 */ $dyadic = 0.45474735088646411895751953125; printf (%1.2147483646f,$dyadic); ? While this code prints ``Warning: printf() [function.printf]: Precision must be greater than zero and less than 2147483647 ...'' ?php /* Print 2^-41 */ $dyadic = 0.45474735088646411895751953125; printf (%1.2147483647f,$dyadic); ? If you're going to warn about a maximum, why not warn about the real maximum -- 40, not 2147483646? I wrote an article about how this issue is handled in PHP and 7 other languages at http://www.exploringbinary.com/print-precision-of-dyadic-fractions-varies-by-language/ [2009-01-20 22:26:19] exploringbinary at gmail dot com Hi, I read the documentation and the how to submit a bug report and googled as well before (and now again after) submitting the bug report. I cannot see discussion of this limit. Could you please give me a more specific link? I would also like to know the rationale for the limit. Why doesn't javascript or gcc have this limit? Why did Microsoft accept my bug report for a similar problem in VS? It seems like something PHP should consider, or at least give rationale for why not. Thanks. [2009-01-20 18:04:24] il...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php PHP string formatting functions will not permit float precision beyond 40 characters, this is a hard limit. A notice was however added to indicate that this is happening. [2009-01-20 14:55:45] exploringbinary at gmail dot com Description: printf will not print more than 40 decimal places, even if the format specifier asks for more. For example, ?php $value = 0.00011102230246251565404236316680908203125; // 2^-53 printf (%1.53f,$value); // Prints only 40 decimal places: 0.0001110223024625156540423632 ? Contrast this with javascript: script type=text/javascript var value = 0.00011102230246251565404236316680908203125; // 2^-53 var result = value.toFixed(53); document.write (result); // Prints all 53 decimal places /script I reported a similar bug in Visual Studio, which Microsoft acknowledged as an error: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=329278 Reproduce code: --- ?php $value = 0.00011102230246251565404236316680908203125; // 2^-53 printf (%1.53f,$value); // Prints only 40 decimal places: 0.0001110223024625156540423632 ? Expected result: I expect to see all 53 decimal places printed: 0.00011102230246251565404236316680908203125 Actual result: -- Only 40 decimal places are printed: 0.0001110223024625156540423632 -- Edit this bug report at http://bugs.php.net/?id=47168edit=1