#50027 [Fbk->Opn]: $this becomes a non-object
ID: 50027 User updated by: phpbugs at colin dot guthr dot ie Reported By: phpbugs at colin dot guthr dot ie -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Mandriva Linux (Cooker x86_64) PHP Version: 5.3.1RC2 New Comment: I knew you were going to say that Jani :p As I said on the original mail, even my simple test is not sufficient to trigger this. Sadly I'm not sure if I can create such a test script, but I will certainly try. It may take me a few days to come up with something and it's most likely that it will not be a simple application (my current trigger case is part of the Zend Framework and I have no real desire to dissect that!) Give me a week or two. Previous Comments: [2009-11-03 10:57:43] j...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. [2009-10-28 09:05:14] phpbugs at colin dot guthr dot ie Description: This is a really hard bug to reproduce (e.g. build a simple test case) but I can reliably do so here with my application. I'll attempt to describe the problem in depth, although I warn in advance that it's a bit of a confusing one. During a particular request, PHP seems to corrupt itself quite badly which cases $this to become corrupted within an object. When this happens, is_object($this) still returns true, but any attempt to access a member variable (e.g. $this->mFuncs) will result in the "Notice: Trying to get property of non-object" warning. Similar warning exist when trying to call methods etc. Once this corruption happens, it will remain until the Apache process is restarted (mpm-prefork) although some requests will succeed (I presume it depends what mpm-preforked httpd handler is used?). When this happens, a much simpler test case (which I'll link to) fails also (i.e. it seems that the initial trigger of this causes it to continue, but the simpler test case itself does not seem enough to trigger it initially). The trigger case I have is a rather complex Zend Framework application that I sadly cannot share. I have confirmed this problem is present on 5.3.0 and 5.3.1RC2, so I suspect it's a 5.3.x problem over all. I cannot reproduce the problem on 5.2.11. All builds use -O0 for optimisations (as higher values have proven to cause problems, particularly on x86_64). Reproduce code: --- A tarball containing three PHP files: one a UniversalAutoloader structure we use in our projects (it predates spl stuff and actually gives us a different fallback mechanism anyway), and a simple test class that is meant to be autoloaded. Then the test.php file which actually exhibits the bug. As noted previously however, this test case only *exhibits* this bug if the problem is triggered already by some other code. You can see from the backtrace.txt the effect of it failing. I provide this in the hope that it allows something obvious to jump out at you, but I suspect the problem is really some form of stack frame corruption or similar (possibly due to x86_64 as I've not tested to see if it affects 5.3.1 although I will be able to do so in the coming weeks). The URL for this bundle is: http://colin.guthr.ie/php-bug.tar Expected result: It should just echo "Foo\n". But as you can see the Notice is triggered and the is_array() check fails (as can be seen, it is impossible for the variable to be anything other than an array). Actual result: -- *After* triggering the problem, $this becomes a non-object (although in other tests (is_object($this) still returns true). -- Edit this bug report at http://bugs.php.net/?id=50027&edit=1
#50073 [NEW]: parse_url incorrect when ? in fragment
From: kurt at blackwell dot id dot au Operating system: Windows PHP version: 5.3.0 PHP Bug Type: URL related Bug description: parse_url incorrect when ? in fragment Description: parse_url incorrectly parses URLs with no query and a '?' in the fragment. It will either interpret the fragment as the query, or split the fragment between the host and query. Reproduce code: --- print_r(parse_url('http://www.example.com/#a?b')); print_r(parse_url('http://www.example.com#a?b')); Expected result: Array ( [scheme] => http [host] => www.example.com [path] => / [fragment] => a?b ) Array ( [scheme] => http [host] => www.example.com [fragment] => a?b ) Actual result: -- Array ( [scheme] => http [host] => www.example.com [path] => / [query] => a?b ) Array ( [scheme] => http [host] => www.example.com#a [query] => b ) -- Edit bug report at http://bugs.php.net/?id=50073&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50073&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50073&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50073&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50073&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50073&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50073&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50073&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50073&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50073&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50073&r=support Expected behavior: http://bugs.php.net/fix.php?id=50073&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50073&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50073&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50073&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50073&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50073&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50073&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50073&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50073&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50073&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50073&r=mysqlcfg
#49984 [Bgs]: DOM model is completely broken
ID: 49984 User updated by: ppass at hotmail dot fr Reported By: ppass at hotmail dot fr Status: Bogus Bug Type: DOM XML related Operating System: Linux ns1 2.6.28.4-rsbac PHP Version: 5.2.11 New Comment: This is still an open topic for me since there seems no easy way to implement in PHP their suggestion (adding the HTML_PARSE_RECOVER option when creating the parsing context). Is this something that can be done in PHP and how? Please advise, otherwise the subject remains open. Previous Comments: [2009-11-02 17:45:51] ppass at hotmail dot fr The reply from the libxml2 team is to try to add the HTML_PARSE_RECOVER option when creating the parsing context. I have no idea what that means. Does anybody know how this can be done from PHP code? [2009-11-02 13:46:20] ppass at hotmail dot fr That you for details, I just filed a bug in their system. [2009-11-02 06:53:03] ras...@php.net We didn't write the DOM implementation. We are simply using libxml2. Information on how to file a bug against libxml2 is here: http://xmlsoft.org/bugs.html But I suspect they won't consider this a bug. Their relaxed html parser isn't a full html parser that knows about embedded script objects. This would only be a PHP bug if we are somehow calling libxml2 incorrectly causing this, but it doesn't appear to be the case here. [2009-11-02 05:42:09] ppass at hotmail dot fr No reaction still to this bug. Maybe my previous title was too specific. More generally speaking, it means that the DOM model is broken in php when ever a script tag contains other tags in its text. This is a serious bug that must be corrected asap, other wise it is not possible to make a reliable use of DOM. [2009-10-24 04:27:57] ppass at hotmail dot fr Description: The script node's parent is a div. The script node has the text '' inside its script. The DOM node returns only partial contents of the script node, as if the node was mistakenly truncated when reaching the '' text. Reproduce code: --- $html = 'Titlefunction dummy { object.innerHTML="text"; } function dummy2 { alert("hello"); }'; $dom = new DOMDocument('1.0', 'UTF-8'); @$dom->loadHTML($html); $script_node = $dom->getElementById('script1'); Echo ""; Expected result: function dummy { object.innerHTML="text"; } function dummy2 { alert("hello"); } I expect to see the whole content of the script node. Actual result: -- function dummy { object.innerHTML="text The script node has been truncated. -- Edit this bug report at http://bugs.php.net/?id=49984&edit=1
#50071 [Opn->Bgs]: Not honored: display_errors = stderr
ID: 50071 Updated by: j...@php.net Reported By: rank1seeker at gmail dot com -Status: Open +Status: Bogus Bug Type: *Configuration Issues Operating System: FreeBSD 7.2 PHP Version: 5.3SVN-2009-11-03 (snap) New Comment: It works fine when your ini file is actually loaded. Check phpinfo() for "Loaded Configuration file" line.. Previous Comments: [2009-11-03 23:18:29] rank1seeker at gmail dot com Description: display_errors = stderr, acts like display_errors = On Reproduce code: --- In php.ini: display_errors = stderr Expected result: Errors displayed to STDERR Actual result: -- Errors displayed to STDOUT (visible in browser) Some page[phpinfo();] parsed by fcgi Result(part): display_errors On(Local Value) On(Master Value) -- Edit this bug report at http://bugs.php.net/?id=50071&edit=1
#50074 [NEW]: wrap-tags Config Option in tidy
From: t dot peter at retepsamoht dot de Operating system: Linux PHP version: 5.2.11 PHP Bug Type: Feature/Change Request Bug description: wrap-tags Config Option in tidy Description: I´d really like to have a config option in tidy_parse_string() that enables/disables wraps within tags. This would make code reading much easier, especially for HTML/PHP Beginners. Reproduce code: --- --- >From manual page: book.tidy --- Home| Planung| Audio| Video| Netzwerk| Service| Shop| Referenzen| Kontakt| Impressum| AGBs'; $config = array('indent' => TRUE, 'output-xhtml' => TRUE, 'wrap' => 200); $tidy = tidy_parse_string($html, $config); print_r($tidy->getConfig()); ?> Expected result: No breaks within tags. Nice and easy to read. Home| Planung| Audio| Video| Netzwerk| Service| Shop| Referenzen| Kontakt| Impressum| AGBs Actual result: -- Something like that: Breaks within tags. Home| Planung| Audio| Video| Netzwerk| Service| Shop| Referenzen| Kontakt| Impressum| AGBs -- Edit bug report at http://bugs.php.net/?id=50074&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50074&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50074&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50074&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50074&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50074&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50074&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50074&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50074&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50074&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50074&r=support Expected behavior: http://bugs.php.net/fix.php?id=50074&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50074&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50074&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50074&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50074&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50074&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50074&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50074&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50074&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50074&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50074&r=mysqlcfg
#50035 [Opn->Fbk]: Crash during shutdown, zm_shutdown_ps_mm -> ps_mm_destroy -> mm_destroy
ID: 50035 Updated by: j...@php.net Reported By: dhertel at gmail dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: linux 2.6.27 PHP Version: 5.3.1RC2 New Comment: What in that example script needs 5.3 and why can't you modify it to work in 5.2? I'm not asking you to do this on a live site, usually developers have development servers to test things with. I can't reproduce this, neither could some other devs so it's up to you do provide us the information. If you can't do that, this report is soon bogus. Previous Comments: [2009-11-04 07:37:04] dhertel at gmail dot com unfortunately i can't as i use methods which have been introduced in php 5.3 my libmm version is 1.4.2 (1.4.2-16.79 from opensuse 11.1) [2009-11-03 10:54:01] j...@php.net It crashes in mod_mm.c line 256 which is ps_mm_destroy() doing mm_destroy(). See also bug #46434 which is about another MM related crash in session module. I would guess it's either MM which is buggy or we're doing something wrong here. (what libmm version do you have?) Please try also with PHP 5.2.11 (no need for backtrace, just let us know if it crashes also). [2009-10-29 19:41:35] dhertel at gmail dot com that somehow doesn't surprise me, as this segfault doesn't seem to come from the script... if i got the backtrace right, php segfaults after the script finished - correct me if i'm wrong :) [2009-10-29 19:36:18] sjo...@php.net I could not reproduce the crash with either script. [2009-10-29 15:07:59] dhertel at gmail dot com I'm sorry i couln't provide a shorter script :-(. I can't reproduce the segfault with a simple script. I now stripped everything unnecessary from the script... doesn't need anything external now... Strange thing is that the segfault doesn't occur every time the script ends but sometimes... and the more iterations mmae_core2 runs (line 59), the more often it seems to occur http://pastebin.org/49264 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/50035 -- Edit this bug report at http://bugs.php.net/?id=50035&edit=1
#50073 [Opn->Ver]: parse_url incorrect when ? in fragment
ID: 50073 Updated by: j...@php.net Reported By: kurt at blackwell dot id dot au -Status: Open +Status: Verified Bug Type: URL related Operating System: * PHP Version: 5.*, 6 Previous Comments: [2009-11-04 09:01:39] kurt at blackwell dot id dot au Description: parse_url incorrectly parses URLs with no query and a '?' in the fragment. It will either interpret the fragment as the query, or split the fragment between the host and query. Reproduce code: --- print_r(parse_url('http://www.example.com/#a?b')); print_r(parse_url('http://www.example.com#a?b')); Expected result: Array ( [scheme] => http [host] => www.example.com [path] => / [fragment] => a?b ) Array ( [scheme] => http [host] => www.example.com [fragment] => a?b ) Actual result: -- Array ( [scheme] => http [host] => www.example.com [path] => / [query] => a?b ) Array ( [scheme] => http [host] => www.example.com#a [query] => b ) -- Edit this bug report at http://bugs.php.net/?id=50073&edit=1
#50027 [Opn->Fbk]: $this becomes a non-object
ID: 50027 Updated by: j...@php.net Reported By: phpbugs at colin dot guthr dot ie -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: Mandriva Linux (Cooker x86_64) PHP Version: 5.3.1RC2 New Comment: Leave the report in "Feedback" (requested) status until you have that script around. (do not reply before that ;) Previous Comments: [2009-11-04 08:43:49] phpbugs at colin dot guthr dot ie I knew you were going to say that Jani :p As I said on the original mail, even my simple test is not sufficient to trigger this. Sadly I'm not sure if I can create such a test script, but I will certainly try. It may take me a few days to come up with something and it's most likely that it will not be a simple application (my current trigger case is part of the Zend Framework and I have no real desire to dissect that!) Give me a week or two. [2009-11-03 10:57:43] j...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. [2009-10-28 09:05:14] phpbugs at colin dot guthr dot ie Description: This is a really hard bug to reproduce (e.g. build a simple test case) but I can reliably do so here with my application. I'll attempt to describe the problem in depth, although I warn in advance that it's a bit of a confusing one. During a particular request, PHP seems to corrupt itself quite badly which cases $this to become corrupted within an object. When this happens, is_object($this) still returns true, but any attempt to access a member variable (e.g. $this->mFuncs) will result in the "Notice: Trying to get property of non-object" warning. Similar warning exist when trying to call methods etc. Once this corruption happens, it will remain until the Apache process is restarted (mpm-prefork) although some requests will succeed (I presume it depends what mpm-preforked httpd handler is used?). When this happens, a much simpler test case (which I'll link to) fails also (i.e. it seems that the initial trigger of this causes it to continue, but the simpler test case itself does not seem enough to trigger it initially). The trigger case I have is a rather complex Zend Framework application that I sadly cannot share. I have confirmed this problem is present on 5.3.0 and 5.3.1RC2, so I suspect it's a 5.3.x problem over all. I cannot reproduce the problem on 5.2.11. All builds use -O0 for optimisations (as higher values have proven to cause problems, particularly on x86_64). Reproduce code: --- A tarball containing three PHP files: one a UniversalAutoloader structure we use in our projects (it predates spl stuff and actually gives us a different fallback mechanism anyway), and a simple test class that is meant to be autoloaded. Then the test.php file which actually exhibits the bug. As noted previously however, this test case only *exhibits* this bug if the problem is triggered already by some other code. You can see from the backtrace.txt the effect of it failing. I provide this in the hope that it allows something obvious to jump out at you, but I suspect the problem is really some form of stack frame corruption or similar (possibly due to x86_64 as I've not tested to see if it affects 5.3.1 although I will be able to do so in the coming weeks). The URL for this bundle is: http://colin.guthr.ie/php-bug.tar Expected result: It should just echo "Foo\n". But as you can see the Notice is triggered and the is_array() check fails (as can be seen, it is impossible for the variable to be anything other than an array). Actual result: -- *After* triggering the problem, $this becomes a non-object (although in other tests (is_object($this) still returns true). -- Edit this bug report at http://bugs.php.net/?id=50027&edit=1
#50035 [Fbk->Opn]: Crash during shutdown, zm_shutdown_ps_mm -> ps_mm_destroy -> mm_destroy
ID: 50035 User updated by: dhertel at gmail dot com Reported By: dhertel at gmail dot com -Status: Feedback +Status: Open Bug Type: Session related Operating System: linux 2.6.27 PHP Version: 5.3.1RC2 New Comment: it uses msg_queue_exists and pcntl_signal_dispatch i could replace the first with a function that mimics it's functionality somehow but i couldn't replace the latter without destroying the functionality of the class itself (a process shouldn't halt if there's no signal to fetch and pcntl_sigtimedwait is also php >= 5.3)... but as i already said, i encountered this error in php 5.3.0 as well as in 5.3.1 RC3 Previous Comments: [2009-11-04 10:39:02] j...@php.net What in that example script needs 5.3 and why can't you modify it to work in 5.2? I'm not asking you to do this on a live site, usually developers have development servers to test things with. I can't reproduce this, neither could some other devs so it's up to you do provide us the information. If you can't do that, this report is soon bogus. [2009-11-04 07:37:04] dhertel at gmail dot com unfortunately i can't as i use methods which have been introduced in php 5.3 my libmm version is 1.4.2 (1.4.2-16.79 from opensuse 11.1) [2009-11-03 10:54:01] j...@php.net It crashes in mod_mm.c line 256 which is ps_mm_destroy() doing mm_destroy(). See also bug #46434 which is about another MM related crash in session module. I would guess it's either MM which is buggy or we're doing something wrong here. (what libmm version do you have?) Please try also with PHP 5.2.11 (no need for backtrace, just let us know if it crashes also). [2009-10-29 19:41:35] dhertel at gmail dot com that somehow doesn't surprise me, as this segfault doesn't seem to come from the script... if i got the backtrace right, php segfaults after the script finished - correct me if i'm wrong :) [2009-10-29 19:36:18] sjo...@php.net I could not reproduce the crash with either script. 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/50035 -- Edit this bug report at http://bugs.php.net/?id=50035&edit=1
#50063 [Opn->Fbk]: safe_mode_include_dir fails
ID: 50063 Updated by: j...@php.net Reported By: christian at elmerot dot se -Status: Open +Status: Feedback Bug Type: Safe Mode/open_basedir Operating System: Debian Etch, Lenny PHP Version: 5.3.0 New Comment: Just to clarify: This does not happen with PHP 5.2.11 ? Previous Comments: [2009-11-03 16:47:11] christian at elmerot dot se "Actual output" should be: Warning: require_once() [function.require-once]: SAFE MODE Restriction in effect. The script whose uid is 35873 is not allowed to access /usr/share/php/PEAR/Exception.php owned by uid 0 in //peartest.php on line 2 Warning: require_once(/usr/share/php/PEAR/Exception.php) [function.require-once]: failed to open stream: No such file or directory in //peartest.php on line 2 Fatal error: require_once() [function.require]: Failed opening required 'PEAR/Exception.php' (include_path='.:/usr/share/php') in //peartest.php on line 2 And of course the file is there: ls -l /usr/share/php/PEAR/Exception.php -rw-r--r-- 1 root root 12818 Apr 29 2009 /usr/share/php/PEAR/Exception.php [2009-11-03 16:15:58] christian at elmerot dot se Description: Using the following config options ignores the safe_mode_include_dir and does a uid-check even though the php-file is in the safe_mode_include_dir. This is likely still present in 5.3.1RC2 safe_mode = On safe_mode_include_dir = /usr/share/php include_path = ".:/usr/share/php" The following code: To me it appears that PHP 5.3.x now use a different code-path to open files as the following patch against the function php_plain_files_stream_opener 5.3.0 solves the issue for us as it appears there is no safe_mode_include_dir-check although there is a safe_mode uid-check: --- main/streams/plain_wrapper.c2009-11-03 15:52:59.414872711 +0100 +++ main/streams/plain_wrapper.c2009-11-03 15:52:59.420045302 +0100 @@ -988,6 +988,10 @@ return NULL; } + if ((php_check_safe_mode_include_dir(path TSRMLS_CC)) == 0) { + return php_stream_fopen_rel(path, mode, opened_path, options); + } + if ((options & ENFORCE_SAFE_MODE) && PG(safe_mode) && (!php_checkuid(path, mode, CHECKUID_CHECK_MODE_PARAM))) return NULL; Reproduce code: --- Expected result: OK Actual result: -- Warning: require() [function.require]: SAFE MODE Restriction in effect. The script whose uid is 771909 is not allowed to access /usr/share/php/PEAR/Exception.php owned by uid 0 in /x/peartest.php on line 2 Warning: require(/usr/share/php/PEAR/Exception.php) [function.require]: failed to open stream: No such file or directory in /x/peartest.php on line 2 Fatal error: require() [function.require]: Failed opening required 'PEAR/Exception.php' (include_path='.:/usr/share/php') in /x/peartest.php on line 2 -- Edit this bug report at http://bugs.php.net/?id=50063&edit=1
#50035 [Opn->Fbk]: Crash during shutdown, zm_shutdown_ps_mm -> ps_mm_destroy -> mm_destroy
ID: 50035 Updated by: j...@php.net Reported By: dhertel at gmail dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: linux 2.6.27 PHP Version: 5.3.1RC2 New Comment: Exactly how do you run the script? What php.ini options do you use? (diff against whatever php.ini-* you used as base is enough) Previous Comments: [2009-11-04 12:09:57] dhertel at gmail dot com it uses msg_queue_exists and pcntl_signal_dispatch i could replace the first with a function that mimics it's functionality somehow but i couldn't replace the latter without destroying the functionality of the class itself (a process shouldn't halt if there's no signal to fetch and pcntl_sigtimedwait is also php >= 5.3)... but as i already said, i encountered this error in php 5.3.0 as well as in 5.3.1 RC3 [2009-11-04 10:39:02] j...@php.net What in that example script needs 5.3 and why can't you modify it to work in 5.2? I'm not asking you to do this on a live site, usually developers have development servers to test things with. I can't reproduce this, neither could some other devs so it's up to you do provide us the information. If you can't do that, this report is soon bogus. [2009-11-04 07:37:04] dhertel at gmail dot com unfortunately i can't as i use methods which have been introduced in php 5.3 my libmm version is 1.4.2 (1.4.2-16.79 from opensuse 11.1) [2009-11-03 10:54:01] j...@php.net It crashes in mod_mm.c line 256 which is ps_mm_destroy() doing mm_destroy(). See also bug #46434 which is about another MM related crash in session module. I would guess it's either MM which is buggy or we're doing something wrong here. (what libmm version do you have?) Please try also with PHP 5.2.11 (no need for backtrace, just let us know if it crashes also). [2009-10-29 19:41:35] dhertel at gmail dot com that somehow doesn't surprise me, as this segfault doesn't seem to come from the script... if i got the backtrace right, php segfaults after the script finished - correct me if i'm wrong :) 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/50035 -- Edit this bug report at http://bugs.php.net/?id=50035&edit=1
#50063 [Fbk->Opn]: safe_mode_include_dir fails
ID: 50063 User updated by: christian at elmerot dot se Reported By: christian at elmerot dot se -Status: Feedback +Status: Open Bug Type: Safe Mode/open_basedir Operating System: Debian Etch, Lenny PHP Version: 5.3.0 New Comment: That is correct. I just built a fresh install of 5.2.11 and the issue does not manifest itself there, only in 5.3.0 and onward (5.3.1RC2 and 3 not tested) Previous Comments: [2009-11-04 12:30:46] j...@php.net Just to clarify: This does not happen with PHP 5.2.11 ? [2009-11-03 16:47:11] christian at elmerot dot se "Actual output" should be: Warning: require_once() [function.require-once]: SAFE MODE Restriction in effect. The script whose uid is 35873 is not allowed to access /usr/share/php/PEAR/Exception.php owned by uid 0 in //peartest.php on line 2 Warning: require_once(/usr/share/php/PEAR/Exception.php) [function.require-once]: failed to open stream: No such file or directory in //peartest.php on line 2 Fatal error: require_once() [function.require]: Failed opening required 'PEAR/Exception.php' (include_path='.:/usr/share/php') in //peartest.php on line 2 And of course the file is there: ls -l /usr/share/php/PEAR/Exception.php -rw-r--r-- 1 root root 12818 Apr 29 2009 /usr/share/php/PEAR/Exception.php [2009-11-03 16:15:58] christian at elmerot dot se Description: Using the following config options ignores the safe_mode_include_dir and does a uid-check even though the php-file is in the safe_mode_include_dir. This is likely still present in 5.3.1RC2 safe_mode = On safe_mode_include_dir = /usr/share/php include_path = ".:/usr/share/php" The following code: To me it appears that PHP 5.3.x now use a different code-path to open files as the following patch against the function php_plain_files_stream_opener 5.3.0 solves the issue for us as it appears there is no safe_mode_include_dir-check although there is a safe_mode uid-check: --- main/streams/plain_wrapper.c2009-11-03 15:52:59.414872711 +0100 +++ main/streams/plain_wrapper.c2009-11-03 15:52:59.420045302 +0100 @@ -988,6 +988,10 @@ return NULL; } + if ((php_check_safe_mode_include_dir(path TSRMLS_CC)) == 0) { + return php_stream_fopen_rel(path, mode, opened_path, options); + } + if ((options & ENFORCE_SAFE_MODE) && PG(safe_mode) && (!php_checkuid(path, mode, CHECKUID_CHECK_MODE_PARAM))) return NULL; Reproduce code: --- Expected result: OK Actual result: -- Warning: require() [function.require]: SAFE MODE Restriction in effect. The script whose uid is 771909 is not allowed to access /usr/share/php/PEAR/Exception.php owned by uid 0 in /x/peartest.php on line 2 Warning: require(/usr/share/php/PEAR/Exception.php) [function.require]: failed to open stream: No such file or directory in /x/peartest.php on line 2 Fatal error: require() [function.require]: Failed opening required 'PEAR/Exception.php' (include_path='.:/usr/share/php') in /x/peartest.php on line 2 -- Edit this bug report at http://bugs.php.net/?id=50063&edit=1
#46063 [Com]: SoapFault exception: [HTTP] Error Fetching http headers
ID: 46063 Comment by: ucl at mail dot ru Reported By: filip_stjernberg at hotmaol dot com Status: No Feedback Bug Type: SOAP related Operating System: Windows vista PHP Version: 5.2.6 New Comment: I've solve the problem of "Error Fetching http headers" by adding ini_set('max_input_time', -1); before SOAP call. Problem is that my SOAP server have to think long time after request, and i'v had timeout in soap. Previous Comments: [2009-03-13 08:53:56] ft20082 at 163 dot com i have some problem with it. and my result is : Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in E:\wwwroot\wsdl.php:41 Stack trace: #0 [internal function]: SoapClient->__doRequest('http://webservi...', '', 1, 0) #1 E:\wwwroot\wsdl.php(41): SoapClient->__soapCall('searchFlights', Array) #2 {main} thrown in E:\wwwroot\wsdl.php on line 41 so, what should i do? [2009-02-21 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2009-02-13 23:24:28] fel...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-09-12 07:49:07] filip_stjernberg at hotmaol dot com Description: I'm trying to use an existing webservice: http://testhorizon.gothiagroup.com/AFSServices/AFSService.svc?wsdl There is a simple test function called "HelloWorld" that returns the input "myVaule". This function dos not need authentification but its more advaced one do. Really need this to work, have tried nuSOAP to but that gives me other problems. Reproduce code: --- This is the code I use: try{ $wsdl = 'http://testhorizon.gothiagroup.com/AFSServices/AFSService.svc?wsdl'; $client = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_2, 'trace' => 1, 'exceptions' => 1 )); print($client->HelloWorld(array('myValue' => 'Test'))); } catch (Exception $e) { printf("Message = %s\n",$e->__toString()); } print "n"; print "Request :n".htmlspecialchars($client->__getLastRequest()) ."n"; print "Response:n".htmlspecialchars($client->__getLastResponse())."n"; print ""; Expected result: Hello from AFSService: Test Actual result: -- Message = SoapFault exception: [HTTP] Error Fetching http headers in /customers/veus.se/veus.se/httpd.www/Test/samples/AFSWS1.php:20 Stack trace: #0 [internal function]: SoapClient->__doRequest('http://testhori...', 'http://tempuri', 2, 0) #1 [internal function]: SoapClient->__call('HelloWorld', Array) #2 /customers/veus.se/veus.se/httpd.www/Test/samples/AFSWS1.php(20): SoapClient->HelloWorld(Array) #3 {main} nRequest :n http://www.w3.org/2003/05/soap-envelope"; xmlns:ns1="http://tempuri.org/";>Exor nResponse:nn -- Edit this bug report at http://bugs.php.net/?id=46063&edit=1
#50073 [Ver->Asn]: parse_url incorrect when ? in fragment
ID: 50073 Updated by: il...@php.net Reported By: kurt at blackwell dot id dot au -Status: Verified +Status: Assigned Bug Type: URL related Operating System: * PHP Version: 5.*, 6 -Assigned To: +Assigned To: iliaa Previous Comments: [2009-11-04 09:01:39] kurt at blackwell dot id dot au Description: parse_url incorrectly parses URLs with no query and a '?' in the fragment. It will either interpret the fragment as the query, or split the fragment between the host and query. Reproduce code: --- print_r(parse_url('http://www.example.com/#a?b')); print_r(parse_url('http://www.example.com#a?b')); Expected result: Array ( [scheme] => http [host] => www.example.com [path] => / [fragment] => a?b ) Array ( [scheme] => http [host] => www.example.com [fragment] => a?b ) Actual result: -- Array ( [scheme] => http [host] => www.example.com [path] => / [query] => a?b ) Array ( [scheme] => http [host] => www.example.com#a [query] => b ) -- Edit this bug report at http://bugs.php.net/?id=50073&edit=1
#50073 [Asn->Csd]: parse_url incorrect when ? in fragment
ID: 50073 Updated by: il...@php.net Reported By: kurt at blackwell dot id dot au -Status: Assigned +Status: Closed Bug Type: URL related Operating System: * PHP Version: 5.*, 6 Assigned To: iliaa New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2009-11-04 13:44:11] s...@php.net Automatic comment from SVN on behalf of iliaa Revision: http://svn.php.net/viewvc/?view=revision&revision=290199 Log: Fixed bug #50073 (parse_url() incorrect when ? in fragment). [2009-11-04 09:01:39] kurt at blackwell dot id dot au Description: parse_url incorrectly parses URLs with no query and a '?' in the fragment. It will either interpret the fragment as the query, or split the fragment between the host and query. Reproduce code: --- print_r(parse_url('http://www.example.com/#a?b')); print_r(parse_url('http://www.example.com#a?b')); Expected result: Array ( [scheme] => http [host] => www.example.com [path] => / [fragment] => a?b ) Array ( [scheme] => http [host] => www.example.com [fragment] => a?b ) Actual result: -- Array ( [scheme] => http [host] => www.example.com [path] => / [query] => a?b ) Array ( [scheme] => http [host] => www.example.com#a [query] => b ) -- Edit this bug report at http://bugs.php.net/?id=50073&edit=1
#50068 [Bgs]: const problem
ID: 50068 User updated by: jachym dot tousek at gmail dot com Reported By: jachym dot tousek at gmail dot com Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows 7 PHP Version: 5.3.1RC3 New Comment: OK i get it now, but still it should be in documentation. Previous Comments: [2009-11-04 01:44:23] scott...@php.net const is a compile time constant and only allows simple scalar values. define is a constant resolved at runtime and it allows full expressions when being defined. [2009-11-03 22:26:15] jachym dot tousek at gmail dot com Well i've checked [http://www.php.net/manual/en/language.constants.syntax.php] and also updated from 5.3.0 to 5.3.1RC3 before sending this report, but there is nothing about const name = 'value'; being different from define('name','value'); and i can not understand it even now. [2009-11-03 21:46:58] fel...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php [2009-11-03 21:11:32] ksin...@php.net I think this behavior is by design. const expressions are evaluated at compile time. So only few operations are supported in a const expression and string concatenation is not one of those. I could repro this in PHP 5.2 (after putting it under a class). [2009-11-03 20:16:44] jachym dot tousek at gmail dot com Description: const is not working Reproduce code: --- http://bugs.php.net/?id=50068&edit=1
#50071 [Bgs]: Not honored: display_errors = stderr
ID: 50071 User updated by: rank1seeker at gmail dot com Reported By: rank1seeker at gmail dot com Status: Bogus Bug Type: *Configuration Issues Operating System: FreeBSD 7.2 PHP Version: 5.3SVN-2009-11-03 (snap) New Comment: Of course it is loaded: I already use phpinfo() script Loaded Configuration File /usr/local/etc/php.ini I even tried: display_errors = stderr display_errors = Stderr display_errors = "stderr" display_errors = "Stderr" All behaves as: display_errors = On Previous Comments: [2009-11-04 09:54:22] j...@php.net It works fine when your ini file is actually loaded. Check phpinfo() for "Loaded Configuration file" line.. [2009-11-03 23:18:29] rank1seeker at gmail dot com Description: display_errors = stderr, acts like display_errors = On Reproduce code: --- In php.ini: display_errors = stderr Expected result: Errors displayed to STDERR Actual result: -- Errors displayed to STDOUT (visible in browser) Some page[phpinfo();] parsed by fcgi Result(part): display_errors On(Local Value) On(Master Value) -- Edit this bug report at http://bugs.php.net/?id=50071&edit=1
#50075 [NEW]: Provide single value difference in DateInterval->diff()
From: RQuadling at GMail dot com Operating system: Irrelevant PHP version: 5.3.1RC3 PHP Bug Type: Feature/Change Request Bug description: Provide single value difference in DateInterval->diff() Description: The output of DateInterval->diff() currently shows the breakdown of the difference (y, m, d, h, i, s, days, invert). Which is fine. But I'd like to be able to have the number of seconds difference. The following patch adds a new entry to the output: diff. It is a straight calculation of the seconds based upon days, h, i and s, and takes into consideration invert. The patch below is the same for branch/5_3 and trunk. I think this patch and the DateInterval object comparison patch reported in Bug#49914 by aharvey would be good additions. Regards, Richard. Reproduce code: --- Index: php_date.c === --- php_date.c (revision 290198) +++ php_date.c (working copy) @@ -2245,6 +2245,16 @@ PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + + MAKE_STD_ZVAL(zv); + ZVAL_LONG(zv, (( + intervalobj->diff->days * 24) + + intervalobj->diff->h) * 60) + + intervalobj->diff->i) * 60) + + intervalobj->diff->s) * ( + intervalobj->diff->invert ? -1 : 1) + ); + zend_hash_update(props, "diff", 5, &zv, sizeof(zval), NULL); return props; } -- Edit bug report at http://bugs.php.net/?id=50075&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50075&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50075&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50075&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50075&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50075&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50075&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50075&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50075&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50075&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50075&r=support Expected behavior: http://bugs.php.net/fix.php?id=50075&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50075&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50075&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50075&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50075&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50075&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50075&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50075&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50075&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50075&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50075&r=mysqlcfg
#49869 [Fbk->Opn]: imagettfbbox returns bogus value
ID: 49869 User updated by: orel at melix dot net Reported By: orel at melix dot net -Status: Feedback +Status: Open Bug Type: GD related Operating System: Linux PHP Version: 5.2.11 Assigned To: tabe New Comment: It is ok with PHP 5.3.2-dev with this configure line ./configure --with-gd --enable-gd-native-ttf --with-freetype-dir Result is Array ( [0] => -1 [1] => 3 [2] => 173 [3] => 3 [4] => 173 [5] => -14 [6] => -1 [7] => -14 ) Previous Comments: [2009-10-29 03:30:31] t...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ It looks ok with PHP_5_3: Array ( [0] => -1 [1] => 3 [2] => 173 [3] => 3 [4] => 173 [5] => -14 [6] => -1 [7] => -14 ) [2009-10-13 18:56:23] paj...@php.net Hm that one is new, time to look at it Tabe? [2009-10-13 18:41:08] orel at melix dot net Description: imagettfbbox returns bogus values: Array ( [0] => 0 [1] => 3 [2] => -2147483648 [3] => 3 [4] => -2147483648 [5] => -14 [6] => 0 [7] => -14 ) 5.2.0-8+etch13 is ok 5.2.11-1 is ko Reproduce code: --- print_r(imagettfbbox(12, 0,"/home/somewhere/verdanab.ttf", "Recipient responses")); Expected result: Array ( [0] => 0 [1] => 3 [2] => 181 [3] => 3 [4] => 181 [5] => -14 [6] => 0 [7] => -14 ) Actual result: -- Array ( [0] => 0 [1] => 3 [2] => -2147483648 [3] => 3 [4] => -2147483648 [5] => -14 [6] => 0 [7] => -14 ) -- Edit this bug report at http://bugs.php.net/?id=49869&edit=1
#50075 [Opn]: Provide single value difference in DateInterval->diff()
ID: 50075 Updated by: der...@php.net Reported By: RQuadling at GMail dot com Status: Open Bug Type: Feature/Change Request Operating System: Irrelevant PHP Version: 5.3.1RC3 New Comment: This patch is not correct, because it doesn't take care of daylight savings time nor should "invert" being taken into account as it's already a seperate field. I wouldn't call it "diff" either, but "seconds" just like there is "days". Previous Comments: [2009-11-04 14:31:46] RQuadling at GMail dot com Description: The output of DateInterval->diff() currently shows the breakdown of the difference (y, m, d, h, i, s, days, invert). Which is fine. But I'd like to be able to have the number of seconds difference. The following patch adds a new entry to the output: diff. It is a straight calculation of the seconds based upon days, h, i and s, and takes into consideration invert. The patch below is the same for branch/5_3 and trunk. I think this patch and the DateInterval object comparison patch reported in Bug#49914 by aharvey would be good additions. Regards, Richard. Reproduce code: --- Index: php_date.c === --- php_date.c (revision 290198) +++ php_date.c (working copy) @@ -2245,6 +2245,16 @@ PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + + MAKE_STD_ZVAL(zv); + ZVAL_LONG(zv, (( + intervalobj->diff->days * 24) + + intervalobj->diff->h) * 60) + + intervalobj->diff->i) * 60) + + intervalobj->diff->s) * ( + intervalobj->diff->invert ? -1 : 1) + ); + zend_hash_update(props, "diff", 5, &zv, sizeof(zval), NULL); return props; } -- Edit this bug report at http://bugs.php.net/?id=50075&edit=1
#50078 [NEW]: file upload to the thttpd (with php patch) fails
From: nishantkumar05 at gmail dot com Operating system: ubuntu 8.10 PHP version: 5.3.0 PHP Bug Type: Other web server Bug description: file upload to the thttpd (with php patch) fails Description: I have thttpd 2.1b patched with php-5.3.0. Try to upload file using POST request to this web server. Small files ( max of 600 bytes or so ) can be transferred, but big files, for which POST request will span multiple packets fails. Reproduce code: --- .php web page that reproduces this bug is: (upload.php) Choose a file to upload: Expected result: It should be able to upload file of any size successfully. -- Edit bug report at http://bugs.php.net/?id=50078&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50078&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50078&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50078&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50078&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50078&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50078&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50078&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50078&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50078&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50078&r=support Expected behavior: http://bugs.php.net/fix.php?id=50078&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50078&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50078&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50078&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50078&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50078&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50078&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50078&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50078&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50078&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50078&r=mysqlcfg
#50078 [Com]: file upload to the thttpd (with php patch) fails
ID: 50078 Comment by: nishantkumar05 at gmail dot com Reported By: nishantkumar05 at gmail dot com Status: Open Bug Type: Other web server Operating System: ubuntu 8.10 PHP Version: 5.3.0 New Comment: This is the patch available. = diff -Nur php-5.3.0/sapi/thttpd/thttpd.c php- 5.3.0_mod/sapi/thttpd/thttpd.c --- php-5.3.0/sapi/thttpd/thttpd.c 2008-12-31 03:15:49.0 -0800 +++ php-5.3.0_mod/sapi/thttpd/thttpd.c 2009-11-02 19:02:28.0 -0800 @@ -64,6 +64,9 @@ #define TG(v) (thttpd_globals.v) #endif + +int read_pending_content( void ); + static int sapi_thttpd_ub_write(const char *str, uint str_length TSRMLS_DC) { int n; @@ -247,16 +250,77 @@ static int sapi_thttpd_read_post(char *buffer, uint count_bytes TSRMLS_DC) { - size_t read_bytes = 0; + size_t read_bytes = 0, send2php_bytes = 0 ; + size_t buff_bytes = TG(hc)->read_idx - TG(hc)->checked_idx ; - if (TG(unconsumed_length) > 0) { - read_bytes = MIN(TG(unconsumed_length), count_bytes); - memcpy(buffer, TG(hc)->read_buf + TG(hc)->checked_idx, read_bytes); - TG(unconsumed_length) -= read_bytes; - CONSUME_BYTES(read_bytes); + + if ( buff_bytes > 0 ) { + /*we might already have some bytes in read_buf to be sent to php module*/ + read_bytes = buff_bytes; + }else if ( TG(hc)->contentlength > 0 ){ + read_bytes=read_pending_content(); + } + + if ( read_bytes ) { + send2php_bytes = MIN ( read_bytes, count_bytes); + memcpy(buffer, TG(hc)->read_buf + TG(hc)- >checked_idx, send2php_bytes); + TG(hc)->contentlength -= send2php_bytes; + /*bringing the read_idx back to checked_idx, so we have more room to read + the pending bytes from connection*/ + if ( send2php_bytes == read_bytes ) { + TG(hc)->read_idx = TG(hc)->checked_idx ; + } else { + /*memmove is costly: but for small devices we cant increase the buffer + size substantially. presuming that memmove doesnt use extra buffer + internally*/ + memmove(TG(hc)->read_buf + TG(hc)- >checked_idx, + TG(hc)- >read_buf + TG(hc)->checked_idx + send2php_bytes , + read_bytes- count_bytes); + TG(hc)->read_idx = TG(hc)->checked_idx + ( read_bytes - count_bytes ) ; + } + + TG(unconsumed_length) -= send2php_bytes; } - - return read_bytes; + + return send2php_bytes; +} + + +/* + * Read the max possible (limited by the available buffer ) pending data + * from the network. hc->contenlength has been used to tell about the + * pending data to be read from the network, hence onus is on the caller + * to modify it accordingly. + * It starts reading from checked_idx and updates the read_idx after reading. + * -nishant + * */ +int read_pending_content( void ) +{ + int avail_buf= TG(hc)->read_size - TG(hc)->read_idx; + int act_to_read=0,total_read=0,ctr=0; + + + if ( TG(hc)->contentlength < avail_buf ){ + act_to_read = TG(hc)->contentlength; + } else { + act_to_read = avail_buf - 2; + } + + while(total_read != act_to_read) + { + ctr = read(TG(hc)->conn_fd, &(TG(hc)->read_buf[TG(hc)- >checked_idx]), act_to_read ); + if(ctr < 0){ + if( ( errno == EINTR ) || ( errno == EAGAIN ) ){ + continue; + }else{ + break; + } + } + total_read += ctr; + } + + TG(hc)->read_idx += total_read; + return total_read; } static char *sapi_thttpd_read_cookies(TSRMLS_D) @@ -663,12 +727,14 @@ hc->do_keep_alive = 0; } +#if 0 + /*Its ok to have unconsumed bytes. We will consum in read_post function*/ if (hc->contentlength != -1 && SIZEOF_UNCONSUMED_BYTES() < hc- >contentlength) { hc->read_body_into_mem = 1; return 0; } - +#endif thttpd_request_ctor(TSRMLS_C); thttpd_module_main(show_source TSRMLS_CC); = thanks Nishant Previous Comments: [2009-11-04 15:27:21] nishantkumar05 at gmail dot com Description: -
#49869 [Opn->Asn]: imagettfbbox returns bogus value
ID: 49869 Updated by: j...@php.net Reported By: orel at melix dot net -Status: Open +Status: Assigned Bug Type: GD related Operating System: Linux PHP Version: 5.2.11 Assigned To: tabe Previous Comments: [2009-11-04 15:05:50] orel at melix dot net It is ok with PHP 5.3.2-dev with this configure line ./configure --with-gd --enable-gd-native-ttf --with-freetype-dir Result is Array ( [0] => -1 [1] => 3 [2] => 173 [3] => 3 [4] => 173 [5] => -14 [6] => -1 [7] => -14 ) [2009-10-29 03:30:31] t...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ It looks ok with PHP_5_3: Array ( [0] => -1 [1] => 3 [2] => 173 [3] => 3 [4] => 173 [5] => -14 [6] => -1 [7] => -14 ) [2009-10-13 18:56:23] paj...@php.net Hm that one is new, time to look at it Tabe? [2009-10-13 18:41:08] orel at melix dot net Description: imagettfbbox returns bogus values: Array ( [0] => 0 [1] => 3 [2] => -2147483648 [3] => 3 [4] => -2147483648 [5] => -14 [6] => 0 [7] => -14 ) 5.2.0-8+etch13 is ok 5.2.11-1 is ko Reproduce code: --- print_r(imagettfbbox(12, 0,"/home/somewhere/verdanab.ttf", "Recipient responses")); Expected result: Array ( [0] => 0 [1] => 3 [2] => 181 [3] => 3 [4] => 181 [5] => -14 [6] => 0 [7] => -14 ) Actual result: -- Array ( [0] => 0 [1] => 3 [2] => -2147483648 [3] => 3 [4] => -2147483648 [5] => -14 [6] => 0 [7] => -14 ) -- Edit this bug report at http://bugs.php.net/?id=49869&edit=1
#50075 [Opn]: Provide single value difference in DateInterval->diff()
ID: 50075 User updated by: RQuadling at GMail dot com Reported By: RQuadling at GMail dot com Status: Open Bug Type: Feature/Change Request Operating System: Irrelevant PHP Version: 5.3.1RC3 New Comment: I'm not sure how DST is relevant here. DateInterval will already have worked out the difference in days, hours, mins, etc. All I'm providing is a total number of seconds. I take on the issue with invert, but it does mean having to do some userland calcs. diff -> seconds. Yep. Obviously. Index: php_date.c === --- php_date.c (revision 290198) +++ php_date.c (working copy) @@ -2245,6 +2245,15 @@ PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + + MAKE_STD_ZVAL(zv); + ZVAL_LONG(zv, ( + intervalobj->diff->days * 24) + + intervalobj->diff->h) * 60) + + intervalobj->diff->i) * 60) + + intervalobj->diff->s + ); + zend_hash_update(props, "seconds", 8, &zv, sizeof(zval), NULL); return props; } Previous Comments: [2009-11-04 15:09:16] der...@php.net This patch is not correct, because it doesn't take care of daylight savings time nor should "invert" being taken into account as it's already a seperate field. I wouldn't call it "diff" either, but "seconds" just like there is "days". [2009-11-04 14:31:46] RQuadling at GMail dot com Description: The output of DateInterval->diff() currently shows the breakdown of the difference (y, m, d, h, i, s, days, invert). Which is fine. But I'd like to be able to have the number of seconds difference. The following patch adds a new entry to the output: diff. It is a straight calculation of the seconds based upon days, h, i and s, and takes into consideration invert. The patch below is the same for branch/5_3 and trunk. I think this patch and the DateInterval object comparison patch reported in Bug#49914 by aharvey would be good additions. Regards, Richard. Reproduce code: --- Index: php_date.c === --- php_date.c (revision 290198) +++ php_date.c (working copy) @@ -2245,6 +2245,16 @@ PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + + MAKE_STD_ZVAL(zv); + ZVAL_LONG(zv, (( + intervalobj->diff->days * 24) + + intervalobj->diff->h) * 60) + + intervalobj->diff->i) * 60) + + intervalobj->diff->s) * ( + intervalobj->diff->invert ? -1 : 1) + ); + zend_hash_update(props, "diff", 5, &zv, sizeof(zval), NULL); return props; } -- Edit this bug report at http://bugs.php.net/?id=50075&edit=1
#50075 [Opn]: Provide single value difference in DateInterval->diff()
ID: 50075 Updated by: der...@php.net Reported By: RQuadling at GMail dot com Status: Open Bug Type: Feature/Change Request Operating System: Irrelevant PHP Version: 5.3.1RC3 New Comment: DST is relevant because the following will show "one day", but it is not 86400 seconds: diff( $b ); echo $d->format( '%d %h:%i:%s' ), "\n"; echo $b->format( 'U' ) - $a->format( 'U' ), "\n"; echo $a->format( DateTime::ISO8601 ), "\n"; echo $b->format( DateTime::ISO8601 ), "\n"; ?> Previous Comments: [2009-11-04 15:43:34] RQuadling at GMail dot com I'm not sure how DST is relevant here. DateInterval will already have worked out the difference in days, hours, mins, etc. All I'm providing is a total number of seconds. I take on the issue with invert, but it does mean having to do some userland calcs. diff -> seconds. Yep. Obviously. Index: php_date.c === --- php_date.c (revision 290198) +++ php_date.c (working copy) @@ -2245,6 +2245,15 @@ PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + + MAKE_STD_ZVAL(zv); + ZVAL_LONG(zv, ( + intervalobj->diff->days * 24) + + intervalobj->diff->h) * 60) + + intervalobj->diff->i) * 60) + + intervalobj->diff->s + ); + zend_hash_update(props, "seconds", 8, &zv, sizeof(zval), NULL); return props; } [2009-11-04 15:09:16] der...@php.net This patch is not correct, because it doesn't take care of daylight savings time nor should "invert" being taken into account as it's already a seperate field. I wouldn't call it "diff" either, but "seconds" just like there is "days". [2009-11-04 14:31:46] RQuadling at GMail dot com Description: The output of DateInterval->diff() currently shows the breakdown of the difference (y, m, d, h, i, s, days, invert). Which is fine. But I'd like to be able to have the number of seconds difference. The following patch adds a new entry to the output: diff. It is a straight calculation of the seconds based upon days, h, i and s, and takes into consideration invert. The patch below is the same for branch/5_3 and trunk. I think this patch and the DateInterval object comparison patch reported in Bug#49914 by aharvey would be good additions. Regards, Richard. Reproduce code: --- Index: php_date.c === --- php_date.c (revision 290198) +++ php_date.c (working copy) @@ -2245,6 +2245,16 @@ PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + + MAKE_STD_ZVAL(zv); + ZVAL_LONG(zv, (( + intervalobj->diff->days * 24) + + intervalobj->diff->h) * 60) + + intervalobj->diff->i) * 60) + + intervalobj->diff->s) * ( + intervalobj->diff->invert ? -1 : 1) + ); + zend_hash_update(props, "diff", 5, &zv, sizeof(zval), NULL); return props; } -- Edit this bug report at http://bugs.php.net/?id=50075&edit=1
#50075 [Opn]: Provide single value difference in DateInterval->diff()
ID: 50075 User updated by: RQuadling at GMail dot com Reported By: RQuadling at GMail dot com Status: Open Bug Type: Feature/Change Request Operating System: Irrelevant PHP Version: 5.3.1RC3 New Comment: Which would suggest to me that DateTime->diff() has a bug. Personally, if I'm asking for the difference between 2 dates, the physical time between them would be what I would expect to be reported. So, when checking over DST, the result could be 23 hours (GMT->BST) or 1 day + 1 hour (BST -> GMT). Neither are 1 day. Previous Comments: [2009-11-04 15:56:14] der...@php.net DST is relevant because the following will show "one day", but it is not 86400 seconds: diff( $b ); echo $d->format( '%d %h:%i:%s' ), "\n"; echo $b->format( 'U' ) - $a->format( 'U' ), "\n"; echo $a->format( DateTime::ISO8601 ), "\n"; echo $b->format( DateTime::ISO8601 ), "\n"; ?> [2009-11-04 15:43:34] RQuadling at GMail dot com I'm not sure how DST is relevant here. DateInterval will already have worked out the difference in days, hours, mins, etc. All I'm providing is a total number of seconds. I take on the issue with invert, but it does mean having to do some userland calcs. diff -> seconds. Yep. Obviously. Index: php_date.c === --- php_date.c (revision 290198) +++ php_date.c (working copy) @@ -2245,6 +2245,15 @@ PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + + MAKE_STD_ZVAL(zv); + ZVAL_LONG(zv, ( + intervalobj->diff->days * 24) + + intervalobj->diff->h) * 60) + + intervalobj->diff->i) * 60) + + intervalobj->diff->s + ); + zend_hash_update(props, "seconds", 8, &zv, sizeof(zval), NULL); return props; } [2009-11-04 15:09:16] der...@php.net This patch is not correct, because it doesn't take care of daylight savings time nor should "invert" being taken into account as it's already a seperate field. I wouldn't call it "diff" either, but "seconds" just like there is "days". [2009-11-04 14:31:46] RQuadling at GMail dot com Description: The output of DateInterval->diff() currently shows the breakdown of the difference (y, m, d, h, i, s, days, invert). Which is fine. But I'd like to be able to have the number of seconds difference. The following patch adds a new entry to the output: diff. It is a straight calculation of the seconds based upon days, h, i and s, and takes into consideration invert. The patch below is the same for branch/5_3 and trunk. I think this patch and the DateInterval object comparison patch reported in Bug#49914 by aharvey would be good additions. Regards, Richard. Reproduce code: --- Index: php_date.c === --- php_date.c (revision 290198) +++ php_date.c (working copy) @@ -2245,6 +2245,16 @@ PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + + MAKE_STD_ZVAL(zv); + ZVAL_LONG(zv, (( + intervalobj->diff->days * 24) + + intervalobj->diff->h) * 60) + + intervalobj->diff->i) * 60) + + intervalobj->diff->s) * ( + intervalobj->diff->invert ? -1 : 1) + ); + zend_hash_update(props, "diff", 5, &zv, sizeof(zval), NULL); return props; } -- Edit this bug report at http://bugs.php.net/?id=50075&edit=1
#50080 [NEW]: 1 bit short of an 8 byte integer
From: aidevelopment at gmail dot com Operating system: Linux 2.6.15-26-server PHP version: 5.2.11 PHP Bug Type: Variables related Bug description: 1 bit short of an 8 byte integer Description: Despite having PHP_INT_MAX set to 8 bytes, It is impossible to have an int greater than 1000. 8 Byte, or 64 bit maximum should be . In my included example, it is clear that when attempting to increase the value above(by adding 1), simply nothing happens. Attempting to assign a variable to a number greater than the above number produces unpredictable results. Reproduce code: --- "; $status = 0x7FFF; for($i=0;$i<=4;$i++) { printf ("status = '%b'", $status); $status++; } ?> Expected result: Int Size = 8 bytes. status = '111' status = '1000' status = '1001' status = '1010' status = '1011' Actual result: -- Int Size = 8 bytes. status = '111' status = '1000' status = '1000' status = '1000' status = '1000' -- Edit bug report at http://bugs.php.net/?id=50080&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50080&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50080&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50080&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50080&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50080&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50080&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50080&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50080&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50080&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50080&r=support Expected behavior: http://bugs.php.net/fix.php?id=50080&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50080&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50080&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50080&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50080&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50080&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50080&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50080&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50080&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50080&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50080&r=mysqlcfg
#49169 [Com]: SoapServer calls wrong function, although "SOAP action" header is correct
ID: 49169 Comment by: spyowl at gmail dot com Reported By: jeroen at asystance dot nl Status: Verified Bug Type: SOAP related Operating System: linux PHP Version: 5.2SVN-2009-08-05 (snap) New Comment: Confirmed on 5.3.1RC3 using WSDL. The problem seems to be the matching first argument name between methods (not the whole signature) - as long as 2 or more methods have the same name for the first argument the SoapServer will always execute the first method listed, regardless of soapAction, and even if there are additional arguments for those methods that are different from each other. This is a pretty serious bug. Previous Comments: [2009-09-30 06:58:28] wee at xbe dot ch this bug is really annoying.. the forced use of rpc (the "workaround") is not a serious fix. we also evaluated wso2 (wsf_php) as the php soapserver simply isn't that business ready, but that too has it's issues (has problems when it comes to generate complex wsdl and with complex type handling on the php side). and it segfaults with an activated zend optimizer+ ;-) anyway, i just comment to give more importance to this bug. [2009-09-23 14:51:48] robin dot harvey at chaptereight dot com @bigdan at gmail dot com The workaround I'm using is to set up my WSDL so that all methods have a unique input type signature. Of course this leads to an ugly and unnecessarily bloated WSDL, but there's not much other choice (other than WS02 PHP, that is) [2009-09-18 14:10:39] jeroen at asystance dot nl bigdan, I think you left out one option: this _is_ a bug. Using RPC style _is_ a workaround, but one that doesn't always work. The real problem is that SOAP should use the SOAPAction header to determine which operation to call, not guess based on parameters (which is what it looks to be doing now). While the comment you refer to does point out this very issue and predates this bug, that doesn't mean it's not a bug. Rather the commenter could (and should?) have filed this as a bug more than a year ago. [2009-09-18 13:51:18] bigdan at gmail dot com Nevermind on the workaround - either this is not a bug, this issue was noticed well before this bug, or the comments here are entirely unrelated though they correct the issue for me: http://us3.php.net/manual/en/soapserver.handle.php#81750 TLDR: Instead of http://bugs.php.net/49169 -- Edit this bug report at http://bugs.php.net/?id=49169&edit=1
#49856 [Opn->Fbk]: SHOW COLUMNS FROM... return weird result set
ID: 49856 Updated by: u...@php.net Reported By: joao at jjmf dot com -Status: Open +Status: Feedback Bug Type: PDO related Operating System: CentOS 5.3 PHP Version: 5.3.0 New Comment: What MySQL version are you using? Previous Comments: [2009-10-13 02:23:02] joao at jjmf dot com Description: When executing the query "SHOW COLUMNS FROM table" it returns weird results. Database: MySQL. I think it's something related to CentOS 5.3 since I got this problem after migrating from Ubuntu. This never happened in Ubuntu. Reproduce code: --- --- >From manual page: pdostatement.fetch#Descrição --- $pdo = new PDO( 'mysql:host=localhost;dbname=MYDB', 'MYUSER', 'MYPASS', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8") ); $sql = "SHOW COLUMNS FROM tablename"; $sth = $pdo->prepare($sql); $sth->execute(); /* Exercise PDOStatement::fetch styles */ print("PDO::FETCH_ASSOC: "); print("Return next row as an array indexed by column name\n"); $result = $sth->fetch(PDO::FETCH_ASSOC); print_r($result); print("\n"); Expected result: For each column an array like: [Field] => 'id_user' [Type] => 'int(11) unsigned' [Null] => 'NO' [Key] => 'PRI' [Default] => null [Extra] => 'auto_increment' Actual result: -- For each column an array like: [Field] => id_user [COLUMN_TYPE] => int(11) unsigned [COLUMNS] => NO [] => [def] => auto_increment -- Edit this bug report at http://bugs.php.net/?id=49856&edit=1
#49262 [Opn->Fbk]: PDO MySQL crashes on STRING params
ID: 49262 Updated by: u...@php.net Reported By: grzegorz at heex dot pl -Status: Open +Status: Feedback Bug Type: PDO related Operating System: Win XP Sp3 PHP Version: 5.3.0 New Comment: If its not crashing with MySQL 5.1, I strongly believe this is a MySQL matter not a PHP problem. Can you try 5.1? Thanks Previous Comments: [2009-09-22 18:58:54] grzegorz at heex dot pl It's 6.0.5-alpha-community [2009-09-22 17:00:06] u...@php.net Thanks again, utf8 everywhere. We guessed so. I don't know if its of much relevance but one last question: what version of MySQL 6.0 are you using? .oO( MySQL 6.0 is something I don't like to see here. I wouldn't want to debug a non-GA server, if I had a choice. ) Thanks! [2009-09-22 16:35:59] grzegorz at heex dot pl Variable_name Value character_set_clientutf8 character_set_connectionutf8 character_set_database utf8 character_set_filesystembinary character_set_results utf8 character_set_serverutf8 character_set_systemutf8 character_sets_dir C:\Program Files\MySQL\MySQL Server 6.0\share\char.. [2009-09-22 13:53:00] u...@php.net Ok, great. Your character set is uft8 (uft8_general_ci is the collation). Can you paste "SHOW VARIABLES LIKE '%character%'" to give details about your MySQL settings? Thanks! [2009-09-20 22:44:06] grzegorz at heex dot pl Column lng_name and a whole table they have utf8_general_ci charset. 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/49262 -- Edit this bug report at http://bugs.php.net/?id=49262&edit=1
#50080 [Opn]: 1 bit short of an 8 byte integer
ID: 50080 Updated by: sjo...@php.net Reported By: aidevelopment at gmail dot com Status: Open Bug Type: Variables related Operating System: Linux 2.6.15-26-server PHP Version: 5.2.11 New Comment: In a 64 bit integer, 1 bit indicates the sign and 63 bits are left for the number. Thus the range is from -2^63 to 2^63, giving 2^64 numbers. Previous Comments: [2009-11-04 16:14:21] aidevelopment at gmail dot com Description: Despite having PHP_INT_MAX set to 8 bytes, It is impossible to have an int greater than 1000. 8 Byte, or 64 bit maximum should be . In my included example, it is clear that when attempting to increase the value above(by adding 1), simply nothing happens. Attempting to assign a variable to a number greater than the above number produces unpredictable results. Reproduce code: --- "; $status = 0x7FFF; for($i=0;$i<=4;$i++) { printf ("status = '%b'", $status); $status++; } ?> Expected result: Int Size = 8 bytes. status = '111' status = '1000' status = '1001' status = '1010' status = '1011' Actual result: -- Int Size = 8 bytes. status = '111' status = '1000' status = '1000' status = '1000' status = '1000' -- Edit this bug report at http://bugs.php.net/?id=50080&edit=1
#49856 [Fbk->Opn]: SHOW COLUMNS FROM... return weird result set
ID: 49856 User updated by: joao at jjmf dot com Reported By: joao at jjmf dot com -Status: Feedback +Status: Open Bug Type: PDO related Operating System: CentOS 5.3 PHP Version: 5.3.0 New Comment: Mysql version is 5.0.77-3.el5 Previous Comments: [2009-11-04 17:09:06] u...@php.net What MySQL version are you using? [2009-10-13 02:23:02] joao at jjmf dot com Description: When executing the query "SHOW COLUMNS FROM table" it returns weird results. Database: MySQL. I think it's something related to CentOS 5.3 since I got this problem after migrating from Ubuntu. This never happened in Ubuntu. Reproduce code: --- --- >From manual page: pdostatement.fetch#Descrição --- $pdo = new PDO( 'mysql:host=localhost;dbname=MYDB', 'MYUSER', 'MYPASS', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8") ); $sql = "SHOW COLUMNS FROM tablename"; $sth = $pdo->prepare($sql); $sth->execute(); /* Exercise PDOStatement::fetch styles */ print("PDO::FETCH_ASSOC: "); print("Return next row as an array indexed by column name\n"); $result = $sth->fetch(PDO::FETCH_ASSOC); print_r($result); print("\n"); Expected result: For each column an array like: [Field] => 'id_user' [Type] => 'int(11) unsigned' [Null] => 'NO' [Key] => 'PRI' [Default] => null [Extra] => 'auto_increment' Actual result: -- For each column an array like: [Field] => id_user [COLUMN_TYPE] => int(11) unsigned [COLUMNS] => NO [] => [def] => auto_increment -- Edit this bug report at http://bugs.php.net/?id=49856&edit=1
#50080 [Com]: 1 bit short of an 8 byte integer
ID: 50080 Comment by: aidevelopment at gmail dot com Reported By: aidevelopment at gmail dot com Status: Open Bug Type: Variables related Operating System: Linux 2.6.15-26-server PHP Version: 5.2.11 New Comment: I understand what you are saying. However, the handling is very difficult to understand. As you can see, adding 1 simply has no effect past positive 0 (1000). I have not been able to determine yet exactly what happens when you explicitly assign a variable to a value "too large". Is there no way to have PHP utilize 64 bit values (uint64)? Previous Comments: [2009-11-04 17:17:58] sjo...@php.net In a 64 bit integer, 1 bit indicates the sign and 63 bits are left for the number. Thus the range is from -2^63 to 2^63, giving 2^64 numbers. [2009-11-04 16:14:21] aidevelopment at gmail dot com Description: Despite having PHP_INT_MAX set to 8 bytes, It is impossible to have an int greater than 1000. 8 Byte, or 64 bit maximum should be . In my included example, it is clear that when attempting to increase the value above(by adding 1), simply nothing happens. Attempting to assign a variable to a number greater than the above number produces unpredictable results. Reproduce code: --- "; $status = 0x7FFF; for($i=0;$i<=4;$i++) { printf ("status = '%b'", $status); $status++; } ?> Expected result: Int Size = 8 bytes. status = '111' status = '1000' status = '1001' status = '1010' status = '1011' Actual result: -- Int Size = 8 bytes. status = '111' status = '1000' status = '1000' status = '1000' status = '1000' -- Edit this bug report at http://bugs.php.net/?id=50080&edit=1
#49856 [Opn]: SHOW COLUMNS FROM... return weird result set
ID: 49856 Updated by: u...@php.net Reported By: joao at jjmf dot com Status: Open Bug Type: PDO related Operating System: CentOS 5.3 PHP Version: 5.3.0 New Comment: Sorry, can't reproduce. Works fine for me with PHP 5.3.2-dev if either using libmysql or mysqlnd. array(6) { ["Field"]=> string(2) "id" ["Type"]=> string(7) "int(11)" ["Null"]=> string(2) "NO" ["Key"]=> string(3) "PRI" ["Default"]=> string(1) "0" ["Extra"]=> string(0) "" } array(1) { ["_version"]=> string(19) "5.0.77-community-nt" } Maybe others can reproduce, if you provide the table structure. Does SHOW COLUMNS work properly on the mysql prompt? Previous Comments: [2009-11-04 17:22:21] joao at jjmf dot com Mysql version is 5.0.77-3.el5 [2009-11-04 17:09:06] u...@php.net What MySQL version are you using? [2009-10-13 02:23:02] joao at jjmf dot com Description: When executing the query "SHOW COLUMNS FROM table" it returns weird results. Database: MySQL. I think it's something related to CentOS 5.3 since I got this problem after migrating from Ubuntu. This never happened in Ubuntu. Reproduce code: --- --- >From manual page: pdostatement.fetch#Descrição --- $pdo = new PDO( 'mysql:host=localhost;dbname=MYDB', 'MYUSER', 'MYPASS', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8") ); $sql = "SHOW COLUMNS FROM tablename"; $sth = $pdo->prepare($sql); $sth->execute(); /* Exercise PDOStatement::fetch styles */ print("PDO::FETCH_ASSOC: "); print("Return next row as an array indexed by column name\n"); $result = $sth->fetch(PDO::FETCH_ASSOC); print_r($result); print("\n"); Expected result: For each column an array like: [Field] => 'id_user' [Type] => 'int(11) unsigned' [Null] => 'NO' [Key] => 'PRI' [Default] => null [Extra] => 'auto_increment' Actual result: -- For each column an array like: [Field] => id_user [COLUMN_TYPE] => int(11) unsigned [COLUMNS] => NO [] => [def] => auto_increment -- Edit this bug report at http://bugs.php.net/?id=49856&edit=1
#49856 [Opn]: SHOW COLUMNS FROM... return weird result set
ID: 49856 Updated by: u...@php.net Reported By: joao at jjmf dot com Status: Open Bug Type: PDO related Operating System: CentOS 5.3 PHP Version: 5.3.0 New Comment: Sorry, can't reproduce. Works fine for me with PHP 5.3.2-dev if either using libmysql or mysqlnd. array(6) { ["Field"]=> string(2) "id" ["Type"]=> string(7) "int(11)" ["Null"]=> string(2) "NO" ["Key"]=> string(3) "PRI" ["Default"]=> string(1) "0" ["Extra"]=> string(0) "" } array(1) { ["_version"]=> string(19) "5.0.77-community-nt" } Maybe others can reproduce, if you provide the table structure. Does SHOW COLUMNS work properly on the mysql prompt? Previous Comments: [2009-11-04 18:43:43] u...@php.net Sorry, can't reproduce. Works fine for me with PHP 5.3.2-dev if either using libmysql or mysqlnd. array(6) { ["Field"]=> string(2) "id" ["Type"]=> string(7) "int(11)" ["Null"]=> string(2) "NO" ["Key"]=> string(3) "PRI" ["Default"]=> string(1) "0" ["Extra"]=> string(0) "" } array(1) { ["_version"]=> string(19) "5.0.77-community-nt" } Maybe others can reproduce, if you provide the table structure. Does SHOW COLUMNS work properly on the mysql prompt? [2009-11-04 17:22:21] joao at jjmf dot com Mysql version is 5.0.77-3.el5 [2009-11-04 17:09:06] u...@php.net What MySQL version are you using? [2009-10-13 02:23:02] joao at jjmf dot com Description: When executing the query "SHOW COLUMNS FROM table" it returns weird results. Database: MySQL. I think it's something related to CentOS 5.3 since I got this problem after migrating from Ubuntu. This never happened in Ubuntu. Reproduce code: --- --- >From manual page: pdostatement.fetch#Descrição --- $pdo = new PDO( 'mysql:host=localhost;dbname=MYDB', 'MYUSER', 'MYPASS', array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8") ); $sql = "SHOW COLUMNS FROM tablename"; $sth = $pdo->prepare($sql); $sth->execute(); /* Exercise PDOStatement::fetch styles */ print("PDO::FETCH_ASSOC: "); print("Return next row as an array indexed by column name\n"); $result = $sth->fetch(PDO::FETCH_ASSOC); print_r($result); print("\n"); Expected result: For each column an array like: [Field] => 'id_user' [Type] => 'int(11) unsigned' [Null] => 'NO' [Key] => 'PRI' [Default] => null [Extra] => 'auto_increment' Actual result: -- For each column an array like: [Field] => id_user [COLUMN_TYPE] => int(11) unsigned [COLUMNS] => NO [] => [def] => auto_increment -- Edit this bug report at http://bugs.php.net/?id=49856&edit=1
#48314 [Opn]: PDO_MySQL doesn't use prepared statements
ID: 48314 Updated by: u...@php.net Reported By: vr...@php.net Status: Open Bug Type: PDO related Operating System: Windows PHP Version: 5.2.9 New Comment: Occasionally I am tempted to bogus any PDO MYSQL character set bug report I see. SET NAMES won't be recognized by the client and the wrong character set will be used for escaping. Adding a DSN option to specify the character set upon connect and setting it properly through the C API may be only five lines of code. But even if that would be implemented we would still have the PDO PS emulation as a potential pitfall. PDO will call the driver for escaping bound values and the driver will properly escape the values. But the PDO SQL parser itself won't care much about the current character set when searching for placeholders. Previous Comments: [2009-09-29 21:41:34] u...@php.net Well, you should not use SET NAMES. It will not change the charset used for quoting. Currently there is no way to change the charset via an API call. Try ext/mysqli... [2009-05-18 13:45:30] vr...@php.net Same result. [2009-05-18 13:43:31] johan...@php.net Try also disabling PDO::ATTR_EMULATE_PREPARES. PHP 5.3 got some improvements/fixes with PDO_mysql (due to mysqlnd work) not sure if some parts can be backported. [2009-05-18 13:25:17] vr...@php.net Description: It seems that PDO_MySQL doesn't use prepared statements even with disabled PDO::MYSQL_ATTR_DIRECT_QUERY. If the prepared statements would by used then the binary data passed in the example wouldn't cause a parse error. MySQL version: 5.1.26 Reproduce code: --- setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false); $pdo->exec("SET NAMES gbk"); $stmt = $pdo->prepare("SELECT ?"); $stmt->execute(array(chr(0xbf) . chr(0x27))); print_r($stmt->errorInfo()); ?> Expected result: Array ( [0] => 0 ) Actual result: -- Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''¿\''' at line 1 ) -- Edit this bug report at http://bugs.php.net/?id=48314&edit=1
#50024 [Com]: basename() chops first character in filename
ID: 50024 Comment by: peo at bsdlabs dot com Reported By: peo at bsdlabs dot com Status: Feedback Bug Type: Filesystem function related Operating System: FreeBSD PHP Version: 5.2.11 New Comment: We are still trying to invent a script that reproduces the error. The below is what we hoped would do it but it does not so it needs further refinement. The error occurs when "basename" is fed a filename without path and once in several hundred the first character is missing. And finally, it comes and goes, like this: [27-Oct-2009 10:27:22] goes [28-Oct-2009 00:26:55] comes [28-Oct-2009 23:28:47] goes (summertime ends) [30-Oct-2009 00:23:00] comes [31-Oct-2009 11:40:10] goes [02-Nov-2009 00:24:10] comes [03-Nov-2009 11:34:41] goes [04-Nov-2009 00:27:41] comes [04-Nov-2009 11:28:55] goes Previous Comments: [2009-11-03 10:39:31] j...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. [2009-10-27 18:47:21] peo at bsdlabs dot com Description: The platform is: FreeBSD 7.2-STABLE #0: Thu Oct 15 07:23:17 CEST 2009 - Problem not tied to a specific version of OS or PHP - Vanilla installation of Horde http://www.horde.org - Identical problem present on two servers - Problem started to occur spring 2009 - Low server load - Intermittent - Comes and goes at certain times during the day. Usually, the problem will start around 11:30 CEST or 10:30 CET, last for 24h and then go away for another 24h. And yes, we have looked for causes for this behaviour - Happens regardless of cache configuration in Horde, even without any caching - Happens regardless of cache and session settings in php.ini - The below is an *example* - One more user on the Horde lists have reported same problem with same OS (FreeBSD) Reproduce code: --- function factory($driver, $params = array()) { if (is_array($driver)) { $app = $driver[0]; $driver = $driver[1]; } $driver = basename($driver); if (empty($driver) || $driver == 'none') { return new Horde_Cache($params); } if (!empty($app)) { include_once $app . '/lib/Cache/' . $driver . '.php'; } elseif (file_exists(dirname(__FILE__) . '/Cache/' . $driver . '.php')) { include_once dirname(__FILE__) . '/Cache/' . $driver . '.php'; } else { include_once 'Horde/Cache/' . $driver . '.php'; } $class = 'Horde_Cache_' . $driver; if (class_exists($class)) { $cache = new $class($params); } else { $cache = PEAR::raiseError('Class definition of ' . $class . ' not found.'); } return $cache; } Expected result: Should return memcache.php in this case, but it could be "none.php" (where the actual output will be "one.php") Actual result: -- [21-Oct-2009 07:28:28] after basename d string(8) "memcache" string(7) "emcache" [21-Oct-2009 07:28:28] backtrace NULL string(7) "emcache" #0 Horde_Cache->factory(memcache, Array ([hostspec] => Array ([0] => localhost),[port] => Array ([0] => 11211),[weight] => Array (),[persistent] => ,[compression] => ,[large_items] => 1,[enabled] => 1)) called at [/usr/local/www/horde/lib/Horde/Cache.php:234] #1 Horde_Cache->singleton(memcache, Array ([hostspec] => Array ([0] => localhost),[port] => Array ([0] => 11211),[weight] => Array (),[persistent] => ,[compression] => ,[large_items] => 1,[enabled] => 1)) called at [/usr/local/www/horde/lib/Horde/Perms/sql.php:57] #2 Perms_sql->Perms_sql(Array ([username] => horde,[password] => ,[protocol] => unix,[database] => horde,[charset] => iso-8859-1,[splitread] => ,[ssl] => ,[phptype] => mysqli)) called at [/usr/local/www/horde/lib/Horde/Perms.php:462] #3 Perms->factory(sql, Array ([username] => horde,[password] => ,[protocol] => unix,[database] => horde,[charset] => iso-8859-1,[splitread] => ,[ssl] => ,[phptype] => mysqli)) called at [/usr/local/www/horde/lib/Horde/Perms.php:496] #4 Perms->singleton() called at [/usr/local/www/horde/lib/Horde/Registry.php:278] #5 Registry->Registry(0) called at [/usr/local/www/horde/lib/Horde/Registry.php:139] #6 Registry::singleton() called at [/usr/local/www/horde/imp/lib/base.php:49] #7 require_once(/usr/local/www/horde/imp/lib/base.php) called at [/usr/local/www/horde/imp/redirect.php:89] #8
#49961 [NoF->Bgs]: Value of "length" column for fetch_fields() is incorrect.
ID: 49961 Updated by: u...@php.net Reported By: aavolkoff at gmail dot com -Status: No Feedback +Status: Bogus Bug Type: MySQLi related Operating System: Linux l9.in-solve.ru 2.6.26-r9-s PHP Version: 5.2.11 New Comment: Ah, now I get what is puzzling you: 200 -> 600, sorry missed that on the first glance. Not a bug, length is length in bytes. UTF8 uses 3 bytes per character, 200 * 3 = 600. >From the underlying C API documentation: The width of the field. This corresponds to the display length, in bytes. The server determines the length value before it generates the result set, so this is the minimum length required for a data type capable of holding the largest possible value from the result column, without knowing in advance the actual values that will be produced by the query for the result set. Previous Comments: [2009-10-31 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2009-10-23 20:21:11] aavolkoff at gmail dot com MySQL charset: UTF-8 Unicode (utf8) real_query($query); $mysqli->select_db($db_name); $table_name = "Users"; $query = "CREATE TABLE `".$table_name."`(id int not null auto_increment, name varchar(200), description varchar(200), primary key (id)) TYPE=MyISAM"; $mysqli->real_query($query); $query= "SELECT * FROM `$table_name` LIMIT 0"; $query_result = $mysqli->real_query($query); if ($query_result) { $mysqli_result = $mysqli->use_result(); $mysqli_fields = $mysqli_result->fetch_fields(); $mysqli_result->free_result(); print_r($mysqli_fields); } ?> [2009-10-23 07:18:21] u...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. What is needed is all the character sets: MySQL server, client etc. [2009-10-23 07:17:16] u...@php.net Sounds bogus. The mysql extensions in 5.2 forward 1 by 1 what the C API = Mysql returns. The multiplier of 3 hints that a 3-byte charset gets used in one case and a 1-byte charset in the other Without information on the character sets used, this cannot be verified. You need to provide character set information [2009-10-22 18:02:12] aavolkoff at gmail dot com Description: Value of "length" column for fetch_fields() is incorrect. eg: MySQL version: 5.0.37 Reproduce code: --- I have table "Users": name = "id"; type = "INT"; length = 11. name = "name"; type = "VARCHAR"; length = 200. name = "description"; type = "VARCHAR"; length = 200. Code: //$mysqli defined earlier $query= "SELECT * FROM `Users` LIMIT 0"; $query_result = $mysqli->real_query($query); if ($query_result) { $mysqli_result = $mysqli->use_result(); $mysqli_fields = $mysqli_result->fetch_fields(); $mysqli_result->free_result(); print_r($mysqli_fields); } Expected result: Array ( [0] => stdClass Object ( [name] => id [orgname] => id [table] => Users [orgtable] => Users [def] => [max_length] => 0 [length] => 11 [charsetnr] => 63 [flags] => 49667 [type] => 3 [decimals] => 0 ) [1] => stdClass Object ( [name] => name [orgname] => name [table] => Users [orgtable] => Users [def] => [max_length] => 0 [length] => 200 [charsetnr] => 33 [flags] => 0 [type] => 253 [decimals] => 0 ) [2] => stdClass Object ( [name] => description [orgname] => description [table] => Users [orgtable] => Users [def] => [max_length] => 0 [length] => 200 [charsetnr] => 33 [flags] => 0 [type] => 253 [decimals] => 0 ) ) Actual result: -- Array ( [0] => stdClass Object ( [name] => id [orgname] => id [table] => Users [orgtable] => Users [def] => [max_length] => 0 [length] => 11 [charsetnr] => 63 [flags] => 49667 [type] => 3 [decimals] => 0 ) [1] => stdClass Object ( [name] => name [orgname] => name [table] => Users [orgtable] => Users [def] => [max_length] => 0 [length] => 600 [charsetn
#46063 [NoF->Fbk]: SoapFault exception: [HTTP] Error Fetching http headers
ID: 46063 Updated by: srina...@php.net Reported By: filip_stjernberg at hotmaol dot com -Status: No Feedback +Status: Feedback Bug Type: SOAP related Operating System: Windows vista PHP Version: 5.2.6 New Comment: looking at the truss output, it seems to me the endpoint service is waiting for some more input to be provided as part of your HelloWorld request. you might want to check their documentation . i don't think there is any issue with SoapClient implementation here. Previous Comments: [2009-11-04 13:10:25] ucl at mail dot ru I've solve the problem of "Error Fetching http headers" by adding ini_set('max_input_time', -1); before SOAP call. Problem is that my SOAP server have to think long time after request, and i'v had timeout in soap. [2009-03-13 08:53:56] ft20082 at 163 dot com i have some problem with it. and my result is : Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in E:\wwwroot\wsdl.php:41 Stack trace: #0 [internal function]: SoapClient->__doRequest('http://webservi...', '', 1, 0) #1 E:\wwwroot\wsdl.php(41): SoapClient->__soapCall('searchFlights', Array) #2 {main} thrown in E:\wwwroot\wsdl.php on line 41 so, what should i do? [2009-02-21 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2009-02-13 23:24:28] fel...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-09-12 07:49:07] filip_stjernberg at hotmaol dot com Description: I'm trying to use an existing webservice: http://testhorizon.gothiagroup.com/AFSServices/AFSService.svc?wsdl There is a simple test function called "HelloWorld" that returns the input "myVaule". This function dos not need authentification but its more advaced one do. Really need this to work, have tried nuSOAP to but that gives me other problems. Reproduce code: --- This is the code I use: try{ $wsdl = 'http://testhorizon.gothiagroup.com/AFSServices/AFSService.svc?wsdl'; $client = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_2, 'trace' => 1, 'exceptions' => 1 )); print($client->HelloWorld(array('myValue' => 'Test'))); } catch (Exception $e) { printf("Message = %s\n",$e->__toString()); } print "n"; print "Request :n".htmlspecialchars($client->__getLastRequest()) ."n"; print "Response:n".htmlspecialchars($client->__getLastResponse())."n"; print ""; Expected result: Hello from AFSService: Test Actual result: -- Message = SoapFault exception: [HTTP] Error Fetching http headers in /customers/veus.se/veus.se/httpd.www/Test/samples/AFSWS1.php:20 Stack trace: #0 [internal function]: SoapClient->__doRequest('http://testhori...', 'http://tempuri', 2, 0) #1 [internal function]: SoapClient->__call('HelloWorld', Array) #2 /customers/veus.se/veus.se/httpd.www/Test/samples/AFSWS1.php(20): SoapClient->HelloWorld(Array) #3 {main} nRequest :n http://www.w3.org/2003/05/soap-envelope"; xmlns:ns1="http://tempuri.org/";>Exor nResponse:nn -- Edit this bug report at http://bugs.php.net/?id=46063&edit=1
#50064 [Opn->Fbk]: SOAP response by is not encoded
ID: 50064 Updated by: srina...@php.net Reported By: ckl at ecw dot de -Status: Open +Status: Feedback Bug Type: SOAP related Operating System: Windows XP SP3 PHP Version: 5.2.11 New Comment: will it be to provide a test case where this problem is reproduced. This would allow us to look further on this issue. the below provided information doesn't seem to be enough to reproduce this problem when I tried your interface.wsdl, I get the below error : Message = SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Missing with name 'tns:findUserResponse' in /export/home/sriramn/scripts/PHP/soap-client-3.php:10 Stack trace: looks like the interface.wsdl is missing some information. to answer your other question, php internally uses libxml2 to parse the xml file. Previous Comments: [2009-11-03 16:28:17] ckl at ecw dot de Description: I developed a Spring-WS webservice which I try to call by PHP. WSDL file: --- http://schemas.xmlsoap.org/wsdl/"; xmlns:sch="http://www.ecw.de/adg/person/schema/beans"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://www.ecw.de/adg/person/schema/beans"; targetNamespace="http://www.ecw.de/adg/person/schema/beans";> http://www.w3.org/2001/XMLSchema"; xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; xmlns="http://www.ecw.de/adg/person/schema/beans"; xmlns:pb="http://www.ecw.de/adg/person/schema/beans"; xmlns:schemas="http://www.ecw.de/adg/person/schema/beans"; xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"; attributeFormDefault="unqualified" elementFormDefault="unqualified" jaxb:extensionBindingPrefixes="xjc" jaxb:version="1.0" targetNamespace="http://www.ecw.de/adg/person/schema/beans"; xmlns:tns="http://www.ecw.de/adg/person/schema/beans";> http://schemas.xmlsoap.org/soap/http"/> http://localhost:8080/ADG/personService"/> --- Response from Spring-WS (fetched by proxying the request/response): --- http://schemas.xmlsoap.org/soap/envelope/";> http://www.ecw.de/adg/person/schema/beans";> http://www.w3.org/2001/XMLSchema-instance"/> http://www.w3.org/2001/XMLSchema-instance"/> http://www.w3.org/2001/XMLSchema-instance"/> desc
#50080 [Opn->Bgs]: 1 bit short of an 8 byte integer
ID: 50080 Updated by: j...@php.net Reported By: aidevelopment at gmail dot com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Linux 2.6.15-26-server PHP Version: 5.2.11 New Comment: No. Previous Comments: [2009-11-04 17:59:05] aidevelopment at gmail dot com I understand what you are saying. However, the handling is very difficult to understand. As you can see, adding 1 simply has no effect past positive 0 (1000). I have not been able to determine yet exactly what happens when you explicitly assign a variable to a value "too large". Is there no way to have PHP utilize 64 bit values (uint64)? [2009-11-04 17:17:58] sjo...@php.net In a 64 bit integer, 1 bit indicates the sign and 63 bits are left for the number. Thus the range is from -2^63 to 2^63, giving 2^64 numbers. [2009-11-04 16:14:21] aidevelopment at gmail dot com Description: Despite having PHP_INT_MAX set to 8 bytes, It is impossible to have an int greater than 1000. 8 Byte, or 64 bit maximum should be . In my included example, it is clear that when attempting to increase the value above(by adding 1), simply nothing happens. Attempting to assign a variable to a number greater than the above number produces unpredictable results. Reproduce code: --- "; $status = 0x7FFF; for($i=0;$i<=4;$i++) { printf ("status = '%b'", $status); $status++; } ?> Expected result: Int Size = 8 bytes. status = '111' status = '1000' status = '1001' status = '1010' status = '1011' Actual result: -- Int Size = 8 bytes. status = '111' status = '1000' status = '1000' status = '1000' status = '1000' -- Edit this bug report at http://bugs.php.net/?id=50080&edit=1
#49868 [Ver]: max_execution_time affected by max_input_time
ID: 49868 User updated by: majkl578 at gmail dot com Reported By: majkl578 at gmail dot com Status: Verified Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.3, 6 (2009-10-19) New Comment: still present in 5.3.1RC3 Previous Comments: [2009-10-19 11:36:44] majkl578 at gmail dot com This security issue persists in php5.3-200910191030 snapshot. [2009-10-14 11:31:40] majkl578 at gmail dot com This problem does not appear neither on PHP 5.2.6 (windows binary) nor 5.2.10 (gentoo pkg). [2009-10-13 18:02:05] sjo...@php.net See also bug #37306 max_execution_time = max_input_time [2009-10-13 17:41:55] majkl578 at gmail dot com Description: PHP ignores the max_execution_time set in php.ini and sets (somehow internally) it to the value of max_input_time. ini_get returns correct values of both of these settings, but the script is halted after the time set as max_input_time. This bug affects PHP5.3RC1 and also the latest snapshot of PHP5.3. It is probably similar to an old bug #37306. Related php.ini values: max_execution_time = 5 max_input_time = 10 Configure command: ./configure --prefix=/usr --sysconfdir=/etc --cache-file=./config.cache --with-config-file-path=/etc/php --with-config-file-scan-dir=/etc/php/extensions --with-apxs2=/usr/bin/apxs2 --with-mysql --with-mysqli --with-curl --with-sqlite --enable-sqlite-utf8 --with-gd --enable-mbstring --with-openssl --disable-short-tags --with-mcrypt --with-bz2 --with-zlib --enable-zip --with-xmlrpc --enable-soap --without-mssql --with-pgsql --with-tidy --enable-debug --disable-posix --enable-exif --enable-ftp --with-gettext --with-mhash --enable-pcntl --with-pspell --enable-sockets --with-xsl --enable-cli --enable-calendar --disable-cgi --enable-zend-multibyte Reproduce code: --- http://bugs.php.net/?id=49868&edit=1
#50082 [NEW]: Incorrect test vector CFB/OFB results for Blowfish encryption
From: gslin at pixnet dot tw Operating system: FreeBSD 7.2-RELEASE i386 PHP version: 5.2.11 PHP Bug Type: mcrypt related Bug description: Incorrect test vector CFB/OFB results for Blowfish encryption Description: Incorrect results for CFB/OFB Blowfish test vectors (http://www.schneier.com/code/vectors.txt). Reproduce code: --- http://bugs.php.net/?id=50082&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50082&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50082&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50082&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50082&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50082&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50082&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50082&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50082&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50082&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50082&r=support Expected behavior: http://bugs.php.net/fix.php?id=50082&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50082&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50082&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50082&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50082&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50082&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50082&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50082&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50082&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50082&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50082&r=mysqlcfg
#50083 [NEW]: Bit shift
From: talk at apfeldot dot de Operating system: Win 7 PHP version: 5.3.0 PHP Bug Type: Unknown/Other Function Bug description: Bit shift Description: I think there is an integer overflow, which should be prevented. Reproduce code: --- Expected result: There should be int(0), because the 1 was shifted out of the integer representation and the binary code should be 0...0. Actual result: -- int(2) Binary represantation: 00...0010 -- Edit bug report at http://bugs.php.net/?id=50083&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50083&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50083&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50083&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50083&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50083&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50083&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50083&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50083&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50083&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50083&r=support Expected behavior: http://bugs.php.net/fix.php?id=50083&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50083&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50083&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50083&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50083&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50083&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50083&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50083&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50083&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50083&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50083&r=mysqlcfg