#40791 [NEW]: isset - null - is_null
From: mauthi at gmx dot net Operating system: PHP version: 5.2.1 PHP Bug Type: *General Issues Bug description: isset - null - is_null Description: In my function (see code below) i tried to return the value of an array at position key If the value is null, i want to return null - it works as shown in the code - but if the key is not set - my function also returns null! So i can't find a solution to differ null or not set! Reproduce code: --- $a = array(); // case 1: $a[key] = null; // end case 1 // case 2: // end case 2 if (isset($a[key])) { return $a[key]; } else { if (is_null($a[key]) return null; else return key not set!; } Expected result: case 1: null case 2: key not set! Actual result: -- case 1: null case 2: null Undefined Index: key in XXX (in log file) -- Edit bug report at http://bugs.php.net/?id=40791edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40791r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40791r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40791r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40791r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40791r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40791r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40791r=needscript Try newer version:http://bugs.php.net/fix.php?id=40791r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40791r=support Expected behavior:http://bugs.php.net/fix.php?id=40791r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40791r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40791r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40791r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40791r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40791r=dst IIS Stability:http://bugs.php.net/fix.php?id=40791r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40791r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40791r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40791r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40791r=mysqlcfg
#40792 [NEW]: Wish: Function array_get($mixed, $key, $defaultvalue)
From: t dot kloppenburg at billiton dot de Operating system: Linux PHP version: 5.2.1 PHP Bug Type: Feature/Change Request Bug description: Wish: Function array_get($mixed, $key, $defaultvalue) Description: I miss a function or ArrayObject method to get an element of an array, or alternativly a default value if the key is not set in the array. In python: mydict = {'key1' : 'value1'} val = mydict.get('otherkey', 'defaultvalue') - 'defaultvalue' This is very handy when dealing with arrays. I'ld be happy to see this in PHP4 and PHP5. It could look like this: $cfg = array('version' = '1.2v', 'othercfg' = 'otherval'); $tmppath = array_get( $cfg, 'tmppath', '/tmp' ); - '/tmp' or with ArrayObject as: $tmppath = $arrobj-get( 'tmppath', '/tmp' ); - '/tmp' (if not set in the array) I code in Python since 6 or 7 years, and I really miss this function in everyday-use. -- Edit bug report at http://bugs.php.net/?id=40792edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40792r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40792r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40792r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40792r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40792r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40792r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40792r=needscript Try newer version:http://bugs.php.net/fix.php?id=40792r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40792r=support Expected behavior:http://bugs.php.net/fix.php?id=40792r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40792r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40792r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40792r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40792r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40792r=dst IIS Stability:http://bugs.php.net/fix.php?id=40792r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40792r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40792r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40792r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40792r=mysqlcfg
#40757 [Opn-Bgs]: get_object_vars get nothing in child class
ID: 40757 Updated by: [EMAIL PROTECTED] Reported By: nrspark at 163 dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Windows XP PHP Version: 5.2.1 New Comment: but it works expect if the method change to this function getFields($obj){ return array('p1'=$obj-p1); } Surely Base class can access it's own private properties. The method belongs to the Base and is executed in it's scope. Previous Comments: [2007-03-09 13:06:23] nrspark at 163 dot com but it works expect if the method change to this function getFields($obj){ return array('p1'=$obj-p1); } and it work expect in java using reflection think about: Liskov Substitution Principle i thing this is the implemention bug of get_object_vars [2007-03-09 10:14:42] [EMAIL PROTECTED] I would be very surprised to be able to access private properties of Base in the context of Child. What you see is expected. [2007-03-08 12:05:12] nrspark at 163 dot com Description: method to get the private properties of the base object in base class object, everything ok in child class use inherit method, get empty Reproduce code: --- class Base { private $p1='sadf'; function getFields($obj){ return get_object_vars($obj); } } class Child extends Base { } $base=new Base(); print_r($base-getFields(new Base())); $child=new Child(); print_r($child-getFields(new Base())); Expected result: Array ( [p1] = sadf )Array ( [p1] = sadf ) Actual result: -- Array ( [p1] = sadf ) Array ( ) -- Edit this bug report at http://bugs.php.net/?id=40757edit=1
#40791 [Opn-Bgs]: isset - null - is_null
ID: 40791 Updated by: [EMAIL PROTECTED] Reported By: mauthi at gmx dot net -Status: Open +Status: Bogus Bug Type:*General Issues PHP Version: 5.2.1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: [2007-03-13 10:01:18] mauthi at gmx dot net Description: In my function (see code below) i tried to return the value of an array at position key If the value is null, i want to return null - it works as shown in the code - but if the key is not set - my function also returns null! So i can't find a solution to differ null or not set! Reproduce code: --- $a = array(); // case 1: $a[key] = null; // end case 1 // case 2: // end case 2 if (isset($a[key])) { return $a[key]; } else { if (is_null($a[key]) return null; else return key not set!; } Expected result: case 1: null case 2: key not set! Actual result: -- case 1: null case 2: null Undefined Index: key in XXX (in log file) -- Edit this bug report at http://bugs.php.net/?id=40791edit=1
#40759 [Fbk-Bgs]: pspell_new_personal does not load custom dictionary
ID: 40759 Updated by: [EMAIL PROTECTED] Reported By: david at mytton dot net -Status: Feedback +Status: Bogus Bug Type: Pspell related Operating System: Windows XP PHP Version: 5.2.1 New Comment: Not reproducible on Windows either. Check your Aspell install and make sure the dictionary format is correct. Not PHP problem. Previous Comments: [2007-03-12 19:50:15] [EMAIL PROTECTED] I'm talking about Linux. [2007-03-12 19:42:06] david at mytton dot net This is the latest Windows version. [2007-03-12 19:03:17] [EMAIL PROTECTED] Try to update it to the latest stable version and see if this fixes the problem. [2007-03-12 18:54:36] david at mytton dot net Windows: Aspell-0.50-3 Aspell-en-0.50-2 Linux: International Ispell Version 3.1.20 (but really Aspell 0.50.3) [2007-03-12 18:50:34] [EMAIL PROTECTED] What Pspell/Aspell version are you using? 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/40759 -- Edit this bug report at http://bugs.php.net/?id=40759edit=1
#40735 [Opn-Fbk]: stream_select returns 0 for php 5.1.6
ID: 40735 Updated by: [EMAIL PROTECTED] Reported By: rodricg at sellingsource dot com -Status: Open +Status: Feedback Bug Type: Streams related Operating System: x86_64 GNU/Linux PHP Version: 5CVS-2007-03-05 (snap) New Comment: I still have no idea how to replicate it. Previous Comments: [2007-03-12 16:54:41] rodricg at sellingsource dot com Same behavior with gcc 4.1.2. I'm chalking this up to gcc optimization and will compile with -O1 for now. [2007-03-06 21:14:57] [EMAIL PROTECTED] Try with GCC 4.1.2. GCC 4.1.1 is known to have some problems. [2007-03-06 21:08:57] rodricg at sellingsource dot com After further testing it seems that --with-curlwrappers is not the culprit but gcc optimization is. Using gcc version 4.1.1 (Gentoo 4.1.1-r3) I get the expected behavior when compiling with CFLAGS=-pipe but the erroneous behavior when compiling with CFLAGS=-pipe -O2. This is regardless of the curlwrappers setting. Sorry about the initial misinformation. Forgetting a make clean between several of my tests led me to the wrong conclusion. Just tried -O1 and it seems to be ok, will try with a different version of gcc. [2007-03-06 11:24:13] [EMAIL PROTECTED] I still get the expected result even with --with-curlwrappers. [2007-03-06 00:54:48] rodricg at sellingsource dot com Allowing ssh access to my machine will require me to request a firewall change which may take some time. However, I have found this behavior only presents itself when PHP is compiled with the --with-curlwrappers option. Explicitly disabling this option returns my machine to the expected behavior. Cheers! 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/40735 -- Edit this bug report at http://bugs.php.net/?id=40735edit=1
#40793 [NEW]: xmlrpc_is_fault shows warning if parameter is not an array
From: camka at email dot ee Operating system: windows PHP version: 5.2.1 PHP Bug Type: XMLRPC-EPI related Bug description: xmlrpc_is_fault shows warning if parameter is not an array Description: xmlrpc_is_fault is supposed to accept a result returned by xmlrpc_decode. As xmlrpc_decode can return non-array value, xmlrpc_is_fault throws a notice: xmlrpc_is_fault() : Array argument expected which is incorrect, as it is common to simply pass the decoded xml response directly into is_fault() function to check, whether it has been fault or not. Reproduce code: --- ? var_dump(xmlrpc_is_fault(xmlrpc_decode('?xml version=1.0 encoding=utf-8?methodResponseparamsparamvalueint2/int/value/param/params/methodResponse', 'utf-8'))); Expected result: bool(false) Actual result: -- Notice: PHPDocument8 line 2 - xmlrpc_is_fault() [function.xmlrpc-is-fault]: Array argument expected bool(false) -- Edit bug report at http://bugs.php.net/?id=40793edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40793r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40793r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40793r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40793r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40793r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40793r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40793r=needscript Try newer version:http://bugs.php.net/fix.php?id=40793r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40793r=support Expected behavior:http://bugs.php.net/fix.php?id=40793r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40793r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40793r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40793r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40793r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40793r=dst IIS Stability:http://bugs.php.net/fix.php?id=40793r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40793r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40793r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40793r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40793r=mysqlcfg
#40793 [Opn-Bgs]: xmlrpc_is_fault shows warning if parameter is not an array
ID: 40793 Updated by: [EMAIL PROTECTED] Reported By: camka at email dot ee -Status: Open +Status: Bogus Bug Type: XMLRPC-EPI related Operating System: windows PHP Version: 5.2.1 New Comment: The function is supposed to accept only arrays by design. Previous Comments: [2007-03-13 12:41:37] camka at email dot ee Description: xmlrpc_is_fault is supposed to accept a result returned by xmlrpc_decode. As xmlrpc_decode can return non-array value, xmlrpc_is_fault throws a notice: xmlrpc_is_fault() : Array argument expected which is incorrect, as it is common to simply pass the decoded xml response directly into is_fault() function to check, whether it has been fault or not. Reproduce code: --- ? var_dump(xmlrpc_is_fault(xmlrpc_decode('?xml version=1.0 encoding=utf-8?methodResponseparamsparamvalueint2/int/value/param/params/methodResponse', 'utf-8'))); Expected result: bool(false) Actual result: -- Notice: PHPDocument8 line 2 - xmlrpc_is_fault() [function.xmlrpc-is-fault]: Array argument expected bool(false) -- Edit this bug report at http://bugs.php.net/?id=40793edit=1
#40757 [Bgs-Opn]: get_object_vars get nothing in child class
ID: 40757 User updated by: nrspark at 163 dot com Reported By: nrspark at 163 dot com -Status: Bogus +Status: Open Bug Type: Class/Object related Operating System: Windows XP PHP Version: 5.2.1 New Comment: code 1: use get_object_vars 1I would be very surprised to be able to access private properties of 1Base in the context of Child. code 2: direct access 2Surely Base class can access it's own private properties. 2The method belongs to the Base and is executed in it's scope. $child=new Child(); $child-getFields(new Base()); what is the context of the method? base or child? the result direct access and get_object_vars must be the same. it is a bug that the get_object_vars function do not check the method belongs to, but just check the object class call the method. Previous Comments: [2007-03-13 11:38:52] [EMAIL PROTECTED] but it works expect if the method change to this function getFields($obj){ return array('p1'=$obj-p1); } Surely Base class can access it's own private properties. The method belongs to the Base and is executed in it's scope. [2007-03-09 13:06:23] nrspark at 163 dot com but it works expect if the method change to this function getFields($obj){ return array('p1'=$obj-p1); } and it work expect in java using reflection think about: Liskov Substitution Principle i thing this is the implemention bug of get_object_vars [2007-03-09 10:14:42] [EMAIL PROTECTED] I would be very surprised to be able to access private properties of Base in the context of Child. What you see is expected. [2007-03-08 12:05:12] nrspark at 163 dot com Description: method to get the private properties of the base object in base class object, everything ok in child class use inherit method, get empty Reproduce code: --- class Base { private $p1='sadf'; function getFields($obj){ return get_object_vars($obj); } } class Child extends Base { } $base=new Base(); print_r($base-getFields(new Base())); $child=new Child(); print_r($child-getFields(new Base())); Expected result: Array ( [p1] = sadf )Array ( [p1] = sadf ) Actual result: -- Array ( [p1] = sadf ) Array ( ) -- Edit this bug report at http://bugs.php.net/?id=40757edit=1
#40793 [Bgs-Opn]: xmlrpc_is_fault shows warning if parameter is not an array
ID: 40793 User updated by: camka at email dot ee Reported By: camka at email dot ee -Status: Bogus +Status: Open Bug Type: XMLRPC-EPI related Operating System: windows PHP Version: 5.2.1 New Comment: Sory, but I slightly disagree. In current implementation I must implicitly check, if decoded xml response is array or not before passing it to xmlrpc_is_fault(), otherwise it gives me a notice. This is just unnecessary additional confusing check to do, which makes a code dirty and unclear. If this check would be inside is_fault function the implementation would be more incapsulated and simple for developer using xmlrpc ext. Or may be there is another way to check whether the response contains a fault or not? thank you Previous Comments: [2007-03-13 12:51:54] [EMAIL PROTECTED] The function is supposed to accept only arrays by design. [2007-03-13 12:41:37] camka at email dot ee Description: xmlrpc_is_fault is supposed to accept a result returned by xmlrpc_decode. As xmlrpc_decode can return non-array value, xmlrpc_is_fault throws a notice: xmlrpc_is_fault() : Array argument expected which is incorrect, as it is common to simply pass the decoded xml response directly into is_fault() function to check, whether it has been fault or not. Reproduce code: --- ? var_dump(xmlrpc_is_fault(xmlrpc_decode('?xml version=1.0 encoding=utf-8?methodResponseparamsparamvalueint2/int/value/param/params/methodResponse', 'utf-8'))); Expected result: bool(false) Actual result: -- Notice: PHPDocument8 line 2 - xmlrpc_is_fault() [function.xmlrpc-is-fault]: Array argument expected bool(false) -- Edit this bug report at http://bugs.php.net/?id=40793edit=1
#40793 [Opn-Bgs]: xmlrpc_is_fault shows warning if parameter is not an array
ID: 40793 Updated by: [EMAIL PROTECTED] Reported By: camka at email dot ee -Status: Open +Status: Bogus Bug Type: XMLRPC-EPI related Operating System: windows PHP Version: 5.2.1 New Comment: Sory, but I slightly disagree. It's hard to disagree with a fact. The function IS designed this way and is_array() check is not that ugly, dirty, unclear and confusing. Whether it was reasonable implementation or not - that's a different question. The XMLRPC extension is unmaintained for a long time and I personally do not feel willing enough to change it's behavior just because it requires one is_array() call. And this is definitely not a BUG, but a change request. Actually we have simular things in many places - for example, fread() and fwrite() emit a notice when invalid stream passed, even though fopen() might return FALSE. And you have to use those unnecessary, confusing, ugly, dirty and unclear checks to be sure the stream is valid. Previous Comments: [2007-03-13 13:41:04] camka at email dot ee Sory, but I slightly disagree. In current implementation I must implicitly check, if decoded xml response is array or not before passing it to xmlrpc_is_fault(), otherwise it gives me a notice. This is just unnecessary additional confusing check to do, which makes a code dirty and unclear. If this check would be inside is_fault function the implementation would be more incapsulated and simple for developer using xmlrpc ext. Or may be there is another way to check whether the response contains a fault or not? thank you [2007-03-13 12:51:54] [EMAIL PROTECTED] The function is supposed to accept only arrays by design. [2007-03-13 12:41:37] camka at email dot ee Description: xmlrpc_is_fault is supposed to accept a result returned by xmlrpc_decode. As xmlrpc_decode can return non-array value, xmlrpc_is_fault throws a notice: xmlrpc_is_fault() : Array argument expected which is incorrect, as it is common to simply pass the decoded xml response directly into is_fault() function to check, whether it has been fault or not. Reproduce code: --- ? var_dump(xmlrpc_is_fault(xmlrpc_decode('?xml version=1.0 encoding=utf-8?methodResponseparamsparamvalueint2/int/value/param/params/methodResponse', 'utf-8'))); Expected result: bool(false) Actual result: -- Notice: PHPDocument8 line 2 - xmlrpc_is_fault() [function.xmlrpc-is-fault]: Array argument expected bool(false) -- Edit this bug report at http://bugs.php.net/?id=40793edit=1
#40792 [Opn]: Wish: Function array_get($mixed, $key, $defaultvalue)
ID: 40792 User updated by: t dot kloppenburg at billiton dot de Reported By: t dot kloppenburg at billiton dot de Status: Open Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.2.1 New Comment: ok, I code in PHP all this years and I miss it in PHP :) Previous Comments: [2007-03-13 11:23:03] t dot kloppenburg at billiton dot de Description: I miss a function or ArrayObject method to get an element of an array, or alternativly a default value if the key is not set in the array. In python: mydict = {'key1' : 'value1'} val = mydict.get('otherkey', 'defaultvalue') - 'defaultvalue' This is very handy when dealing with arrays. I'ld be happy to see this in PHP4 and PHP5. It could look like this: $cfg = array('version' = '1.2v', 'othercfg' = 'otherval'); $tmppath = array_get( $cfg, 'tmppath', '/tmp' ); - '/tmp' or with ArrayObject as: $tmppath = $arrobj-get( 'tmppath', '/tmp' ); - '/tmp' (if not set in the array) I code in Python since 6 or 7 years, and I really miss this function in everyday-use. -- Edit this bug report at http://bugs.php.net/?id=40792edit=1
#40781 [Bgs]: input name=PHPSESSID / invalid HTML
ID: 40781 User updated by: php dot net at steltenpower dot com Reported By: php dot net at steltenpower dot com Status: Bogus Bug Type: Session related Operating System: Linux PHP Version: 4.4.5 New Comment: Keeping the current thing as a default would be good. Saying that it works on a few common browsers is forgetting about semantic web and accessibility. Previous Comments: [2007-03-12 18:05:06] [EMAIL PROTECTED] Browsers from Netscape 4 and up have no problem parsing tags like br / so this is not going to be changed in order to keep xhtml compabtipility. [2007-03-12 11:44:28] php dot net at steltenpower dot com I'm using PHP's built-in session system through session_start() etc. In the HTML output this results in lots of things of which input type=hidden name=PHPSESSID value=8748someLongId865 / is part. The / in there should be removed to make it valid HTML sidenote: The / is needed for XHTML (which might also need name replaced with id) So to be able to use the PHP built-in system for both valid HTML and valid XHTML a switch, flag, ini setting, or something is needed [2007-03-12 09:29:33] [EMAIL PROTECTED] 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. [2007-03-12 00:19:34] php dot net at steltenpower dot com Description: input type=hidden name=PHPSESSID value=... / is generated and the / makes it invalid HTML. XHTML needs the / So to be able to output both valid HTML and valid XHTML an ini variable or something is needed -- Edit this bug report at http://bugs.php.net/?id=40781edit=1
#39835 [Com]: Configure script fails with expr: syntax error
ID: 39835 Comment by: v2 at petrov dot ks dot ua Reported By: cheetah at tanabi dot org Status: No Feedback Bug Type: *Compile Issues Operating System: Solaris 10 PHP Version: 5.2.0 New Comment: Have same error when try to compile php-4.4.6 # ./configure loading cache ./config.cache checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed expr: syntax error ./configure: test: =: unary operator expected ... OS Red Hat 7.3 # bash --version GNU bash, version 2.05a.0(1)-release (i686-pc-linux-gnu) Copyright 2001 Free Software Foundation, Inc. # expr --version expr (GNU sh-utils) 2.0.11 Written by Mike Parker. Previous Comments: [2006-12-23 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2006-12-15 09:59:10] [EMAIL PROTECTED] What kind of Bash are you using? What is the version #? [2006-12-15 04:52:58] cheetah at tanabi dot org Okay; I upgraded the bash on the system and made sure configure was using it (it was using /bin/sh, which is Sun's 'sh' and therefore could be problematic). Bash is now at 3.2 and now when I run configure (same command as mentioned in the original bug): loading cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... egrep checking for a sed that does not truncate output... /usr/local/bin/sed expr: syntax error ./configure: line 2333: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected expr: syntax error ./configure: line 2339: test: =: unary operator expected expr: syntax error ./configure: line 2346: test: =: unary operator expected Then it continues on normally. This problem looks like another problem I saw in the bug system, so I'll take a look around again for it. The build was successful, so I'm inclined to not really care as much anymore :) But if it's a real problem I'd like to help track it down all the same. [2006-12-15 03:45:33] toomuchphp-phpbugs at yahoo dot com I had the some problem on OS X upgrading to 5.2, you just need to upgrade your shell (e.g., bash). [2006-12-14 22:05:55] cheetah at tanabi dot org Description: Two notes; I have tried this on two separate Solaris 10 machines and I get this exact same error on both. On both machines, past versions of PHP have successfully compiled -- namely PHP 5.1.6 and a few earlier ones as well. Not doing anything particularly special here other than a 64 bit build (we use a large memory application with this) WHICH worked perfectly fine with 5.1.6... The flags to build 64 bit are in CFLAGS and LDFLAGS, namely -mcpu=ultrasparc -m64 here's what happens: ./configure --prefix=/usr/local/64 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-sockets --with-pgsql=/usr/local/64/pgsql --with-pdo-pgsql=/usr/local/64/pgsql --with-libxml-dir=/usr/local/64 --enable-ftp --without-iconv loading cache ./config.cache checking for Cygwin environment... no checking for mingw32 environment... no checking for egrep... egrep checking for
#40759 [Bgs-Opn]: pspell_new_personal does not load custom dictionary
ID: 40759 User updated by: david at mytton dot net Reported By: david at mytton dot net -Status: Bogus +Status: Open Bug Type: Pspell related Operating System: Windows XP PHP Version: 5.2.1 New Comment: I reinstalled Aspell on Windows and am still unable to get it to pick up the custom dictionary. The file format I am using is: personal_ws-1.1 en 1 bloomsbury in custom.dict with the code in my original description. Previous Comments: [2007-03-13 11:04:52] [EMAIL PROTECTED] Not reproducible on Windows either. Check your Aspell install and make sure the dictionary format is correct. Not PHP problem. [2007-03-12 19:50:15] [EMAIL PROTECTED] I'm talking about Linux. [2007-03-12 19:42:06] david at mytton dot net This is the latest Windows version. [2007-03-12 19:03:17] [EMAIL PROTECTED] Try to update it to the latest stable version and see if this fixes the problem. [2007-03-12 18:54:36] david at mytton dot net Windows: Aspell-0.50-3 Aspell-en-0.50-2 Linux: International Ispell Version 3.1.20 (but really Aspell 0.50.3) 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/40759 -- Edit this bug report at http://bugs.php.net/?id=40759edit=1
#40759 [Opn-Fbk]: pspell_new_personal does not load custom dictionary
ID: 40759 Updated by: [EMAIL PROTECTED] Reported By: david at mytton dot net -Status: Open +Status: Feedback Bug Type: Pspell related Operating System: Windows XP PHP Version: 5.2.1 New Comment: As I said, it works fine here both on Linux and Windows. Previous Comments: [2007-03-13 15:28:41] david at mytton dot net I reinstalled Aspell on Windows and am still unable to get it to pick up the custom dictionary. The file format I am using is: personal_ws-1.1 en 1 bloomsbury in custom.dict with the code in my original description. [2007-03-13 11:04:52] [EMAIL PROTECTED] Not reproducible on Windows either. Check your Aspell install and make sure the dictionary format is correct. Not PHP problem. [2007-03-12 19:50:15] [EMAIL PROTECTED] I'm talking about Linux. [2007-03-12 19:42:06] david at mytton dot net This is the latest Windows version. [2007-03-12 19:03:17] [EMAIL PROTECTED] Try to update it to the latest stable version and see if this fixes the problem. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/40759 -- Edit this bug report at http://bugs.php.net/?id=40759edit=1
#40794 [NEW]: ReflectionObject::getValue()
From: igor at webta dot net Operating system: FreeBSD 6.0-RELEASE PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug description: ReflectionObject::getValue() Description: The following example results in a segfault in PHP 5: Reproduce code: --- ? $obj = new stdClass(); $obj-prop1 = '1'; $obj-prop2 = '2'; $reflect = new ReflectionObject($obj); $array = array(); foreach($reflect-getProperties() as $prop) { $array[$prop-getName()] = $prop-getValue($obj); } print_r($array); ? Expected result: Array ( [prop1] = 1 [prop2] = 2 ) Actual result: -- Segmentation fault (core dumped) (gdb) backtrace #0 0x0808a5fa in zim_reflection_property_getValue () #1 0x081501b6 in zend_do_fcall_common_helper_SPEC () #2 0x0814f915 in execute () #3 0x08137fcf in zend_execute_scripts () #4 0x08101f41 in php_execute_script () #5 0x081b0934 in main () -- Edit bug report at http://bugs.php.net/?id=40794edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40794r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40794r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40794r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40794r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40794r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40794r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40794r=needscript Try newer version:http://bugs.php.net/fix.php?id=40794r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40794r=support Expected behavior:http://bugs.php.net/fix.php?id=40794r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40794r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40794r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40794r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40794r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40794r=dst IIS Stability:http://bugs.php.net/fix.php?id=40794r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40794r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40794r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40794r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40794r=mysqlcfg
#40758 [Fbk-Opn]: Test fcgi_is_fastcgi() is wrong on windows
ID: 40758 User updated by: jostb2345 at yahoo dot com Reported By: jostb2345 at yahoo dot com -Status: Feedback +Status: Open Bug Type: CGI related Operating System: Windows (all versions) PHP Version: 5.2.1 Assigned To: dmitry New Comment: May be older PHP versions were able to support sockets on win32, but I have never seen any FastCGI plugin implmentation that passes sockets. PHPIntKitForWindows.zip = http://www.alphaworks.ibm.com/tech/phpintwasce/download Also I don't see any sockets advantages (only disadvantages). I don't think named pipes work on all operating systems. Furthermore Java supports only TCP socket communication (well, it is possible to access Windows and Unix named pipes from Java. But one has to implement it twice. RandomAccessFile on Windows, a pair of normal Files on Unix). To be practical -- and for backward compatibility -- we need a working TCP socket implementation on both operating systems. tcp sockets worked in PHP versions 5.2.0 and I don't see a good reason to drop this. Regards, Jost Boekemeier Previous Comments: [2007-03-12 17:21:32] [EMAIL PROTECTED] yes. PHP expects pipe but not a socket. In C you may even try to pass window HANDLE :) May be older PHP versions were able to support sockets on win32, but I have never seen any FastCGI plugin implmentation that passes sockets. Also I don't see any sockets advantages (only disadvantages). [2007-03-09 17:06:35] jostb2345 at yahoo dot com I don't understand for what reason some program passes stdout to PHP Because I thought you need to distinguish sockets from named pipes. I have attached code which crashes php since 5.2.0. Regards, Jost Boekemeier [2007-03-09 17:01:01] jostb2345 at yahoo dot de # include windows.h # include winsock2.h # define close closesocket term() { printf(err:%d, (GetLastError())); exit(1); } struct sockaddr_in saddr; main() { SOCKET listen_handle; SOCKADDR_IN saServer; char *cmd = php-cgi.exe; STARTUPINFO su_info; SECURITY_ATTRIBUTES sa = { 0 }; WORD wVersionRequested = MAKEWORD(1,1); WSADATA wsaData; int n = WSAStartup(wVersionRequested, wsaData); if (wsaData.wVersion != wVersionRequested) term(); listen_handle = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); saServer.sin_family = AF_INET; saServer.sin_addr.s_addr = INADDR_ANY; saServer.sin_port = htons(9667); n = bind(listen_handle, (LPSOCKADDR)saServer, sizeof(struct sockaddr)); if (n == SOCKET_ERROR) term(); n = listen(listen_handle, 20); if (n == SOCKET_ERROR) term(); ZeroMemory(su_info, sizeof(STARTUPINFO)); su_info.cb = sizeof(STARTUPINFO); su_info.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; su_info.wShowWindow = SW_HIDE; su_info.hStdInput = listen_handle; su_info.hStdError = INVALID_HANDLE_VALUE; su_info.hStdOutput = INVALID_HANDLE_VALUE; SetHandleInformation(su_info.hStdInput, HANDLE_FLAG_INHERIT, TRUE); PROCESS_INFORMATION p; if(CreateProcess(NULL, cmd, NULL, NULL, 1, 0, NULL, NULL, su_info, p)) { CloseHandle(p.hThread); closesocket(listen_handle); } else { term(); } if( WaitForSingleObject(p.hProcess, INFINITE) == WAIT_FAILED ){ term(); } WSACleanup(); } [2007-03-09 13:36:15] [EMAIL PROTECTED] I don't see any difference with old code. See OS_IsFcgi() and OS_LibInit(). Also I don't understand for what reason some program passes stdout to PHP. [2007-03-08 13:45:33] jostb2345 at yahoo dot com Description: On windows, php 5.2.0 and above the following code (written in pseudo-code) doesn't work anymore: socket = socket(AF_INET, ...); bind(socket, ...); listen(socket, ...); outputHandle=GetStdHandle(...); inputHandle=socket; CreateProcess(...,php-cgi.exe, ..., IOHandles); The problem is that is_fastcgi is only set if the OutputHandle and ErrorHandle are invalid. If both are invalid, InputHandle is assumed to be a named pipe. The Unix version still uses the old (correct) code. To correct this problem either the old FCGI_isfcgi() should be used or the test must be dublicated. See procedures: int fcgi_init(void); int fcgi_is_fastcgi(void); Regards, Jost Boekemeier Reproduce code: --- See above. If necessary I can provide a test program. -- Edit this bug report at http://bugs.php.net/?id=40758edit=1
#40735 [Fbk-Opn]: stream_select returns 0 for php 5.1.6
ID: 40735 User updated by: rodricg at sellingsource dot com Reported By: rodricg at sellingsource dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: x86_64 GNU/Linux PHP Version: 5CVS-2007-03-05 (snap) New Comment: The following script reproduces the behavior (for me): http://11434.com/stream_select.sh Changing -O2 to -O1 or removing --with-openssl fixes the problem. gcc version 4.1.2 openssl version 0.9.8d Previous Comments: [2007-03-13 11:05:36] [EMAIL PROTECTED] I still have no idea how to replicate it. [2007-03-12 16:54:41] rodricg at sellingsource dot com Same behavior with gcc 4.1.2. I'm chalking this up to gcc optimization and will compile with -O1 for now. [2007-03-06 21:14:57] [EMAIL PROTECTED] Try with GCC 4.1.2. GCC 4.1.1 is known to have some problems. [2007-03-06 21:08:57] rodricg at sellingsource dot com After further testing it seems that --with-curlwrappers is not the culprit but gcc optimization is. Using gcc version 4.1.1 (Gentoo 4.1.1-r3) I get the expected behavior when compiling with CFLAGS=-pipe but the erroneous behavior when compiling with CFLAGS=-pipe -O2. This is regardless of the curlwrappers setting. Sorry about the initial misinformation. Forgetting a make clean between several of my tests led me to the wrong conclusion. Just tried -O1 and it seems to be ok, will try with a different version of gcc. [2007-03-06 11:24:13] [EMAIL PROTECTED] I still get the expected result even with --with-curlwrappers. 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/40735 -- Edit this bug report at http://bugs.php.net/?id=40735edit=1
#40795 [NEW]: Unable to load the XML file
From: nags_chevula at us dot ibm dot com Operating system: WIN XP PHP version: 4.4.6 PHP Bug Type: DOM XML related Bug description: Unable to load the XML file Description: Unable to parse the following XMl file. ?xml version=1.0? Contact NameNagarjun/Name Phone111-222-/Phone /Contact Contact NameDebabrata/Name Phone222-777-/Phone /Contact Contact NameAndrea/Name Phone333-777-/Phone /Contact Contact NameCharlotte/Name Phone444-777-/Phone /Contact I was able to parse the file ?xml version=1.0? Contact NameNagarjun/Name Phone111-222-/Phone /Contact Reproduce code: --- $file = C:/temp2/SNZ/input/testxml.xml; if (!$DomDocument = domxml_open_file($file)){ echo Couldn't load xml...; exit; } Expected result: I did not want to see the error Couldn't load xml Actual result: -- [13-Mar-2007 11:23:26] PHP Warning: domxml_open_file() [a href='function.domxml-open-file'function.domxml-open-file/a]: Extra content at the end of the document in C:\IBM\IBMHTTPServer\htdocs\en_US\Nags\ParseXMLFile1.php on line 12 -- Edit bug report at http://bugs.php.net/?id=40795edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40795r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40795r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40795r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40795r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40795r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40795r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40795r=needscript Try newer version:http://bugs.php.net/fix.php?id=40795r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40795r=support Expected behavior:http://bugs.php.net/fix.php?id=40795r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40795r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40795r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40795r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40795r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40795r=dst IIS Stability:http://bugs.php.net/fix.php?id=40795r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40795r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40795r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40795r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40795r=mysqlcfg
#40759 [Fbk-Opn]: pspell_new_personal does not load custom dictionary
ID: 40759 User updated by: david at mytton dot net Reported By: david at mytton dot net -Status: Feedback +Status: Open Bug Type: Pspell related Operating System: Windows XP PHP Version: 5.2.1 New Comment: Yeah. So how can we go about fixing this? The pspell_new_personal() function doesn't seem to return any kind of error even if the personal dictionary path provided doesn't exist (error reporting all on etc). Is your personal dictionary in the same format as mine? custom.dict: personal_ws-1.1 en 1 bloomsbury Previous Comments: [2007-03-13 15:45:20] [EMAIL PROTECTED] As I said, it works fine here both on Linux and Windows. [2007-03-13 15:28:41] david at mytton dot net I reinstalled Aspell on Windows and am still unable to get it to pick up the custom dictionary. The file format I am using is: personal_ws-1.1 en 1 bloomsbury in custom.dict with the code in my original description. [2007-03-13 11:04:52] [EMAIL PROTECTED] Not reproducible on Windows either. Check your Aspell install and make sure the dictionary format is correct. Not PHP problem. [2007-03-12 19:50:15] [EMAIL PROTECTED] I'm talking about Linux. [2007-03-12 19:42:06] david at mytton dot net This is the latest Windows version. 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/40759 -- Edit this bug report at http://bugs.php.net/?id=40759edit=1
#40795 [Opn-Bgs]: Unable to load the XML file
ID: 40795 Updated by: [EMAIL PROTECTED] Reported By: nags_chevula at us dot ibm dot com -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: WIN XP PHP Version: 4.4.6 New Comment: Your XML is not well-formed. There's no single root element. Clearly not a PHP issue Previous Comments: [2007-03-13 17:29:06] nags_chevula at us dot ibm dot com Description: Unable to parse the following XMl file. ?xml version=1.0? Contact NameNagarjun/Name Phone111-222-/Phone /Contact Contact NameDebabrata/Name Phone222-777-/Phone /Contact Contact NameAndrea/Name Phone333-777-/Phone /Contact Contact NameCharlotte/Name Phone444-777-/Phone /Contact I was able to parse the file ?xml version=1.0? Contact NameNagarjun/Name Phone111-222-/Phone /Contact Reproduce code: --- $file = C:/temp2/SNZ/input/testxml.xml; if (!$DomDocument = domxml_open_file($file)){ echo Couldn't load xml...; exit; } Expected result: I did not want to see the error Couldn't load xml Actual result: -- [13-Mar-2007 11:23:26] PHP Warning: domxml_open_file() [a href='function.domxml-open-file'function.domxml-open-file/a]: Extra content at the end of the document in C:\IBM\IBMHTTPServer\htdocs\en_US\Nags\ParseXMLFile1.php on line 12 -- Edit this bug report at http://bugs.php.net/?id=40795edit=1
#40796 [NEW]: ODBC connect fails using
From: callahal at vaniercollege dot qc dot ca Operating system: Windows 2003 svr std PHP version: 5.2.1 PHP Bug Type: ODBC related Bug description: ODBC connect fails using Description: Setup is Windows 2003 Server STD, IIS6, PHP 5.2.1 using php-cgi.exe I cannoct connect to my system dsn datasource which, as shown, is the northwind sample database on Ms_SQL Server 2000. If I use php5isapi.dll, everything works fine. However I prefer to use the php-cgi.exe. All of php.exe, php-cgi.exe and php5isapi.dll work fine with ODBC connects with PHP version 5.2.0. Reproduce code: --- if($odbc_db = odbc_connect('Northwind', 'sample', 'sample')){ echo Connected AOK. eol ; }else{ die(Could not connect to ODBC data source Northwind); } Expected result: I should connect -- Edit bug report at http://bugs.php.net/?id=40796edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40796r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40796r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40796r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40796r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40796r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40796r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40796r=needscript Try newer version:http://bugs.php.net/fix.php?id=40796r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40796r=support Expected behavior:http://bugs.php.net/fix.php?id=40796r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40796r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40796r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40796r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40796r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40796r=dst IIS Stability:http://bugs.php.net/fix.php?id=40796r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40796r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40796r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40796r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40796r=mysqlcfg
#40794 [Opn-Fbk]: ReflectionObject::getValue()
ID: 40794 Updated by: [EMAIL PROTECTED] Reported By: igor at webta dot net -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: FreeBSD 6.0-RELEASE PHP Version: 5.2.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: [2007-03-13 16:59:48] igor at webta dot net Description: The following example results in a segfault in PHP 5: Reproduce code: --- ? $obj = new stdClass(); $obj-prop1 = '1'; $obj-prop2 = '2'; $reflect = new ReflectionObject($obj); $array = array(); foreach($reflect-getProperties() as $prop) { $array[$prop-getName()] = $prop-getValue($obj); } print_r($array); ? Expected result: Array ( [prop1] = 1 [prop2] = 2 ) Actual result: -- Segmentation fault (core dumped) (gdb) backtrace #0 0x0808a5fa in zim_reflection_property_getValue () #1 0x081501b6 in zend_do_fcall_common_helper_SPEC () #2 0x0814f915 in execute () #3 0x08137fcf in zend_execute_scripts () #4 0x08101f41 in php_execute_script () #5 0x081b0934 in main () -- Edit this bug report at http://bugs.php.net/?id=40794edit=1
#40796 [Opn-Bgs]: ODBC connect fails using
ID: 40796 Updated by: [EMAIL PROTECTED] Reported By: callahal at vaniercollege dot qc dot ca -Status: Open +Status: Bogus Bug Type: ODBC related Operating System: Windows 2003 svr std PHP Version: 5.2.1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Use odbc_errormsg() to get the error message. Previous Comments: [2007-03-13 18:07:42] callahal at vaniercollege dot qc dot ca Description: Setup is Windows 2003 Server STD, IIS6, PHP 5.2.1 using php-cgi.exe I cannoct connect to my system dsn datasource which, as shown, is the northwind sample database on Ms_SQL Server 2000. If I use php5isapi.dll, everything works fine. However I prefer to use the php-cgi.exe. All of php.exe, php-cgi.exe and php5isapi.dll work fine with ODBC connects with PHP version 5.2.0. Reproduce code: --- if($odbc_db = odbc_connect('Northwind', 'sample', 'sample')){ echo Connected AOK. eol ; }else{ die(Could not connect to ODBC data source Northwind); } Expected result: I should connect -- Edit this bug report at http://bugs.php.net/?id=40796edit=1
#40759 [Opn-Fbk]: pspell_new_personal does not load custom dictionary
ID: 40759 Updated by: [EMAIL PROTECTED] Reported By: david at mytton dot net -Status: Open +Status: Feedback Bug Type: Pspell related Operating System: Windows XP PHP Version: 5.2.1 New Comment: Yeah. So how can we go about fixing this? First make sure it works for you using Aspell console utilities. Is your personal dictionary in the same format as mine? It's a copy/paste. Previous Comments: [2007-03-13 18:39:15] david at mytton dot net Yeah. So how can we go about fixing this? The pspell_new_personal() function doesn't seem to return any kind of error even if the personal dictionary path provided doesn't exist (error reporting all on etc). Is your personal dictionary in the same format as mine? custom.dict: personal_ws-1.1 en 1 bloomsbury [2007-03-13 15:45:20] [EMAIL PROTECTED] As I said, it works fine here both on Linux and Windows. [2007-03-13 15:28:41] david at mytton dot net I reinstalled Aspell on Windows and am still unable to get it to pick up the custom dictionary. The file format I am using is: personal_ws-1.1 en 1 bloomsbury in custom.dict with the code in my original description. [2007-03-13 11:04:52] [EMAIL PROTECTED] Not reproducible on Windows either. Check your Aspell install and make sure the dictionary format is correct. Not PHP problem. [2007-03-12 19:50:15] [EMAIL PROTECTED] I'm talking about Linux. 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/40759 -- Edit this bug report at http://bugs.php.net/?id=40759edit=1
#40735 [Opn-Fbk]: stream_select returns 0 for php 5.1.6
ID: 40735 Updated by: [EMAIL PROTECTED] Reported By: rodricg at sellingsource dot com -Status: Open +Status: Feedback Bug Type: Streams related Operating System: x86_64 GNU/Linux PHP Version: 5CVS-2007-03-05 (snap) New Comment: Still works perfectly fine with or without OpenSSL, with and without -O2. I think I'll need an acccount on your machine to reproduce it. Previous Comments: [2007-03-13 16:26:40] rodricg at sellingsource dot com The following script reproduces the behavior (for me): http://11434.com/stream_select.sh Changing -O2 to -O1 or removing --with-openssl fixes the problem. gcc version 4.1.2 openssl version 0.9.8d [2007-03-13 11:05:36] [EMAIL PROTECTED] I still have no idea how to replicate it. [2007-03-12 16:54:41] rodricg at sellingsource dot com Same behavior with gcc 4.1.2. I'm chalking this up to gcc optimization and will compile with -O1 for now. [2007-03-06 21:14:57] [EMAIL PROTECTED] Try with GCC 4.1.2. GCC 4.1.1 is known to have some problems. [2007-03-06 21:08:57] rodricg at sellingsource dot com After further testing it seems that --with-curlwrappers is not the culprit but gcc optimization is. Using gcc version 4.1.1 (Gentoo 4.1.1-r3) I get the expected behavior when compiling with CFLAGS=-pipe but the erroneous behavior when compiling with CFLAGS=-pipe -O2. This is regardless of the curlwrappers setting. Sorry about the initial misinformation. Forgetting a make clean between several of my tests led me to the wrong conclusion. Just tried -O1 and it seems to be ok, will try with a different version of gcc. 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/40735 -- Edit this bug report at http://bugs.php.net/?id=40735edit=1
#40796 [Bgs]: ODBC connect fails using
ID: 40796 User updated by: callahal at vaniercollege dot qc dot ca Reported By: callahal at vaniercollege dot qc dot ca Status: Bogus Bug Type: ODBC related Operating System: Windows 2003 svr std PHP Version: 5.2.1 New Comment: Well If you say it's bogus -- fine. But as I said, on the same machine - swap out the 5.2.1 and put back 5.2.0 and everything works fine. And BTW it's only the ODBC connect that doesn't work OCi8 works fine and so does MySQL connections. But what do I know. Previous Comments: [2007-03-13 19:12:33] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Use odbc_errormsg() to get the error message. [2007-03-13 18:07:42] callahal at vaniercollege dot qc dot ca Description: Setup is Windows 2003 Server STD, IIS6, PHP 5.2.1 using php-cgi.exe I cannoct connect to my system dsn datasource which, as shown, is the northwind sample database on Ms_SQL Server 2000. If I use php5isapi.dll, everything works fine. However I prefer to use the php-cgi.exe. All of php.exe, php-cgi.exe and php5isapi.dll work fine with ODBC connects with PHP version 5.2.0. Reproduce code: --- if($odbc_db = odbc_connect('Northwind', 'sample', 'sample')){ echo Connected AOK. eol ; }else{ die(Could not connect to ODBC data source Northwind); } Expected result: I should connect -- Edit this bug report at http://bugs.php.net/?id=40796edit=1
#40795 [Bgs]: Unable to load the XML file
ID: 40795 User updated by: nags_chevula at us dot ibm dot com Reported By: nags_chevula at us dot ibm dot com Status: Bogus Bug Type: DOM XML related Operating System: WIN XP PHP Version: 4.4.6 New Comment: I know it is not a requirement to have a single root element. I can have multiple root elements based on DTD definition. Does inclusion of DTD definition make my document well formed. Correct me if I am wrong? I am under the impression that I can have multiple root elements. I need to go back and read XML Specs. I would appreciate your response. thanks Nags Previous Comments: [2007-03-13 18:39:45] [EMAIL PROTECTED] Your XML is not well-formed. There's no single root element. Clearly not a PHP issue [2007-03-13 17:29:06] nags_chevula at us dot ibm dot com Description: Unable to parse the following XMl file. ?xml version=1.0? Contact NameNagarjun/Name Phone111-222-/Phone /Contact Contact NameDebabrata/Name Phone222-777-/Phone /Contact Contact NameAndrea/Name Phone333-777-/Phone /Contact Contact NameCharlotte/Name Phone444-777-/Phone /Contact I was able to parse the file ?xml version=1.0? Contact NameNagarjun/Name Phone111-222-/Phone /Contact Reproduce code: --- $file = C:/temp2/SNZ/input/testxml.xml; if (!$DomDocument = domxml_open_file($file)){ echo Couldn't load xml...; exit; } Expected result: I did not want to see the error Couldn't load xml Actual result: -- [13-Mar-2007 11:23:26] PHP Warning: domxml_open_file() [a href='function.domxml-open-file'function.domxml-open-file/a]: Extra content at the end of the document in C:\IBM\IBMHTTPServer\htdocs\en_US\Nags\ParseXMLFile1.php on line 12 -- Edit this bug report at http://bugs.php.net/?id=40795edit=1
#40425 [Fbk-Opn]: php_getuid() always return 1.
ID: 40425 User updated by: priappub at yahoo dot fr Reported By: priappub at yahoo dot fr -Status: Feedback +Status: Open Bug Type: Safe Mode/open_basedir Operating System: Solaris 10 PHP Version: 5.2.1 New Comment: The 2 versions are not working at the same time. Previous Comments: [2007-03-12 09:42:31] [EMAIL PROTECTED] Two different apaches in one server root? How did you manage to do that? [2007-03-10 20:32:45] priappub at yahoo dot fr The self-compiled apache: [EMAIL PROTECTED] bin]# ./httpd -V Server version: Apache/2.0.59 Server built: Feb 22 2007 00:29:21 Server's Module Magic Number: 20020903:12 Server loaded: APR 0.9.12, APR-UTIL 0.9.12 Compiled using: APR 0.9.12, APR-UTIL 0.9.12 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/apache2 -D SUEXEC_BIN=/usr/apache2/bin/suexec -D DEFAULT_PIDLOG=/var/logs/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=/var/logs/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=/etc/apache2/mime.types -D SERVER_CONFIG_FILE=/etc/apache2/httpd.conf [2007-03-09 23:37:38] [EMAIL PROTECTED] Well, then provide the one from the self-compiled apache. [2007-03-09 16:09:31] priappub at yahoo dot fr This is the httpd -V from apache provided by SUN. [2007-03-09 10:40:27] [EMAIL PROTECTED] And the same for Sun apache, please. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/40425 -- Edit this bug report at http://bugs.php.net/?id=40425edit=1
#40425 [Opn-Fbk]: php_getuid() always return 1.
ID: 40425 Updated by: [EMAIL PROTECTED] Reported By: priappub at yahoo dot fr -Status: Open +Status: Feedback Bug Type: Safe Mode/open_basedir Operating System: Solaris 10 PHP Version: 5.2.1 New Comment: Sure, but they can't be in the same directory in the same time. Previous Comments: [2007-03-13 20:35:27] priappub at yahoo dot fr The 2 versions are not working at the same time. [2007-03-12 09:42:31] [EMAIL PROTECTED] Two different apaches in one server root? How did you manage to do that? [2007-03-10 20:32:45] priappub at yahoo dot fr The self-compiled apache: [EMAIL PROTECTED] bin]# ./httpd -V Server version: Apache/2.0.59 Server built: Feb 22 2007 00:29:21 Server's Module Magic Number: 20020903:12 Server loaded: APR 0.9.12, APR-UTIL 0.9.12 Compiled using: APR 0.9.12, APR-UTIL 0.9.12 Architecture: 32-bit Server compiled with -D APACHE_MPM_DIR=server/mpm/prefork -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT=/usr/apache2 -D SUEXEC_BIN=/usr/apache2/bin/suexec -D DEFAULT_PIDLOG=/var/logs/httpd.pid -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_LOCKFILE=/var/logs/accept.lock -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=/etc/apache2/mime.types -D SERVER_CONFIG_FILE=/etc/apache2/httpd.conf [2007-03-09 23:37:38] [EMAIL PROTECTED] Well, then provide the one from the self-compiled apache. [2007-03-09 16:09:31] priappub at yahoo dot fr This is the httpd -V from apache provided by SUN. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/40425 -- Edit this bug report at http://bugs.php.net/?id=40425edit=1
#38238 [Com]: PHP with PEAR running on IIS
ID: 38238 Comment by: jmvoodoo at gmail dot com Reported By: rmarescu at gmail dot com Status: No Feedback Bug Type: IIS related Operating System: MS Windows Server 2003 PHP Version: 5.1.4 New Comment: I am getting this same behavior with 4.4.6, latest stable version that i'm aware of. Previous Comments: [2007-02-01 10:43:39] [EMAIL PROTECTED] Upgrade to the latest stable version. [2007-02-01 07:02:25] shinijin at mail dot ru PHP has encountered an Access Violation at 7C8224B PHP 5.1.4 Win IIS MySQL Curent bug apears during the HTML pages generation from php. Is there any progress on this issue? [2006-10-10 20:43:49] chavousc at gmail dot com I, too, am receiving access violation 7C8224B2 on IIS using the ISAPI module. It only starts to occur after the site has been running for a few hours to a few days... I'm running PHP version 5.1.6 mysql 5.0.24-community-nt Win2k3/IIS/ISAPI module I will happily assist however I can. I'm not sure if I'll be able to get the backtrace on my production machine, but if you think it will help, I will try! [2006-09-25 19:45:53] webmaster at impactbs dot com Just as a follow up, switching to CGI has stabilized the site but it's running more slowly. [2006-09-23 06:27:03] webmaster at impactbs dot com IIS 6 Win2003 SP1 standard PHP 5.1.6 ISAPI The site is running Invision Power Board 2.7 in it's own application pool using the MSSQL driver. I'm getting the same error: PHP has encountered an Access Violation at 7C8224B2 Intermittently on a forum that's actively serving 30-80 at a given time but this error also happened before the DNS was even pointed to the site (basically it started just after I installed PHP 5 on the server that didn't have PHP on it before the site was hosted on it). I think you're already aware of the problem but if I can provide anymore information let me know. I'm going to move to the CGI version which apparently is more stable under IIS. 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/38238 -- Edit this bug report at http://bugs.php.net/?id=38238edit=1
#40014 [Opn-Bgs]: try, catch -- Let's Empower It, Please!!!
ID: 40014 Updated by: [EMAIL PROTECTED] Reported By: marcus3v at hotmail dot com -Status: Open +Status: Bogus Bug Type:Feature/Change Request PHP Version: 6CVS-2007-01-03 (CVS) 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 Just register an error handler that throws an exception. Previous Comments: [2007-03-09 22:37:57] bronner dot mike at gmail dot com Same here, have been getting that behavior as well. Keeping fatal errors from users would be nice. It would also let us exit gracefully, and not leave the users hanging. [2007-01-03 20:44:54] marcus3v at hotmail dot com Description: Hey, men! What about to enhance the try, catch Statement so that the code inside try would transparently cause a Fatal Error that, then, is handled through the catch Blocks -- just as occurs in JavaScript?! Reproduce code: --- try { /*@@*/ echo([global] -- causing a Fatal Error...); $nonObjVar-method(); //## nonObjVar isn't defined } catch(Exception $error) { /*@@*/ echo([global] -- some handling being executed...); //## some handling... } /*@@*/ echo([global] -- [end]); Expected result: The output would be the following: # [global] -- causing a Fatal Error... # [global] -- some handling being executed... # [global] -- [end] Actual result: -- Obviously, the output with the current implementation is the following: # [global] -- causing a Fatal Error... # ( PHP Notice ) undefined Variable: nonObjVar # ( PHP Fatal Error ) call to member a Funcion ( method() ) on a non-Object -- Edit this bug report at http://bugs.php.net/?id=40014edit=1
#40797 [NEW]: empty() breaks when overloading with __get
From: stephan_schmidt at usa dot com Operating system: Windows 200X PHP version: 5.2.1 PHP Bug Type: Class/Object related Bug description: empty() breaks when overloading with __get Description: When overloading with __get() to grab an index of an associative array inside an object, the overloaded variable returns 'false' when tested with empty() whether the value is empty or not (see Example 2 for incorrect results). Testing overloaded variables that were not in an associative array with empty() returns the expected results (Example 3). Reproduce code: --- ? class A { public $myArray = array('nonEmptyVar' = 5, 'emptyVar' = ''); function __get($var) { return $this-myArray[$var]; } } class B { public $nonEmptyVar = 5; public $emptyVar = ''; function __get($var) { return $this-$var; } } $a = new A(); $b = new B(); echo 'pExample 1:br'; echo empty($a-myArray['nonEmptyVar']) ? 'empty' : 'not empty'; echo 'br'; echo empty($a-myArray['emptyVar']) ? 'empty' : 'not empty'; echo 'pExample 2:br'; var_dump($a-nonEmptyVar); echo empty($a-nonEmptyVar) ? 'empty' : 'not empty'; echo 'br'; var_dump($a-emptyVar); echo empty($a-emptyVar) ? 'empty' : 'not empty'; echo 'pExample 3:br'; echo empty($b-nonEmptyVar) ? 'empty' : 'not empty'; echo 'br'; echo empty($b-emptyVar) ? 'empty' : 'not empty'; ? Expected result: Example 1: not empty empty Example 2: int(5) not empty string(0) empty Example 3: not empty empty Actual result: -- Example 1: not empty empty Example 2: int(5) empty string(0) empty Example 3: not empty empty -- Edit bug report at http://bugs.php.net/?id=40797edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40797r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40797r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40797r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40797r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40797r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40797r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40797r=needscript Try newer version:http://bugs.php.net/fix.php?id=40797r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40797r=support Expected behavior:http://bugs.php.net/fix.php?id=40797r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40797r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40797r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40797r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40797r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40797r=dst IIS Stability:http://bugs.php.net/fix.php?id=40797r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40797r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40797r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40797r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40797r=mysqlcfg
#40797 [Opn-Fbk]: empty() breaks when overloading with __get
ID: 40797 Updated by: [EMAIL PROTECTED] Reported By: stephan_schmidt at usa dot com -Status: Open +Status: Feedback Bug Type: Class/Object related Operating System: Windows 200X PHP Version: 5.2.1 New Comment: That's exactly how it works here. Make sure you've disable any zend_extensions. Previous Comments: [2007-03-13 23:57:17] stephan_schmidt at usa dot com Description: When overloading with __get() to grab an index of an associative array inside an object, the overloaded variable returns 'false' when tested with empty() whether the value is empty or not (see Example 2 for incorrect results). Testing overloaded variables that were not in an associative array with empty() returns the expected results (Example 3). Reproduce code: --- ? class A { public $myArray = array('nonEmptyVar' = 5, 'emptyVar' = ''); function __get($var) { return $this-myArray[$var]; } } class B { public $nonEmptyVar = 5; public $emptyVar = ''; function __get($var) { return $this-$var; } } $a = new A(); $b = new B(); echo 'pExample 1:br'; echo empty($a-myArray['nonEmptyVar']) ? 'empty' : 'not empty'; echo 'br'; echo empty($a-myArray['emptyVar']) ? 'empty' : 'not empty'; echo 'pExample 2:br'; var_dump($a-nonEmptyVar); echo empty($a-nonEmptyVar) ? 'empty' : 'not empty'; echo 'br'; var_dump($a-emptyVar); echo empty($a-emptyVar) ? 'empty' : 'not empty'; echo 'pExample 3:br'; echo empty($b-nonEmptyVar) ? 'empty' : 'not empty'; echo 'br'; echo empty($b-emptyVar) ? 'empty' : 'not empty'; ? Expected result: Example 1: not empty empty Example 2: int(5) not empty string(0) empty Example 3: not empty empty Actual result: -- Example 1: not empty empty Example 2: int(5) empty string(0) empty Example 3: not empty empty -- Edit this bug report at http://bugs.php.net/?id=40797edit=1
#40797 [Fbk-Opn]: empty() breaks when overloading with __get
ID: 40797 User updated by: stephan_schmidt at usa dot com Reported By: stephan_schmidt at usa dot com -Status: Feedback +Status: Open Bug Type: Class/Object related Operating System: Windows 200X PHP Version: 5.2.1 New Comment: The Actual Results were from the results of the above script run on a clean install of PHP 5.2.1 (Win 2000 SP4). No zend extensions are present or in use. The code above did not run as expected on any of the Win 200X servers it was tested on. Line 6 of the output read int(5) empty in every test case. I suspect it may have to do with the fact that empty() does not accept a function call as a parameter (i.e. empty(trim($myVar))) since overloading calls __get. However, one would expect it to also result in a fatal error if that were the case. Previous Comments: [2007-03-14 00:11:15] [EMAIL PROTECTED] That's exactly how it works here. Make sure you've disable any zend_extensions. [2007-03-13 23:57:17] stephan_schmidt at usa dot com Description: When overloading with __get() to grab an index of an associative array inside an object, the overloaded variable returns 'false' when tested with empty() whether the value is empty or not (see Example 2 for incorrect results). Testing overloaded variables that were not in an associative array with empty() returns the expected results (Example 3). Reproduce code: --- ? class A { public $myArray = array('nonEmptyVar' = 5, 'emptyVar' = ''); function __get($var) { return $this-myArray[$var]; } } class B { public $nonEmptyVar = 5; public $emptyVar = ''; function __get($var) { return $this-$var; } } $a = new A(); $b = new B(); echo 'pExample 1:br'; echo empty($a-myArray['nonEmptyVar']) ? 'empty' : 'not empty'; echo 'br'; echo empty($a-myArray['emptyVar']) ? 'empty' : 'not empty'; echo 'pExample 2:br'; var_dump($a-nonEmptyVar); echo empty($a-nonEmptyVar) ? 'empty' : 'not empty'; echo 'br'; var_dump($a-emptyVar); echo empty($a-emptyVar) ? 'empty' : 'not empty'; echo 'pExample 3:br'; echo empty($b-nonEmptyVar) ? 'empty' : 'not empty'; echo 'br'; echo empty($b-emptyVar) ? 'empty' : 'not empty'; ? Expected result: Example 1: not empty empty Example 2: int(5) not empty string(0) empty Example 3: not empty empty Actual result: -- Example 1: not empty empty Example 2: int(5) empty string(0) empty Example 3: not empty empty -- Edit this bug report at http://bugs.php.net/?id=40797edit=1
#40798 [NEW]: Array of mysql_result items not recognized as such
From: mailme at granville dot nl Operating system: WINDOWS XP PHP version: 5.2.1 PHP Bug Type: MySQL related Bug description: Array of mysql_result items not recognized as such Description: SITUATION: I build an array using $array[] = mysql_result($resource, $record, $column);. Afterwards I want to seek in the array using if (in_array($needle,array)) but I get an error Warning: in_array() [function.in-array]: Wrong datatype for second argument. If one line higher I test using is_array() I will get true and using print_r() also gives me the array contents. If I add an extra item to the array using $array[] = 'string'. The error is not given -- Edit bug report at http://bugs.php.net/?id=40798edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40798r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40798r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40798r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40798r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40798r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40798r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40798r=needscript Try newer version:http://bugs.php.net/fix.php?id=40798r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40798r=support Expected behavior:http://bugs.php.net/fix.php?id=40798r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40798r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40798r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40798r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40798r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40798r=dst IIS Stability:http://bugs.php.net/fix.php?id=40798r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40798r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40798r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40798r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40798r=mysqlcfg
#40798 [Opn]: Array of mysql_result items not recognized as such
ID: 40798 User updated by: mailme at granville dot nl Reported By: mailme at granville dot nl Status: Open Bug Type: MySQL related Operating System: WINDOWS XP PHP Version: 5.2.1 New Comment: I ACTUALLY ENTERED A SMALL ERROR IN MY SUBMISSION: Afterwards I want to seek in the array using: if (in_array($needle, $array)) but I get an error Warning: in_array() [function.in-array]: Wrong datatype for second argument. Previous Comments: [2007-03-14 01:09:57] mailme at granville dot nl Description: SITUATION: I build an array using $array[] = mysql_result($resource, $record, $column);. Afterwards I want to seek in the array using if (in_array($needle,array)) but I get an error Warning: in_array() [function.in-array]: Wrong datatype for second argument. If one line higher I test using is_array() I will get true and using print_r() also gives me the array contents. If I add an extra item to the array using $array[] = 'string'. The error is not given -- Edit this bug report at http://bugs.php.net/?id=40798edit=1
#40798 [Opn-Bgs]: Array of mysql_result items not recognized as such
ID: 40798 Updated by: [EMAIL PROTECTED] Reported By: mailme at granville dot nl -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: WINDOWS XP PHP Version: 5.2.1 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: [2007-03-14 01:14:31] mailme at granville dot nl I ACTUALLY ENTERED A SMALL ERROR IN MY SUBMISSION: Afterwards I want to seek in the array using: if (in_array($needle, $array)) but I get an error Warning: in_array() [function.in-array]: Wrong datatype for second argument. [2007-03-14 01:09:57] mailme at granville dot nl Description: SITUATION: I build an array using $array[] = mysql_result($resource, $record, $column);. Afterwards I want to seek in the array using if (in_array($needle,array)) but I get an error Warning: in_array() [function.in-array]: Wrong datatype for second argument. If one line higher I test using is_array() I will get true and using print_r() also gives me the array contents. If I add an extra item to the array using $array[] = 'string'. The error is not given -- Edit this bug report at http://bugs.php.net/?id=40798edit=1
#40797 [Opn-Asn]: empty() breaks when overloading with __get
ID: 40797 Updated by: [EMAIL PROTECTED] Reported By: stephan_schmidt at usa dot com -Status: Open +Status: Assigned Bug Type: Class/Object related Operating System: Windows 200X PHP Version: 5.2.1 -Assigned To: +Assigned To: dmitry New Comment: Dmitry, please take a look at zend_std_has_property(). Previous Comments: [2007-03-14 00:57:08] stephan_schmidt at usa dot com The Actual Results were from the results of the above script run on a clean install of PHP 5.2.1 (Win 2000 SP4). No zend extensions are present or in use. The code above did not run as expected on any of the Win 200X servers it was tested on. Line 6 of the output read int(5) empty in every test case. I suspect it may have to do with the fact that empty() does not accept a function call as a parameter (i.e. empty(trim($myVar))) since overloading calls __get. However, one would expect it to also result in a fatal error if that were the case. [2007-03-14 00:11:15] [EMAIL PROTECTED] That's exactly how it works here. Make sure you've disable any zend_extensions. [2007-03-13 23:57:17] stephan_schmidt at usa dot com Description: When overloading with __get() to grab an index of an associative array inside an object, the overloaded variable returns 'false' when tested with empty() whether the value is empty or not (see Example 2 for incorrect results). Testing overloaded variables that were not in an associative array with empty() returns the expected results (Example 3). Reproduce code: --- ? class A { public $myArray = array('nonEmptyVar' = 5, 'emptyVar' = ''); function __get($var) { return $this-myArray[$var]; } } class B { public $nonEmptyVar = 5; public $emptyVar = ''; function __get($var) { return $this-$var; } } $a = new A(); $b = new B(); echo 'pExample 1:br'; echo empty($a-myArray['nonEmptyVar']) ? 'empty' : 'not empty'; echo 'br'; echo empty($a-myArray['emptyVar']) ? 'empty' : 'not empty'; echo 'pExample 2:br'; var_dump($a-nonEmptyVar); echo empty($a-nonEmptyVar) ? 'empty' : 'not empty'; echo 'br'; var_dump($a-emptyVar); echo empty($a-emptyVar) ? 'empty' : 'not empty'; echo 'pExample 3:br'; echo empty($b-nonEmptyVar) ? 'empty' : 'not empty'; echo 'br'; echo empty($b-emptyVar) ? 'empty' : 'not empty'; ? Expected result: Example 1: not empty empty Example 2: int(5) not empty string(0) empty Example 3: not empty empty Actual result: -- Example 1: not empty empty Example 2: int(5) empty string(0) empty Example 3: not empty empty -- Edit this bug report at http://bugs.php.net/?id=40797edit=1
#40701 [Opn]: Memory allocation error
ID: 40701 User updated by: michaeldaly at magma dot ca Reported By: michaeldaly at magma dot ca Status: Open Bug Type: Unknown/Other Function Operating System: Win XP Pro PHP Version: 5.2.2 New Comment: With memory_limit = -1 there is no change. Previous Comments: [2007-03-12 03:40:34] [EMAIL PROTECTED] Just out of the curiousity: what happens when you disable memory limit altogether? memory_limit=-1 [2007-03-07 16:04:57] michaeldaly at magma dot ca It _does_ report 8Mb - PHP Fatal error: Out of memory (allocated 8388608) (tried to allocate 393216 bytes). It also reports from 786KB to 9.2MB, so it appears that if the problem is a limit set externally, that limit is floating dynamically. Yes, please search for memory_limit in your scripts,.htacess and httpd.conf. I searched for memory in the entire Apache directory tree and found nothing that resembles a limit. I looked through httpd.conf and httpd_vhosts.conf visually and can find nothing else that looks like a memory restriction. The only limit I can find is in PHP.ini. [2007-03-07 09:13:06] [EMAIL PROTECTED] PHP does _not_ report 8MB - it reports 512MB as per the php.ini setting. It _does_ report 8Mb - PHP Fatal error: Out of memory (allocated 8388608) (tried to allocate 393216 bytes). This is reported in phpinfo.php. memory_limit can be changed per-virtualhost, per-directory and per-script. Therefore phpinfo() might show you 512Mb, but the real script might use different value. Is there a way for me to capture some kind of debug information that can help you? Yes, please search for memory_limit in your scripts,.htacess and httpd.conf. [2007-03-06 20:54:33] michaeldaly at magma dot ca Is there a way for me to capture some kind of debug information that can help you? I downloaded the debug files along with the latest snap and they were just PDB files and I don't know what to do with them. [2007-03-06 18:10:37] [EMAIL PROTECTED] Cannot reproduce anything like that. 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/40701 -- Edit this bug report at http://bugs.php.net/?id=40701edit=1
#40799 [NEW]: change string conversion behaviour for objects not implementing __toString()
From: oliver dot graetz at gmx dot de Operating system: any PHP version: 5.2.1 PHP Bug Type: Feature/Change Request Bug description: change string conversion behaviour for objects not implementing __toString() Description: Yes, I read the upgrade guide and the other bug reports regarding this topic so this is not a bug report but a plea for reconsideration. I really like that finally __toString() works in every situation but the inability to output object instances without __toString() defined is just too annoying. PHP preaches the KISS principle and on this issue the language is breaking its own rules. First of all, there are engine internal classes where the programmer is unable to provide a __toString method. Subclassing all of these classes upon usage just to be on the safe side is nonsense. If object output can't be changed to provide a fallback if __toString() is missing then at least all engine internal classes should implement their own default output. Secondly, for safety many programmers might be tempted to make all classes extend a common superclass just to be on the safe side. This is braindead for the sake of any OOP concept but I already see some guys on the horizon ready to do it. And at last: There are so many convenient functions that just break if their input contains problem objects. It just makes no sense that PHP forces me to implement an object safe version of implode()! I just had to do that and the loss of performance makes me shudder. Rasmus once said that PHP should only be a frontend for PHP templates that make use of as much precompiled code as possible. So why are these templates forced to implement ever more stuff in the userland? Suggestions: - at least implement default output for all engine internal classes - change __toString() to have a fallback, even [__toString() missing] improves on the current situation -- if this isn't POSSIBLE: PLEASE clearly state why at prominent places in the documentation. -- if this isn't WANTED: make it configurable or better, add a magic function, for example __tostring_fallback(), which should return a string. If it doesn't exist or doesn't return a string: go ahead raising the recoverable error! Abusing an error handler to do this is NOT a solution. Reproduce code: --- ?php echo new DateTime(); /* * How about this yielding the ISO formatted date or a timestamp? * Possibly even as debug output like * * [DateTime object: 2004-02-12T15:19:21+00:00] * * Definitely better than raising an error! */ Expected result: some output and the script continuing Actual result: -- PHP Catchable fatal error: Object of class DateTime could not be converted to string in C:\test.php on line 2 Catchable fatal error: Object of class DateTime could not be converted to string in C:\test.php on line 2 -- Edit bug report at http://bugs.php.net/?id=40799edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40799r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40799r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40799r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40799r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40799r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40799r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40799r=needscript Try newer version:http://bugs.php.net/fix.php?id=40799r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40799r=support Expected behavior:http://bugs.php.net/fix.php?id=40799r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40799r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40799r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40799r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40799r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40799r=dst IIS Stability:http://bugs.php.net/fix.php?id=40799r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40799r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40799r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40799r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40799r=mysqlcfg
#40800 [NEW]: cannot disable memory_limit with -1
From: php at vicaya dot com Operating system: Linux 64-bit PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug description: cannot disable memory_limit with -1 Description: According to the documentation: http://us2.php.net/manual/en/ini.core.php Note that to have no memory limit, set this directive to -1. But the code use more than 4GB virtual memory crashes with Fatal error: Allowed memory size of -1 bytes exhausted (tried to allocate 605 bytes) in ... anyway. Reproduce code: --- ? count(file(a_10GB_file)) ? // not production code :) on a machine with enough ram and swap space. Expected result: number of lines in a_10GB_file. Actual result: -- Fatal error: Allowed memory size of -1 bytes exhausted (tried to allocate 605 bytes) in ... Suspect that memory limit directive is still a 32bit unsigned integer (size_t) and -1 is converted to 4G-1. -- Edit bug report at http://bugs.php.net/?id=40800edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40800r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40800r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40800r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40800r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40800r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40800r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=40800r=needscript Try newer version:http://bugs.php.net/fix.php?id=40800r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40800r=support Expected behavior:http://bugs.php.net/fix.php?id=40800r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40800r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40800r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40800r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40800r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40800r=dst IIS Stability:http://bugs.php.net/fix.php?id=40800r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40800r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40800r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40800r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=40800r=mysqlcfg