#50191 [Bgs]: $SERVER['argv'] not working as expected
ID: 50191 User updated by: ppass at hotmail dot fr Reported By: ppass at hotmail dot fr Status: Bogus Bug Type: URL related Operating System: Windows PHP Version: 5.2.11 New Comment: I don't believe this. The manual says: << Array of arguments passed to the script. When the script is run on the command line, this gives C-style access to the command line parameters. When called via the GET method, this will contain the query string. >> "When the script is run on the command line" means that COMMAND line is not the only way. Anyway, it is possible to call from PHP. Still, the problem is not solved. Previous Comments: [2009-11-16 16:20:34] j...@php.net This variable is meant for COMMAND line only. ---- [2009-11-16 16:06:35] ppass at hotmail dot fr Description: I sometimes use URLs with several arguments. The value of some of arguments are urlencoded, so a space will be translated to a + sign. The problem is that $SERVER['argv'] seems to interpret this + sign by as a separator. Reproduce code: --- File: argv_behaviour.php List of arguments: (".$_SERVER['argv'][0].")"; ?> Expected result: When launching argv_behaviour.php?arg1=aa&arg2=b+c&arg3=dd I expect to see List of arguments: (arg1=aa&arg2=b+c&arg3=dd) Actual result: -- but I get List of arguments: (arg1=aa&arg2=b) I get the wrong number of arguments and truncated value for some of them. -- Edit this bug report at http://bugs.php.net/?id=50191&edit=1
#50191 [NEW]: $SERVER['argv'] not working as expected
From: ppass at hotmail dot fr Operating system: Windows PHP version: 5.2.11 PHP Bug Type: URL related Bug description: $SERVER['argv'] not working as expected Description: I sometimes use URLs with several arguments. The value of some of arguments are urlencoded, so a space will be translated to a + sign. The problem is that $SERVER['argv'] seems to interpret this + sign by as a separator. Reproduce code: --- File: argv_behaviour.php List of arguments: (".$_SERVER['argv'][0].")"; ?> Expected result: When launching argv_behaviour.php?arg1=aa&arg2=b+c&arg3=dd I expect to see List of arguments: (arg1=aa&arg2=b+c&arg3=dd) Actual result: -- but I get List of arguments: (arg1=aa&arg2=b) I get the wrong number of arguments and truncated value for some of them. -- Edit bug report at http://bugs.php.net/?id=50191&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50191&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50191&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50191&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50191&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50191&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50191&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50191&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50191&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50191&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50191&r=support Expected behavior: http://bugs.php.net/fix.php?id=50191&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50191&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50191&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50191&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50191&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50191&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50191&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50191&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50191&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50191&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50191&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="<div>text</div>"; } 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
#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: 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? Previous Comments: [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="<div>text</div>"; } 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
#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: That you for details, I just filed a bug in their system. Previous Comments: [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="<div>text</div>"; } 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
#49984 [Opn]: DOM model is completely broken
ID: 49984 User updated by: ppass at hotmail dot fr -Summary: DOM node contains partial contents only Reported By: ppass at hotmail dot fr Status: Open Bug Type: DOM XML related Operating System: Linux ns1 2.6.28.4-rsbac PHP Version: 5.2.11 New Comment: 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. Previous Comments: [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="<div>text</div>"; } 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