#45503 [Com]: Content of HTTP POST Message not accessible w/ PHP
ID: 45503 Comment by: 872431405 at qq dot com Reported By: michael at mcihael-menzel dot com Status: No Feedback Bug Type: HTTP related Operating System: debian linux PHP Version: 5.2.6 New Comment: one day i went shopping outside,and in an ed hardy store,I found some kinds of ed hardy i love most they are Your website is really good Thank you for the information http://www.abercrombie.us.com/men/classic-shirts";>Abercrombie And Fitch Men Shirts Abercrombie And Fitch Men Shirts http://www.ed-hardy-free.com/ed-hardy-accessories/bags rel=dofollow>Ed Hardy Bags Ed Hardy Bags thank you for information Previous Comments: [2008-07-22 01:00:02] 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". [2008-07-14 09:59:46] j...@php.net So the problem is that you can't pass POST stuff to this script? Where's that part in this example? You only included the irrelevant part here, perhaps it would be more obvious if we saw the actual POST form you use. [2008-07-13 22:03:05] michael at mcihael-menzel dot com Description: when recieving POST HTTP messages which have text/xml content in the message body this content can't be accessed: - php://input is empty - $HTTP_RAW_POST_DATA is empty (though enabled in php.ini) - neither do $_POST, $_SERVER and $_REQUEST not contain the data (as expected and correct) - neither does $_FILE contain anything (last obvious possibility) - even installation of pecl extension pecl_http 1.6 can't solve it (none of the given functions/methods did work) Reproduce code: --- $headers = getHeaders(); $ch = curl_init(); $headers[Host] = ""; # to be filled with a XML webservice URL curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_URL, ""); # to be filled with a XML webservice URL curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, file_get_contents("php://input")); # replace with any method/function to get the POST content curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $httpContent = curl_exec($ch); curl_close($ch); echo $httpContent; $h = fopen("responsecontent.log", "a"); fwrite($h, "\n\n" . $httpContent); fclose($h); function getHeaders() { $h = fopen("headers.log", "a"); fwrite($h, "\n\n"); $headers = array(); foreach ($_SERVER as $k => $v) { if (substr($k, 0, 5) == "HTTP_") { $k = str_replace('_', ' ', substr($k, 5)); $k = str_replace(' ', '-', ucwords(strtolower($k))); $headers[$k] = $v; fwrite($h, $k . ": " . $v . "\n"); } } fclose($h); return $headers; } Expected result: XML webservice answers to the POST request forwarded with curl. "reproduce code" doesn't contain the line to test the contents. in the beginning of the script all possible places where the POST content might be placed by PHP are written to a file. The file only gets filled by IE requests which send the data in a second HTTP (TCP-, IP-) packet. Firefox sends the whole request with content-type: text/xml in one packet and content is not accessible. Actual result: -- empty response by curl due to the empty post content sent to the webservice -- Edit this bug report at http://bugs.php.net/?id=45503&edit=1
#42849 [Com]: Configuration File (php.ini) Path incorrect
ID: 42849 Comment by: u2gohome at gmail dot com Reported By: inglis-php at yahoo dot com dot au Status: No Feedback Bug Type: *General Issues Operating System: win xp pro PHP Version: 5.2.4 New Comment: Hi. For me this problem was only occurring when php was executed via apache. Executing php -i from the command line listed the mysql extension whereas a phpinfo() request via the browser did not. Try adding the following line to your apache httpd.conf file (to point to the directory containing php.ini) eg. PHPIniDir 'C:\php' Adding this line changed phpinfo()'s reported 'Loaded Configuration File' from (none) to C:\php\php.ini, and mysql started talking. However, phpinfo() still reports c:\windows as the php.ini directory. Cheers, Matt Previous Comments: [2009-10-12 11:48:21] alim at fourplusadvertising dot com I am quite confused with this whole thing on my mac (leopard).. i thought my PHP was the perfect installation..;-).. till i realised that my PHP.ini setting of upload_max_filesize was still 2 MB inspite of me having changed it to 32 MB!!.. how do i get php to use the php.ini values and not the default.. I am facing the same issue on my imac.. there's some loaded configuration file which shows /private/etc while the Configuration File (php.ini) Path is /etc But they are I think symlinked.. but whatever I edit in the php.ini does not reflect in the phpinfo().. please help.. [2009-09-16 18:41:00] misc at imerk dot net I've just run into this problem. Using win2k8 r2 x64. And php 5.2.5 I copied the php installation that is working on a win2k3 server to this win2k8 box. I put the path to the ini file in both the system PATH variable as well as creating a reg key in local_machine/software/php5/iniFilePath = C:\php5 I still get (none) for the loaded config file. This is working fine on the win2k3 machine though. [2009-09-05 03:57:57] headnok at yahoo dot com I had the same damn problem and was pulling my hair out for a week. Please!!! Either instruct the users to move the php.ini file into the C:\windows directory your installation instructions or fix the problem! Please!!! [2008-12-11 06:22:55] yaddayadda at mailinator dot com I'm a new user of PHP/MySQL. I installed both and phpMyAdmin with no deviation from the instructions and could not get phpMyAdmin to work at all (it could not load the mysql extension). Despite reading numerous posts about what to uncomment in php.ini and what to add to the PATH, whatever I did did not seem to have any effect. Only after I ran phpinfo() did I find out that the path to php.ini was somehow pointing the Windows folder. I was editing php.ini in C:\PHP. There are many, many frustrated students and beginners out there having this exact issue. They don't know it is a bug. They are told to "just copy php.ini to your Windows folder" as a fix. I did not want to do this because I set the PATH to C:\PHP so I knew it should be looking there and NOT in C:\Windows (because there was no php.ini there, it should continue looking through the locations specified in PATH). I still do not know how to change this and ended up moving the file out of frustration and everything began to work. So many people are experiencing this frustration and wasting hours trying to fix it. Some are even giving up and moving to hosts that already have PHP installed rather than continue to learn on their own. If you install PHP to C:\PHP, the php.ini file it looks for should be there! [2008-12-01 15:59:02] rafael dot amador at gmail dot com Bug #39191 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/42849 -- Edit this bug report at http://bugs.php.net/?id=42849&edit=1
#50587 [Bgs]: The missing trailing slash on the url make an request error.
ID: 50587 Updated by: ras...@php.net Reported By: thundix at web dot de Status: Bogus Bug Type: URL related Operating System: Windows PHP Version: 5.2.12 New Comment: Nope, it works perfectly on my server with that exact code. You can try it for yourself here: http://progphp.com/thundix.php And the source code: http://progphp.com/thundix.phps Previous Comments: [2009-12-28 04:39:48] thundix at web dot de Hello, i run the following code: http://www.google.de";, HTTP_METH_GET, array('timeout' => 5, 'useragent' => 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6', 'redirect' => 3) ); //Send request $r->send(); //Only for showing you the result echo $r->getResponseBody(); ?> And get a html code back, where i can find: 404 Seite nicht gefunden If i run the code in my browser, i see the google search page with the text "Die Seite www.google.de/.php existiert nicht." Isn´t it the same on your server? When you also have this i report the bug also here http://pecl.php.net/bugs . Thanks - good night :() [2009-12-28 04:17:07] ras...@php.net Ah, woops, didn't notice you had the redirect in there. However, the bug is still bogus because: 1. The extension you are reporting a bug against is not part of PHP. It is a pecl extension which has its own bug reporting system at http://pecl.php.net/bugs 2. Running your exact code gives me the expected output with no mention of any sort of test.php script, so I suspect some user error here. There would be absolutely no reason for the extension to add /test.php to the request and there is no code in the extension that would do this. You must be doing this in your code. [2009-12-28 04:04:17] thundix at web dot de Hello, i am not so good at english. But i think you don´t understand me correct. I know the redirect option. In my code sample the rederict element of the option array have the value 3. But not the redirect is the problem, i think. The problem ist, when i make the request with the url http://google.de php make the request with the url www.google.de/test.php . So php add the trailing slash + (and here comes the error?) the php filename. Did you understand me now? [2009-12-28 03:47:57] ras...@php.net If you look at this more carefully, you will see that the server issues a redirect and as documented httprequest has the redirect option which sets how many redirects to follow set to 0. So, this is behaving exactly as it was intended and exactly as documented. [2009-12-28 03:41:03] thundix at web dot de Description: Request URL: http://google.de Response Body: "The site www.google.de/test.php doesn´t exists." Request URL: http://google.de/ => It works! Same problem have andychr17 at hotmail dot com See note here: http://de.php.net/manual/de/function.httprequest-construct.php Reproduce code: --- Try it with http://www.google.de and someone with http://www.google.de/ $r = new HttpRequest("http://www.google.de";, HTTP_METH_GET, array('timeout' => 5, 'useragent' => 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6', 'redirect' => 3) ); //Send request $r->send(); //Only for showing you the result echo $r->getResponseBody(); ?> Expected result: => See Description for more information Actual result: -- => See Description for more information -- Edit this bug report at http://bugs.php.net/?id=50587&edit=1
#50587 [Bgs]: The missing trailing slash on the url make an request error.
ID: 50587 User updated by: thundix at web dot de Reported By: thundix at web dot de Status: Bogus Bug Type: URL related Operating System: Windows PHP Version: 5.2.12 New Comment: Hello, i run the following code: http://www.google.de";, HTTP_METH_GET, array('timeout' => 5, 'useragent' => 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6', 'redirect' => 3) ); //Send request $r->send(); //Only for showing you the result echo $r->getResponseBody(); ?> And get a html code back, where i can find: 404 Seite nicht gefunden If i run the code in my browser, i see the google search page with the text "Die Seite www.google.de/.php existiert nicht." Isn´t it the same on your server? When you also have this i report the bug also here http://pecl.php.net/bugs . Thanks - good night :() Previous Comments: [2009-12-28 04:17:07] ras...@php.net Ah, woops, didn't notice you had the redirect in there. However, the bug is still bogus because: 1. The extension you are reporting a bug against is not part of PHP. It is a pecl extension which has its own bug reporting system at http://pecl.php.net/bugs 2. Running your exact code gives me the expected output with no mention of any sort of test.php script, so I suspect some user error here. There would be absolutely no reason for the extension to add /test.php to the request and there is no code in the extension that would do this. You must be doing this in your code. [2009-12-28 04:04:17] thundix at web dot de Hello, i am not so good at english. But i think you don´t understand me correct. I know the redirect option. In my code sample the rederict element of the option array have the value 3. But not the redirect is the problem, i think. The problem ist, when i make the request with the url http://google.de php make the request with the url www.google.de/test.php . So php add the trailing slash + (and here comes the error?) the php filename. Did you understand me now? [2009-12-28 03:47:57] ras...@php.net If you look at this more carefully, you will see that the server issues a redirect and as documented httprequest has the redirect option which sets how many redirects to follow set to 0. So, this is behaving exactly as it was intended and exactly as documented. [2009-12-28 03:41:03] thundix at web dot de Description: Request URL: http://google.de Response Body: "The site www.google.de/test.php doesn´t exists." Request URL: http://google.de/ => It works! Same problem have andychr17 at hotmail dot com See note here: http://de.php.net/manual/de/function.httprequest-construct.php Reproduce code: --- Try it with http://www.google.de and someone with http://www.google.de/ $r = new HttpRequest("http://www.google.de";, HTTP_METH_GET, array('timeout' => 5, 'useragent' => 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6', 'redirect' => 3) ); //Send request $r->send(); //Only for showing you the result echo $r->getResponseBody(); ?> Expected result: => See Description for more information Actual result: -- => See Description for more information -- Edit this bug report at http://bugs.php.net/?id=50587&edit=1
#50587 [Bgs]: The missing trailing slash on the url make an request error.
ID: 50587 Updated by: ras...@php.net Reported By: thundix at web dot de Status: Bogus Bug Type: URL related Operating System: Windows PHP Version: 5.2.12 New Comment: Ah, woops, didn't notice you had the redirect in there. However, the bug is still bogus because: 1. The extension you are reporting a bug against is not part of PHP. It is a pecl extension which has its own bug reporting system at http://pecl.php.net/bugs 2. Running your exact code gives me the expected output with no mention of any sort of test.php script, so I suspect some user error here. There would be absolutely no reason for the extension to add /test.php to the request and there is no code in the extension that would do this. You must be doing this in your code. Previous Comments: [2009-12-28 04:04:17] thundix at web dot de Hello, i am not so good at english. But i think you don´t understand me correct. I know the redirect option. In my code sample the rederict element of the option array have the value 3. But not the redirect is the problem, i think. The problem ist, when i make the request with the url http://google.de php make the request with the url www.google.de/test.php . So php add the trailing slash + (and here comes the error?) the php filename. Did you understand me now? [2009-12-28 03:47:57] ras...@php.net If you look at this more carefully, you will see that the server issues a redirect and as documented httprequest has the redirect option which sets how many redirects to follow set to 0. So, this is behaving exactly as it was intended and exactly as documented. [2009-12-28 03:41:03] thundix at web dot de Description: Request URL: http://google.de Response Body: "The site www.google.de/test.php doesn´t exists." Request URL: http://google.de/ => It works! Same problem have andychr17 at hotmail dot com See note here: http://de.php.net/manual/de/function.httprequest-construct.php Reproduce code: --- Try it with http://www.google.de and someone with http://www.google.de/ $r = new HttpRequest("http://www.google.de";, HTTP_METH_GET, array('timeout' => 5, 'useragent' => 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6', 'redirect' => 3) ); //Send request $r->send(); //Only for showing you the result echo $r->getResponseBody(); ?> Expected result: => See Description for more information Actual result: -- => See Description for more information -- Edit this bug report at http://bugs.php.net/?id=50587&edit=1
#50587 [Bgs]: The missing trailing slash on the url make an request error.
ID: 50587 User updated by: thundix at web dot de Reported By: thundix at web dot de Status: Bogus Bug Type: URL related Operating System: Windows PHP Version: 5.2.12 New Comment: Hello, i am not so good at english. But i think you don´t understand me correct. I know the redirect option. In my code sample the rederict element of the option array have the value 3. But not the redirect is the problem, i think. The problem ist, when i make the request with the url http://google.de php make the request with the url www.google.de/test.php . So php add the trailing slash + (and here comes the error?) the php filename. Did you understand me now? Previous Comments: [2009-12-28 03:47:57] ras...@php.net If you look at this more carefully, you will see that the server issues a redirect and as documented httprequest has the redirect option which sets how many redirects to follow set to 0. So, this is behaving exactly as it was intended and exactly as documented. [2009-12-28 03:41:03] thundix at web dot de Description: Request URL: http://google.de Response Body: "The site www.google.de/test.php doesn´t exists." Request URL: http://google.de/ => It works! Same problem have andychr17 at hotmail dot com See note here: http://de.php.net/manual/de/function.httprequest-construct.php Reproduce code: --- Try it with http://www.google.de and someone with http://www.google.de/ $r = new HttpRequest("http://www.google.de";, HTTP_METH_GET, array('timeout' => 5, 'useragent' => 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6', 'redirect' => 3) ); //Send request $r->send(); //Only for showing you the result echo $r->getResponseBody(); ?> Expected result: => See Description for more information Actual result: -- => See Description for more information -- Edit this bug report at http://bugs.php.net/?id=50587&edit=1
#50587 [Opn->Bgs]: The missing trailing slash on the url make an request error.
ID: 50587 Updated by: ras...@php.net Reported By: thundix at web dot de -Status: Open +Status: Bogus Bug Type: URL related Operating System: Windows PHP Version: 5.2.12 New Comment: If you look at this more carefully, you will see that the server issues a redirect and as documented httprequest has the redirect option which sets how many redirects to follow set to 0. So, this is behaving exactly as it was intended and exactly as documented. Previous Comments: [2009-12-28 03:41:03] thundix at web dot de Description: Request URL: http://google.de Response Body: "The site www.google.de/test.php doesn´t exists." Request URL: http://google.de/ => It works! Same problem have andychr17 at hotmail dot com See note here: http://de.php.net/manual/de/function.httprequest-construct.php Reproduce code: --- Try it with http://www.google.de and someone with http://www.google.de/ $r = new HttpRequest("http://www.google.de";, HTTP_METH_GET, array('timeout' => 5, 'useragent' => 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6', 'redirect' => 3) ); //Send request $r->send(); //Only for showing you the result echo $r->getResponseBody(); ?> Expected result: => See Description for more information Actual result: -- => See Description for more information -- Edit this bug report at http://bugs.php.net/?id=50587&edit=1
#50587 [NEW]: The missing trailing slash on the url make an request error.
From: thundix at web dot de Operating system: Windows PHP version: 5.2.12 PHP Bug Type: URL related Bug description: The missing trailing slash on the url make an request error. Description: Request URL: http://google.de Response Body: "The site www.google.de/test.php doesn´t exists." Request URL: http://google.de/ => It works! Same problem have andychr17 at hotmail dot com See note here: http://de.php.net/manual/de/function.httprequest-construct.php Reproduce code: --- Try it with http://www.google.de and someone with http://www.google.de/ $r = new HttpRequest("http://www.google.de";, HTTP_METH_GET, array('timeout' => 5, 'useragent' => 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6', 'redirect' => 3) ); //Send request $r->send(); //Only for showing you the result echo $r->getResponseBody(); ?> Expected result: => See Description for more information Actual result: -- => See Description for more information -- Edit bug report at http://bugs.php.net/?id=50587&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50587&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50587&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50587&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50587&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50587&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50587&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50587&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50587&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50587&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50587&r=support Expected behavior: http://bugs.php.net/fix.php?id=50587&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50587&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50587&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50587&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50587&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50587&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50587&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50587&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50587&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50587&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50587&r=mysqlcfg
#50356 [NoF->Bgs]: mysql_connect timeout / server reset when executing as module
ID: 50356 Updated by: ras...@php.net Reported By: monochromec at gmail dot com -Status: No Feedback +Status: Bogus Bug Type: MySQL related Operating System: Windows 7 PHP Version: 5.2.11 New Comment: Connect to 127.0.0.1 instead or fix your OS to provide an ipv4 address for "localhost" instead of just ::1 which is likely what you have right now. Previous Comments: [2009-12-27 21:03:15] j dot amend at gmail dot com Config: Windows 7 x64 Apache 2.2.14 x86 using php5_module PHP 5.3.1 thread safe x86 VC6 MySQL 5.1 x86 Doesn't work: mysql_errno(): 2002 mysql_error(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. This works: I'm thinking this has something to do with IPv6 (localhost is resolving to ::1 when I ping it). Clients like mysql's CLI (mysql -h localhost) connect without issues. [2009-12-09 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-12-06 12:49:24] jonathan at techcube dot net Same problem with 64bit windows 7. Sample code: http://sg.php.net/manual/en/mysql.examples-basic.php This would show the problem. As long as mysql_connect() is present, the problem would occur. [2009-12-01 21:10:07] paj...@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-12-01 21:02:12] monochromec at gmail dot com Description: When executing mysql_connect with 5.2.11 running as a module under Apache 2.2.14 on a Windows 7 platform, mysql_connect times out and the browser reports "connection reset" or similar depending on the used browser. This behaviour was first observed with phpMyAdmin 3.2.3 (file library/dbi/mysql.dbi.lib.php, line 38). When changing the invocation type from module to (f)cgi, the problem disappears. This behaviour is reproducible with 5.3.1 (vc6-x86). MySQL is version 5.1, client side 5.0.51a (as reported by phpinfo). Reproduce code: --- Cf. mysql.dbi.lib.php -- Edit this bug report at http://bugs.php.net/?id=50356&edit=1
#50586 [Opn->Fbk]: Greater than operator '>' causes script to drop out of PHP into HTML
ID: 50586 Updated by: ras...@php.net Reported By: mike at repartee dot co dot uk -Status: Open +Status: Feedback Bug Type: *Programming Data Structures Operating System: Windows 7 PHP Version: 5.3.2RC1 New Comment: I seriously doubt you are seeing what you think you are seeing. Try doing a view-source. I bet the entire script is there likely because you are using short tags and you have those disabled in your php.ini or you have messed up your configuration some other way. Previous Comments: [2009-12-27 23:59:09] mike at repartee dot co dot uk Description: I have an old PHP script embedded in a page that is mostly html that includes the expression: if ($number > "2") . This has been working fine up to now but having installed PHP 5.3.1 a few days ago (updated to 5.3.2 today) locally on my new Windows 7 PC, I find that when I run the web page containing the above bit of PHP, the PHP is terminated at the '>' ( as if it were '?>') so the rest of the PHP code appears as text in my browser. Previously I used an earlier version of PHP and the script still runs fine on our remote web-server running PHP 5.2.8 so this really seems to be related to version 5.3 However I cannot see any reported problems on this issue. The problem occurs with both Internet Explorer and Firefox so it is not a browser problem. I am running Apache 2.2.14 and MySQL 5.1.41. Reproduce code: --- Snippit as above: if ($number > "2") . Expected result: I would expect the '>' operator to work as 'greater than'. Actual result: -- The PHP is ended at the '>' character as if it is '?>'. The rest of the code just appears as ordinary text in the browser. -- Edit this bug report at http://bugs.php.net/?id=50586&edit=1
#50586 [NEW]: Greater than operator '>' causes script to drop out of PHP into HTML
From: mike at repartee dot co dot uk Operating system: Windows 7 PHP version: 5.3.2RC1 PHP Bug Type: *Programming Data Structures Bug description: Greater than operator '>' causes script to drop out of PHP into HTML Description: I have an old PHP script embedded in a page that is mostly html that includes the expression: if ($number > "2") . This has been working fine up to now but having installed PHP 5.3.1 a few days ago (updated to 5.3.2 today) locally on my new Windows 7 PC, I find that when I run the web page containing the above bit of PHP, the PHP is terminated at the '>' ( as if it were '?>') so the rest of the PHP code appears as text in my browser. Previously I used an earlier version of PHP and the script still runs fine on our remote web-server running PHP 5.2.8 so this really seems to be related to version 5.3 However I cannot see any reported problems on this issue. The problem occurs with both Internet Explorer and Firefox so it is not a browser problem. I am running Apache 2.2.14 and MySQL 5.1.41. Reproduce code: --- Snippit as above: if ($number > "2") . Expected result: I would expect the '>' operator to work as 'greater than'. Actual result: -- The PHP is ended at the '>' character as if it is '?>'. The rest of the code just appears as ordinary text in the browser. -- Edit bug report at http://bugs.php.net/?id=50586&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50586&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50586&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50586&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50586&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50586&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50586&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50586&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50586&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50586&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50586&r=support Expected behavior: http://bugs.php.net/fix.php?id=50586&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50586&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50586&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50586&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50586&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50586&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50586&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50586&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50586&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50586&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50586&r=mysqlcfg
#50356 [Com]: mysql_connect timeout / server reset when executing as module
ID: 50356 Comment by: j dot amend at gmail dot com Reported By: monochromec at gmail dot com Status: No Feedback Bug Type: MySQL related Operating System: Windows 7 PHP Version: 5.2.11 New Comment: Config: Windows 7 x64 Apache 2.2.14 x86 using php5_module PHP 5.3.1 thread safe x86 VC6 MySQL 5.1 x86 Doesn't work: mysql_errno(): 2002 mysql_error(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. This works: I'm thinking this has something to do with IPv6 (localhost is resolving to ::1 when I ping it). Clients like mysql's CLI (mysql -h localhost) connect without issues. Previous Comments: [2009-12-09 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-12-06 12:49:24] jonathan at techcube dot net Same problem with 64bit windows 7. Sample code: http://sg.php.net/manual/en/mysql.examples-basic.php This would show the problem. As long as mysql_connect() is present, the problem would occur. [2009-12-01 21:10:07] paj...@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-12-01 21:02:12] monochromec at gmail dot com Description: When executing mysql_connect with 5.2.11 running as a module under Apache 2.2.14 on a Windows 7 platform, mysql_connect times out and the browser reports "connection reset" or similar depending on the used browser. This behaviour was first observed with phpMyAdmin 3.2.3 (file library/dbi/mysql.dbi.lib.php, line 38). When changing the invocation type from module to (f)cgi, the problem disappears. This behaviour is reproducible with 5.3.1 (vc6-x86). MySQL is version 5.1, client side 5.0.51a (as reported by phpinfo). Reproduce code: --- Cf. mysql.dbi.lib.php -- Edit this bug report at http://bugs.php.net/?id=50356&edit=1
#47281 [Opn]: $php_errormsg is limited in size of characters
ID: 47281 User updated by: jeffersongranatto at mannesoft dot com dot br Reported By: jeffersongranatto at mannesoft dot com dot br Status: Open -Bug Type: Feature/Change Request +Bug Type: OCI8 related Operating System: Linux -PHP Version: 5.2.8 +PHP Version: 5.3.1 New Comment: Solution: In ext/oci8/oci8.c, change the value of the constant PHP_OCI_ERRBUF_LEN to 1024. It's the biggest message that Oracle can return. Previous Comments: [2009-02-02 18:08:54] jeffersongranatto at mannesoft dot com dot br Description: Sometimes, I need to show a big error message on a trigger of Oracle. Oracle supports this type of situation, but $php_errormsg does not display more than 500 characters. Reproduce code: --- create procedure sp_test as begin raise_application_error(-2, 'more than 500 characters'); end; $stmt = ociparse($conn, 'begin sp_test; end;'); ociexecute($stmt, OCI_DEFAULT); echo $php_errormsg; Expected result: The full message. Actual result: -- The message truncated to 500 characters. -- Edit this bug report at http://bugs.php.net/?id=47281&edit=1
#46017 [Opn->WFx]: Make C-Like Macros for PHP
ID: 46017 Updated by: paj...@php.net Reported By: ben at umingo dot de -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: Windows PHP Version: 5.2.6 New Comment: See the previous reports for the (good) reasons not to implement macros. Previous Comments: [2009-12-27 08:01:17] john2496 at gmail dot com I agree, php needs macros. There is no way to represent a set of function calls that need to be made within the local scope. I'd need to use the following line of code every time I wanted to merge variables to the local scope. extract(array_merge_recursive(get_defined_vars(), $anArray))); instead of.. extract_recursive($anArray); [2008-09-07 13:50:01] ben at umingo dot de Description: Hello people, i want to ask you for macros for PHP. Main purpose is to switch projects between testing, developing and production state without performance penalties. All these runtime if's could be skipped and that is jsut one example. It just gives you some more options I really miss macros from C and C++ days ... another useful example is for logging, I dont want to write a __LINE__ and __FILE__ everytime i log something. It would be much nicer to use a macro that will expand my logfunction with these parameters before compiling ... you know what i mean The bigger the project the bigger the effect of compiling times and execution times ... This could really be a speedup and at all nobody is forced to use macros. (in case php scripts are cached and precompiled) Reproduce code: --- //projectstate //0 testing //1 developing //2 production #define projectstate = 0 //some code ... #if projectstate == 0 //write some log, some output or whatever } #endif //some other code Expected result: With macros, the code would be just //some code ... //some other code... Actual result: -- Without macros, the code would be //some code //an if-querry for projectstate //some hundred lines of code to parse and evaluate //endif //some other code -- Edit this bug report at http://bugs.php.net/?id=46017&edit=1
#50585 [NEW]: infinite recursive call in ob_011.phpt crashes solaris
From: michael at schmidt2 dot de Operating system: Solaris 10, sparc PHP version: 5.3.1 PHP Bug Type: Reproducible crash Bug description: infinite recursive call in ob_011.phpt crashes solaris Description: When you call : make test TESTS=./tests/output/ob_011.phpt The system crashes within 10 seconds. (CPU usage goes to 100% and system freezes in about 10 seconds. No ping. Console access is dead too.) see also bug: 49292 Reproduce code: --- tests/output/ob_011.phpt Expected result: PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 745 root 326M 317M run 100 0:00:08 100% php/1 -- Edit bug report at http://bugs.php.net/?id=50585&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50585&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50585&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50585&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50585&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50585&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50585&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50585&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50585&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50585&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50585&r=support Expected behavior: http://bugs.php.net/fix.php?id=50585&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50585&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50585&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50585&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50585&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50585&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50585&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50585&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50585&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50585&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50585&r=mysqlcfg
#49292 [Com]: infinite recursive call in ob_011.phpt
ID: 49292 Comment by: michael at schmidt2 dot de Reported By: dmendo...@php.net Status: No Feedback Bug Type: Output Control Operating System: Linux PHP Version: 5.2.11RC1 New Comment: I'm running Solaris 10. On that system it's worse ! Whole system freezes. You cannot be serious to let THIS happen. Please remove this test. balrog.# php -v PHP 5.3.1 (cli) (built: Dec 27 2009 12:23:33) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies balrog.# uname -a SunOS balrog 5.10 Generic_139555-08 sun4u sparc SUNW,UltraSPARC-IIi- cEngine Previous Comments: [2009-09-25 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-09-20 09:36:19] PromyLOPh at lavabit dot com Snapshot (php5.2-200909200830) still crashes. Valgrind report: $ valgrind ./sapi/cli/php tests/output/ob_011.phpt ==2561== Memcheck, a memory error detector. ==2561== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==2561== Using LibVEX rev 1854, a library for dynamic binary translation. ==2561== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==2561== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework. ==2561== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==2561== For more details, rerun with: -v ==2561== --TEST-- output buffering - fatalism --XFAIL-- This test will fail until the fix in version 1.178 of ext/main/output.c is backported from php 6 --FILE-- ==2561== Stack overflow in thread 1: can't grow stack to 0x7FE801FD8 ==2561== ==2561== Process terminating with default action of signal 11 (SIGSEGV) ==2561== Access not within mapped region at address 0x7FE801FD8 ==2561==at 0x720CA2: ZEND_RECV_SPEC_HANDLER (zend_execute.c:276) ==2561== Stack overflow in thread 1: can't grow stack to 0x7FE801FD0 ==2561== ==2561== Process terminating with default action of signal 11 (SIGSEGV) ==2561== Access not within mapped region at address 0x7FE801FD0 ==2561==at 0x4A1D310: _vgnU_freeres (vg_preloaded.c:56) ==2561== ==2561== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from 3) ==2561== malloc/free: in use at exit: 8,537,327 bytes in 14,555 blocks. ==2561== malloc/free: 15,101 allocs, 546 frees, 9,428,515 bytes allocated. ==2561== For counts of detected errors, rerun with: -v ==2561== searching for pointers to 14,555 not-freed blocks. ==2561== checked 12,431,728 bytes. ==2561== ==2561== LEAK SUMMARY: ==2561==definitely lost: 0 bytes in 0 blocks. ==2561== possibly lost: 0 bytes in 0 blocks. ==2561==still reachable: 8,537,327 bytes in 14,555 blocks. ==2561== suppressed: 0 bytes in 0 blocks. ==2561== Rerun with --leak-check=full to see details of leaked memory. Speicherzugriffsfehler Configure args: $ ./configure --with-config-file-path=/home/www-data/conf --prefix=/home/promyloph/testenv/php --without-openssl --with-curl=/usr --without-pear --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --with-gettext=/usr --with-mcrypt --with-mysql=/usr/local/mysql --with-mysqli --with-pdo-mysql=/usr/local/mysql --with-zlib=/usr --with-bz2=/usr --disable-ipv6 --enable-cli --disable-safe-mode --enable-exif --enable-libxml --with-libxml-dir=/usr --enable-session --enable-magic-quotes --disable-sigchild --enable-mbstring --enable-gd-jis-conv --enable-gd-native-ttf --enable-fastcgi --enable-force-cgi-redirect --disable-debug --with-pcre-regex=/usr --disable-posix $ uname -a Linux * 2.6.26-2-amd64 #1 SMP Wed Aug 19 22:33:18 UTC 2009 x86_64 GNU/Linux $ gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.3.2 (Debian 4.3.2-1.1) [2009-09-17 15:44:05] j...@php.net Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ And if it still crashes, provide the full configure line you used. --
#46017 [Com]: Make C-Like Macros for PHP
ID: 46017 Comment by: john2496 at gmail dot com Reported By: ben at umingo dot de Status: Open Bug Type: Feature/Change Request Operating System: Windows PHP Version: 5.2.6 New Comment: I agree, php needs macros. There is no way to represent a set of function calls that need to be made within the local scope. I'd need to use the following line of code every time I wanted to merge variables to the local scope. extract(array_merge_recursive(get_defined_vars(), $anArray))); instead of.. extract_recursive($anArray); Previous Comments: [2008-09-07 13:50:01] ben at umingo dot de Description: Hello people, i want to ask you for macros for PHP. Main purpose is to switch projects between testing, developing and production state without performance penalties. All these runtime if's could be skipped and that is jsut one example. It just gives you some more options I really miss macros from C and C++ days ... another useful example is for logging, I dont want to write a __LINE__ and __FILE__ everytime i log something. It would be much nicer to use a macro that will expand my logfunction with these parameters before compiling ... you know what i mean The bigger the project the bigger the effect of compiling times and execution times ... This could really be a speedup and at all nobody is forced to use macros. (in case php scripts are cached and precompiled) Reproduce code: --- //projectstate //0 testing //1 developing //2 production #define projectstate = 0 //some code ... #if projectstate == 0 //write some log, some output or whatever } #endif //some other code Expected result: With macros, the code would be just //some code ... //some other code... Actual result: -- Without macros, the code would be //some code //an if-querry for projectstate //some hundred lines of code to parse and evaluate //endif //some other code -- Edit this bug report at http://bugs.php.net/?id=46017&edit=1