[PHP-DEV] PHP 5 Bug Summary Report
PHP 5 Bug Database summary - http://bugs.php.net/ Num Status Summary (1345 total -- which includes 822 feature requests) ===[*Directory/Filesystem functions] 46990 Assigned Passing UTF8 strings to filesystem functions produce wrong filenames ===[Apache2 related]== 32220 Assigned [PATCH] thread_resources for thread not getting freed when apache kills thread 46479 Feedback virtual() prints output to browser 47675 Open File descriptor leaked due to HAVE_BROKEN_GETCWD 47681 Open System TMP dir ignored in file uploads ===[Arrays related]=== 46283 Open array_merge_recursive() Warning recursion detected in... 47221 Open no result from array_diff() ===[BC math related]== 44995 Open bcpowmod() using a scale function always returns 0 46564 Open bcmod( '1071', '357.5' ) returns '0' ===[Bzip2 Related] 29521 Assigned compress.bzip2 wrapper ===[Calendar related]= 40213 Suspended easter_date() returns wrong timestamp if ... 44474 Open GregorianToJD wrong return value ===[CGI related]== 43313 Open getopt() doesn't handle unknown parameters 45217 Open crash if -z and -m are used together 46305 Open Exception handler not invoked when using -r command line option 47042 Open php cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache 47412 Open PHP_MSHUTDOWN_FUNCTION not being called under FastCGI 47540 Open CLI can go into an infinite write() loop when ignore_user_abort(true) 47605 Open PHP CGI fails to ever output HTTP 200 header 47627 Open "No input file specified" causing crash ===[Class/Object related]= 45199 Assigned Serializing objects with private properties 46140 Open Unserializing with __wakeup that removes child causes subsequent refs to shift 46812 Open get_class_vars() does not include visible private variable looking at subclass 47405 Open error reports wrong file/line 47699 Open autoload and late static binding ===[COM related]== 31327 Assigned chinese char and word problem 32099 Assigned After opening ADO connection and closing it repeatedly, Apache stops service 34253 Assigned COM binary object/array issue (question marks?) 35875 Assigned IE event failure upon scheduling script 36360 Assigned PHP crashes when accessing an object that was just create by parent object 37562 Assigned Unable to lookup "ParameterFieldDefinitions" 37899 Assigned [PATCH] php_char_to _OLECHAR copies junk bytes 37965 Assigned Multi-dimensional array between PHP and COM 38719 Assigned COM Error during accessing function VirtualMachines 40424 Assigned Fatal error when setting the value of COM object's property array 40581 Assigned Pass Struct type to COM object from PHP 40664 Assigned String conversion functions wrong for multibyte chars 41055 Assigned DOTNET not instantiating fully-pathed assembly 41078 Assigned Its not possible to call Static dotNet Classes with dotnet 41189 Assigned Multi-dimensional array in COM function causes hang 41368 Assigned ADODB.Recordset ActiveConnection property - can't set with PHP 5.2.1+ 41388 Assigned Error in COM Object results 41577 Assigned DOTNET is successful once per server run 42413 Assigned Cannot iterate IE's event object 42551 Assigned new COM("HTMLFile") => warnings 42585 Assigned die() in event handler => PHP hangs 43275 Open get_class problem with COM objects 43432 Open Fatal error when setting the value of COM object's Attribute property 43470 Open COM API fails to correctly return [OUT] VT_PTR references 43506 Open com_get_active_object always fails 43521 Open Problem with Variant/Parameters 43838 Open variant_set with IE leads to hang 43897 Open $ie not cleared on IE quit 44256 Open Pb with COM in PHP5 44578 Open Strange Behavior of PHP using COM Object 45280 Open Reflection of instantiated COM classes causes PHP to crash. 45704 Open $exception->getCode() always return 0x80020009 even when it shouldn't 45855 Open COM-Problem with GET/SET, using same method name (but with different arg count) 46224 Open Cannot instantiate .Net object (ABCpdf 6.1 .Net) 46522 Open Problem using new com 47401 Open Can't instantiate VARIANT objects with VT_BYREF flag 47458 Open PHP run as CGI module onapache giving ADODB error on win2008 47569 Open DOTNET Excpection error ===[Com
[PHP-DEV] PHP 6 Bug Summary Report
PHP 6 Bug Database summary - http://bugs.php.net/ Num Status Summary (77 total -- which includes 32 feature requests) ===[*General Issues]== 26771 Suspended register_tick_funtions crash under threaded webservers ===[Apache related]=== 47061 Open User not logged under Apache ===[Apache2 related]== 44083 Open virtual() not outputting results if zlib.output_compression = On ===[Arrays related]=== 35277 Suspended incorrect recursion detection 41758 Assigned SORT_LOCALE_STRING broken for sort() in PHP6 43109 Open array_intersect() emits unexpected no of notices when 2d array is passed as arg ===[Class/Object related]= 41461 Assigned E_STRICT notice when overriding methods not defined by an Interface in hierarchy ===[COM related]== 45836 Open cannot use com 46909 Open COM object not allowing calls to methods ===[Compile Failure]== 42606 Open unicode/constants.c relies on ICU draft api 44502 Suspended Compiling ok with MySQL 5.0 ===[Date/time related] 46948 Assigned ext/date/lib/parse_tz.c:99: Memory leak: buffer ===[Filesystem function related]== 42110 Open fgetcsv doesn't handle ""\n correctly in multiline csv record 44034 Open FILE_IGNORE_NEW_LINES in FILE does not work as expected when lines end in \r\n 46688 Open Return values differ from 5.3 and are also inconsistent 46689 Open Downcoded notices suggest unfinished code in file system? ===[GD related]=== 34670 Assigned imageTTFText for Indian scripts (Devanagari) 34992 Assigned imageconvolution does not respect alpha ===[I18N and L10N related] 42471 Open locale_set_default returns true on invalid locales ===[mbstring related]= 44868 Open Replaces UTF-8 symbol with incorrect symbol ===[mcrypt related]=== 46834 Assigned Range of mcrypt functions fail on PHP 6.0 ===[MySQL related] 44076 Open mysql_result returns nothing with blob 45246 Open make error after ./configure --with-mysql ===[ODBC related]= 39756 Open [PATCH] Crashes in fetching resultsets with LONG ASCII columns from MaxDB ===[OpenSSL related]== 25614 Assigned openssl_pkey_get_public() fails when given a private key ===[PDO related]== 35368 Suspended PDO query does not work properly with serialize 47710 Open Undefined Index when accessing results by array ===[Performance problem]== 42528 Open Out of "char"(8-bit) range value doesn't roll back, with uni-code ON. ===[Program Execution] 39992 Open proc_terminate() leaves children of child running 43784 Assigned escapeshellarg removes % from given string ===[Regexps related]== 44923 Open ereg functions are not unicode aware: provide wrapper functions in PCRE ===[Reproducible crash]=== 45107 Open setting ext_dir to "./" (and other ini settings) causes apache crash ===[Scripting Engine problem]= 42194 Open $argc/$argv[] won't work when .php extension is assigned to php.exe 47154 Open Object properties unset after setting. ===[Session related]== 44860 Open session_encode() fails for php_binary serializer ===[Strings related]== 45566 Open Strict comparision on $_SERVER values fail 47691 Open strtr bug. Not replace unicode values from array, in binary string. ===[Unicode Engine related]=== 45087 Open Illegal or truncated character in input 47155 Open PHP 6.0 decodes base64 into incorrect uft-8 string 47164 Assigned uncomfortable (binary)char() append to binary string ===[URL related]== 45602 Open urlencode/urldecode should use ASCII encoding =
[PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int
Hi Dmitry, While updating my version (more below), I noticed another problem that I overlooked before with your leading zero check: "-0" is being treated as numeric. - Original Message - From: "Dmitry Stogov" Sent: Friday, March 20, 2009 Hi Matt, I ran you version but it looked little bit slower (I checked it with callgrind). So I kept the current CVS version. Anyway, it is not a big problem to change it after RC. Yeah, after I sent that message, I noticed other times were strange (bench.php, etc.), so it looks like I was getting compiler weirdness with that code layout... And of course looking at the code, there shouldn't have been anything faster about it, though it was shorter, which you confirmed with callgrind. Anyway, my updated version seems good, still smaller, and should do better with callgrind. :-) On 32-bit, the first digit of a 10 digit number can be checked which avoids having "2x overflow" on "50", etc. that I pointed out with your original code. (No problem on 64-bit.) Also made the terminating null check be last again since it's least likely to fail... http://realplain.com/php/handle_numeric.txt OLD: http://realplain.com/php/handle_numeric-v1.txt Thanks. Dmitry. - Matt -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] array kindex overflow issue Re: [PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int
On 19.03.2009, at 20:37, Rasmus Lerdorf wrote: So, what is the final conclusion on this one? Are we at a combination of Matt's and Dmitry's patches here? I think we definitely need to fix this even in the 5.2 branch and get it back to 5.1.x and earlier behavior. I consider it a bug that: $arr[35] = 'blah'; print_r($arr); results in: [-2147483648] => blah if someone has written brand new 5.2-specific code that relies on this weird behavior, then we will just have to bite the bullet and break that code. It is way more likely that people are relying on the earlier behavior and will end up with subtle problems in 5.2. I just had someone at Yahoo get bitten by this when they upgraded from 5.1.x to 5.2.x. If I understood it properly, the issue Matt/Dmitry are working on is something else. So where do we stand on the issue Rasmus's notes (is there a ticket for this one already)? regards, Lukas Kahwe Smith m...@pooteeweet.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Segmentation fault, where to look when debugging?
Hi all, I also posted this message on php.general last firday, but got no response. Maybe you can help me? Our CMS segfaults on certain pages. It's a lot of code to debug so I wonder if someone can point in me in de right direction where to start looking when debugging. The GDB backtrace points out that the segfault occurs on shutdown. (shutdown_executor). Then I see a reference to zend_objects_free_object_storage? Has this something to do with refcounting? Or should I look to __destruct() methods? I'm running PHP 5.2.8 on Gentoo. Also tested it on Fedora, same version of PHP, also segfaults. Thanks for your help! Regards, AJ #0 0x2e44eb96 in _zval_ptr_dtor (zval_ptr=0x2aaab14de7c7, __zend_filename=0x2e7983b0 "/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_variables.c ", __zend_lineno=175) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_execute_API. c:412 #1 0x2e45fd04 in _zval_ptr_dtor_wrapper (zval_ptr=0x2aaab14de7c7) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_variables.c: 175 #2 0x2e4708e0 in zend_hash_destroy (ht=0x2aaab152c4d0) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_hash.c:526 #3 0x2e4876c0 in zend_object_std_dtor (object=0x2aaab1215540) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_objects.c:45 #4 0x2e487b97 in zend_objects_free_object_storage (object=0x2aaab1215540) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_objects.c:12 2 #5 0x2e48c5b2 in zend_objects_store_del_ref_by_handle (handle=655) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_objects_API. c:206 #6 0x2e48c39d in zend_objects_store_del_ref (zobject=0x2aaab14e0aa0) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_objects_API. c:168 #7 0x2e45f948 in _zval_dtor_func (zvalue=0x2aaab14e0aa0, __zend_filename=0x2e7970e0 "/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_variables.h ", __zend_lineno=35) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_variables.c: 52 #8 0x2e44e93b in _zval_dtor (zvalue=0x2aaab14e0aa0, __zend_filename=0x2e797038 "/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_execute_API .c", __zend_lineno=414) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_variables.h: 35 #9 0x2e44ebc1 in _zval_ptr_dtor (zval_ptr=0x2aaab14df1e8, __zend_filename=0x2e7983b0 "/var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_variables.c ", __zend_lineno=175) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_execute_API. c:414 #10 0x2e45fd04 in _zval_ptr_dtor_wrapper (zval_ptr=0x2aaab14df1e8) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_variables.c: 175 #11 0x2e4708e0 in zend_hash_destroy (ht=0x2aaab126f208) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_hash.c:526 #12 0x2e4876c0 in zend_object_std_dtor (object=0x2aaab14de740) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_objects.c:45 #13 0x2e487b97 in zend_objects_free_object_storage (object=0x2aaab14de740) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_objects.c:12 2 #14 0x2e48c0c1 in zend_objects_store_free_object_storage (objects=0x2e9e5c60) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_objects_API. c:89 #15 0x2e44e778 in shutdown_executor () at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend_execute_API. c:299 #16 0x2e4615d9 in zend_deactivate () at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/Zend/zend.c:860 #17 0x2e3fccb6 in php_request_shutdown (dummy=0x0) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/main/main.c:1492 #18 0x2e4ea808 in php_apache_request_dtor (r=0x893fa8) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/sapi/apache2handler/sa pi_apache2.c:472 #19 0x2e4eb0b6 in php_handler (r=0x893fa8) at /var/tmp/portage/dev-lang/php-5.2.8-r2/work/php-5.2.8/sapi/apache2handler/sa pi_apache2.c:644 #20 0x004310fc in ap_run_handler () #21 0x00431527 in ap_invoke_handler () #22 0x0043d1e5 in ap_process_request () #23 0x0043ab3c in ?? () #24 0x0043756a in ap_run_process_connection () #25 0x004410c6 in ?? () #26 0x0044125a in ?? () #27 0x00441801 in ap_mpm_run () #28 0x0041fb77 in main () -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int
Hi Matt, Matt Wilmas wrote: Hi Dmitry, While updating my version (more below), I noticed another problem that I overlooked before with your leading zero check: "-0" is being treated as numeric. Yeah. Thank you for catching this. It should be fixed. - Original Message - From: "Dmitry Stogov" Sent: Friday, March 20, 2009 Hi Matt, I ran you version but it looked little bit slower (I checked it with callgrind). So I kept the current CVS version. Anyway, it is not a big problem to change it after RC. Yeah, after I sent that message, I noticed other times were strange (bench.php, etc.), so it looks like I was getting compiler weirdness with that code layout... And of course looking at the code, there shouldn't have been anything faster about it, though it was shorter, which you confirmed with callgrind. Anyway, my updated version seems good, still smaller, and should do better with callgrind. :-) On 32-bit, the first digit of a 10 digit number can be checked which avoids having "2x overflow" on "50", etc. that I pointed out with your original code. (No problem on 64-bit.) Also made the terminating null check be last again since it's least likely to fail... http://realplain.com/php/handle_numeric.txt OLD: http://realplain.com/php/handle_numeric-v1.txt It looks like now your version must be better. Are you sure that it can't miss overflow? Can it be proved? Thanks. Dmitry. Thanks. Dmitry. - Matt -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: array kindex overflow issue Re: [PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int
Lukas Kahwe Smith wrote: On 19.03.2009, at 20:37, Rasmus Lerdorf wrote: So, what is the final conclusion on this one? Are we at a combination of Matt's and Dmitry's patches here? I think we definitely need to fix this even in the 5.2 branch and get it back to 5.1.x and earlier behavior. I consider it a bug that: $arr[35] = 'blah'; print_r($arr); results in: [-2147483648] => blah if someone has written brand new 5.2-specific code that relies on this weird behavior, then we will just have to bite the bullet and break that code. It is way more likely that people are relying on the earlier behavior and will end up with subtle problems in 5.2. I just had someone at Yahoo get bitten by this when they upgraded from 5.1.x to 5.2.x. If I understood it properly, the issue Matt/Dmitry are working on is something else. So where do we stand on the issue Rasmus's notes (is there a ticket for this one already)? It's related to another Matt's proposal which cares about float to long conversion. Matt, what will we get with your patch and code above? [LONG_MAX] => blah? Thanks. Dmitry. regards, Lukas Kahwe Smith m...@pooteeweet.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] array kindex overflow issue Re: [PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int
Hi Lukas, - Original Message - From: "Lukas Kahwe Smith" Sent: Monday, March 23, 2009 On 19.03.2009, at 20:37, Rasmus Lerdorf wrote: So, what is the final conclusion on this one? Are we at a combination of Matt's and Dmitry's patches here? I think we definitely need to fix this even in the 5.2 branch and get it back to 5.1.x and earlier behavior. I consider it a bug that: $arr[35] = 'blah'; print_r($arr); results in: [-2147483648] => blah if someone has written brand new 5.2-specific code that relies on this weird behavior, then we will just have to bite the bullet and break that code. It is way more likely that people are relying on the earlier behavior and will end up with subtle problems in 5.2. I just had someone at Yahoo get bitten by this when they upgraded from 5.1.x to 5.2.x. If I understood it properly, the issue Matt/Dmitry are working on is something else. So where do we stand on the issue Rasmus's notes (is there a ticket for this one already)? Yeah, you understood that the subject about Bug #45877 is different. :-) Rasmus' issue is the "DVAL_TO_LVAL() change, different behavior" stuff I've been bringing up for a while. My last message from 9 days ago with all info either in it or the linked previous messages: http://marc.info/?l=php-internals&m=123704111325725&w=2 I hoped there might be some discussion about what should be expected, and how to ensure desired behavior. I kinda hit a limit with what I can do and test, without being able to verify things on other platforms. However, Rasmus is talking about a change in 5.2, and DVAL_TO_LVAL() didn't change there, but his symptoms are the same, at least. Of course, my message/patch from a week ago [1] to extend bitwise and modulus operators (on 32-bit platforms) would help with my original problem caused by DVAL_TO_LVAL(), as well as issues others may run into (like Bug #46579). Regardless, the current DVAL_TO_LVAL() definitely doesn't behave consistently across platforms [2], so it should be updated somehow. I don't think there's much to worry about with these things and the RC (after). It's not like either of them should "wreak havoc" with code by changing how large numbers are handled (isolated, easy to check results, etc.). [1] http://marc.info/?l=php-internals&m=123722650225792&w=2 [2] http://marc.info/?l=php-internals&m=123496364812725&w=2 regards, Lukas Kahwe Smith m...@pooteeweet.org - Matt -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: array kindex overflow issue Re: [PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int
Hi Dmitry, - Original Message - From: "Dmitry Stogov" Sent: Monday, March 23, 2009 Lukas Kahwe Smith wrote: On 19.03.2009, at 20:37, Rasmus Lerdorf wrote: So, what is the final conclusion on this one? Are we at a combination of Matt's and Dmitry's patches here? I think we definitely need to fix this even in the 5.2 branch and get it back to 5.1.x and earlier behavior. I consider it a bug that: $arr[35] = 'blah'; print_r($arr); results in: [-2147483648] => blah if someone has written brand new 5.2-specific code that relies on this weird behavior, then we will just have to bite the bullet and break that code. It is way more likely that people are relying on the earlier behavior and will end up with subtle problems in 5.2. I just had someone at Yahoo get bitten by this when they upgraded from 5.1.x to 5.2.x. If I understood it properly, the issue Matt/Dmitry are working on is something else. So where do we stand on the issue Rasmus's notes (is there a ticket for this one already)? It's related to another Matt's proposal which cares about float to long conversion. Matt, what will we get with your patch and code above? [LONG_MAX] => blah? You mean from 35 as a double? No, I'm going for the overflow behavior that most people have been getting in 5.2 (before 5.3's DVAL_TO_LVAL() change), though that overflow isn't guaranteed (which I'm trying to do). So: var_dump(array(35 => 1)); array(1) { [-794967296]=> int(1) } However, the array example may not be the best, since DVAL_TO_LVAL() *is not* used in 5.2 for double array keys, but a simple (long) cast, which could behave differently than using PHP's (int) cast on the same value. I originally brought up the double->long conversion not for array keys, but because I wanted overflow to keep the least significant bits when using the bitwise & operator. Last year's message (linked in the recent patch message): http://marc.info/?l=php-internals&m=120799720922202&w=2 Thanks. Dmitry. - Matt -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int
Hi Dmitry, - Original Message - From: "Dmitry Stogov" Sent: Monday, March 23, 2009 Hi Matt, Matt Wilmas wrote: Hi Dmitry, While updating my version (more below), I noticed another problem that I overlooked before with your leading zero check: "-0" is being treated as numeric. Yeah. Thank you for catching this. It should be fixed. - Original Message - From: "Dmitry Stogov" Sent: Friday, March 20, 2009 Hi Matt, I ran you version but it looked little bit slower (I checked it with callgrind). So I kept the current CVS version. Anyway, it is not a big problem to change it after RC. Yeah, after I sent that message, I noticed other times were strange (bench.php, etc.), so it looks like I was getting compiler weirdness with that code layout... And of course looking at the code, there shouldn't have been anything faster about it, though it was shorter, which you confirmed with callgrind. Anyway, my updated version seems good, still smaller, and should do better with callgrind. :-) On 32-bit, the first digit of a 10 digit number can be checked which avoids having "2x overflow" on "50", etc. that I pointed out with your original code. (No problem on 64-bit.) Also made the terminating null check be last again since it's least likely to fail... http://realplain.com/php/handle_numeric.txt OLD: http://realplain.com/php/handle_numeric-v1.txt It looks like now your version must be better. Are you sure that it can't miss overflow? Can it be proved? Well, as far as I can tell, it can be proved. :-) On 32-bit, <= 9 digits is obviously OK, and if there's 10, it's only used if it starts with a 1 or 2. Overflow with 25 is caught by the 0 check, and 50, which the 0 check in your first version missed, won't be used since we can tell from the first digit that it wouldn't fit. On 64-bit, LONG_MAX starts with a 9, and there wouldn't be an overflow missed by the 0 check until ULONG_MAX, which is another digit longer, and would be skipped by the "numbers too long" check. Thanks. Dmitry. - Matt -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PATCH] Bug #45877: LONG_MAX/MIN array key as string/int
Matt Wilmas wrote: Hi Dmitry, - Original Message - From: "Dmitry Stogov" Sent: Monday, March 23, 2009 Hi Matt, Matt Wilmas wrote: Hi Dmitry, While updating my version (more below), I noticed another problem that I overlooked before with your leading zero check: "-0" is being treated as numeric. Yeah. Thank you for catching this. It should be fixed. - Original Message - From: "Dmitry Stogov" Sent: Friday, March 20, 2009 Hi Matt, I ran you version but it looked little bit slower (I checked it with callgrind). So I kept the current CVS version. Anyway, it is not a big problem to change it after RC. Yeah, after I sent that message, I noticed other times were strange (bench.php, etc.), so it looks like I was getting compiler weirdness with that code layout... And of course looking at the code, there shouldn't have been anything faster about it, though it was shorter, which you confirmed with callgrind. Anyway, my updated version seems good, still smaller, and should do better with callgrind. :-) On 32-bit, the first digit of a 10 digit number can be checked which avoids having "2x overflow" on "50", etc. that I pointed out with your original code. (No problem on 64-bit.) Also made the terminating null check be last again since it's least likely to fail... http://realplain.com/php/handle_numeric.txt OLD: http://realplain.com/php/handle_numeric-v1.txt It looks like now your version must be better. Are you sure that it can't miss overflow? Can it be proved? Well, as far as I can tell, it can be proved. :-) On 32-bit, <= 9 digits is obviously OK, and if there's 10, it's only used if it starts with a 1 or 2. Overflow with 25 is caught by the 0 check, and 50, which the 0 check in your first version missed, won't be used since we can tell from the first digit that it wouldn't fit. On 64-bit, LONG_MAX starts with a 9, and there wouldn't be an overflow missed by the 0 check until ULONG_MAX, which is another digit longer, and would be skipped by the "numbers too long" check. OK. I'll test and ally your patch after RC. Dmitry. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] GSOC Idea, RPC Server
Hello, I wrote a post in the weekend that intent to explain, in a better manner, my idea for GSoC. Please feel free to comment about this. Best regards, 2009/3/19 Cesar D. Rodas : > 2009/3/19 Rasmus Lerdorf : >> Cesar D. Rodas wrote: >>> 2009/3/19 marius adrian popa : On Thu, Mar 19, 2009 at 9:30 AM, Cesar D. Rodas wrote: > Hello Andrey, > > 2009/3/19 Andrey Hristov : >> http://www.vl-srm.net/ ? > I've already seen this, and it is pretty similar, but it designs it's > very complex IMHO (http://www.vl-srm.net/doc/figures/srm-design.png). > My design will be simple, pretty close to the memcached. Part of its > simplicity will be only the RPC/RFC functionality, you won't be able > to instance remote objects (as the banana class of SRM). > > My idea it's provide an easy way to scale, you should be able to take > an existent project, cut some functions, export into a worker, and > hook your app. to the worker(s), I'll also write a little function > that will connect to the master process and generate functions that > will wrapper as local function, so your code won't change but it would > be able to scale. RPC is quite dead http://taint.org/2009/03/18/151218a.html >>> I can't figure out a better way to scale, of course this solution >>> wouldn't be for every page, but figure out the problem that great >>> sites such as yahoo, digg, wikipedia, wordpress and others faced to >>> scale. The RPC IMHO is a fast/cheap way to handle huge traffic. >> >> And I can tell you that we don't do this at all. Write your code such > I just said Yahoo as an example. > >> that it scales horizontally easily and throw lots of frontend servers >> with a low number of concurrent connections at it and you end up with a >> fast scalable site. You will obviously need to hit some central data > It would be almost the same, you will have dozens of front-end > servers that will have the necessary PHP code, but you would be able > to queue work or execute a remote function that is coded in PHP (so > you have PHP on both sides). The result could be stored using APC or > Memcached (IHMO APC is the best solution) to reduce the network > latency. > > I got the idea to code such a thing when I was at the Network > programming class, and the teacher explained SOA, it would be the > same. It is only an idea for GSoC, btw I will do it for my final work > at University and I will share the code, probably it can be useful to > someone. > >> stores, so there will be some network latency, but with local shared >> memory caching, you can avoid it on many requests. Taking a network hit >> for code execution doesn't make sense to me. >> >> -Rasmus >> > > > > -- > Cesar D. Rodas > http://cesar.la/ > Phone: +595-961-974165 > Rita Rudner - "Before I met my husband, I'd never fallen in love. I'd > stepped in it a few times." > -- Cesar D. Rodas http://cesar.la/ Phone: +595-961-974165 Robert Benchley - "I have tried to know absolutely nothing about a great many things, and I have succeeded fair... -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] GSOC Idea, RPC Server
2009/3/23 Cesar D. Rodas : > Hello, > > I wrote a post in the weekend that intent to explain, in a better > manner, my idea for GSoC. Sorry, forgot the link, http://cesar.la/php-application-server-gsoc-proposal.html > > Please feel free to comment about this. > > Best regards, > > > 2009/3/19 Cesar D. Rodas : >> 2009/3/19 Rasmus Lerdorf : >>> Cesar D. Rodas wrote: 2009/3/19 marius adrian popa : > On Thu, Mar 19, 2009 at 9:30 AM, Cesar D. Rodas wrote: >> Hello Andrey, >> >> 2009/3/19 Andrey Hristov : >>> http://www.vl-srm.net/ ? >> I've already seen this, and it is pretty similar, but it designs it's >> very complex IMHO (http://www.vl-srm.net/doc/figures/srm-design.png). >> My design will be simple, pretty close to the memcached. Part of its >> simplicity will be only the RPC/RFC functionality, you won't be able >> to instance remote objects (as the banana class of SRM). >> >> My idea it's provide an easy way to scale, you should be able to take >> an existent project, cut some functions, export into a worker, and >> hook your app. to the worker(s), I'll also write a little function >> that will connect to the master process and generate functions that >> will wrapper as local function, so your code won't change but it would >> be able to scale. > RPC is quite dead > http://taint.org/2009/03/18/151218a.html I can't figure out a better way to scale, of course this solution wouldn't be for every page, but figure out the problem that great sites such as yahoo, digg, wikipedia, wordpress and others faced to scale. The RPC IMHO is a fast/cheap way to handle huge traffic. >>> >>> And I can tell you that we don't do this at all. Write your code such >> I just said Yahoo as an example. >> >>> that it scales horizontally easily and throw lots of frontend servers >>> with a low number of concurrent connections at it and you end up with a >>> fast scalable site. You will obviously need to hit some central data >> It would be almost the same, you will have dozens of front-end >> servers that will have the necessary PHP code, but you would be able >> to queue work or execute a remote function that is coded in PHP (so >> you have PHP on both sides). The result could be stored using APC or >> Memcached (IHMO APC is the best solution) to reduce the network >> latency. >> >> I got the idea to code such a thing when I was at the Network >> programming class, and the teacher explained SOA, it would be the >> same. It is only an idea for GSoC, btw I will do it for my final work >> at University and I will share the code, probably it can be useful to >> someone. >> >>> stores, so there will be some network latency, but with local shared >>> memory caching, you can avoid it on many requests. Taking a network hit >>> for code execution doesn't make sense to me. >>> >>> -Rasmus >>> >> >> >> >> -- >> Cesar D. Rodas >> http://cesar.la/ >> Phone: +595-961-974165 >> Rita Rudner - "Before I met my husband, I'd never fallen in love. I'd >> stepped in it a few times." >> > > > > -- > Cesar D. Rodas > http://cesar.la/ > Phone: +595-961-974165 > Robert Benchley - "I have tried to know absolutely nothing about a > great many things, and I have succeeded fair... > -- Cesar D. Rodas http://cesar.la/ Phone: +595-961-974165 George Burns - "Don't stay in bed, unless you can make money in bed." -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Fwd: SimpleXML and namespaces
My guess is PHP internals can offer you answer you seek. -Sterling -- Forwarded message -- From: Sharon Levy Date: Mon, Mar 23, 2009 at 12:46 AM Subject: SimpleXML and namespaces To: sterl...@apache.org Someone suggested in the PHP manual that it is not simple to work with XML that has namespaces. No one has refuted that statement so shall I assume that's because it's true? I would very much like to know your opinion. Thank you. Sincerely, Sharon Levy -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] RC1 tagged
Aloha, This is just a heads up to all developers who waited during the commit freeze, RC1 has been tagged. So bug fixing may continue :) There were a couple commits during this freeze. I realize that people tend to work on stuff and commit without necessarily looking at the mailinglist before hand. So for the during of the 5.3.0 release process we will try to go with the following procedures: 1) We will always aim for a release on Thursday, which means Tuesday and Wednesday before the given date while have a commit freeze on all build related files for anything but build fix commits 2) In case we are slipping we might do another Tuesday release, which again will mean Friday commits only with the RM's specific permission [1], weekend and Monday commit freeze on all build related files for anything but build fix commits. Until 5.3.0 is out, please do make it a habit to try and stay in the loop about eminent releases and their commit freezes. I will keep posting any dates to internals as soon as a date is set. I will also update the wiki page [2] asap. Finally I will post to internals and php-cvs 1-2 days before a commit freeze as a reminder. The next RC will likely hit in about 2-3 weeks. Then again, hopefully there will be less and less changes before the next RC's. And yes there will obviously be more RC's after this one, since we still have some issues to fix. This however does not mean that for the most part people can now rely on things being fixed, which is why this is an RC and not a beta2 after all [3]. regards, Lukas Kahwe Smith m...@pooteeweet.org [1] This Friday thing is an attempt to keep the commit freeze periods as small as possible, while still ensuring that those testing less used platforms and SAPI's (and as a result do not have other shoulders to rely on), have more or less 2 days to do their build testing [2] http://wiki.php.net/todo/php53 [3] This is just a disclaimer for the end users on this list wondering if its worth it to actually test this RC1 .. yes it is! :) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] pdo bug fixing
Hey Matteo, Based on the feedback I got there is no reason why your PDO patches have to be applied by anyone but yourself. So if you are still interested go ahead and submit a cvs account request. Thx for looking after PDO bugs .. we dearly need your help! regards, Lukas Kahwe Smith m...@pooteeweet.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php