ID:               47717
 User updated by:  ray_kimsey at ncsu dot edu
 Reported By:      ray_kimsey at ncsu dot edu
-Status:           Feedback
+Status:           Open
 Bug Type:         cURL related
 Operating System: RHEL 5.3
 PHP Version:      5.2CVS-2009-03-18
 Assigned To:      fb-req-jani
 New Comment:

Well PHP 5.2.6 works with older and newer versions of Curl. (see
orignal description of problem). 

There appears to be something that was implemented in newer versions of
PHP (later than 5.2.6) that is causing a problem.  My guess would be
something new (such as COPYPOSTFIELDS) implemented in recent versions of
Curl that newer versions of PHP are trying to use.


Previous Comments:
------------------------------------------------------------------------

[2009-04-01 11:42:14] j...@php.net

If it works with older Curl version but not the new one, how is this 
PHP bug?

------------------------------------------------------------------------

[2009-03-20 14:55:56] codeslinger at compsalot dot com

in bug #47616  the problem turned out to be incorrect passing of the
parameters.  This bug may be related.

------------------------------------------------------------------------

[2009-03-19 13:28:19] ray_kimsey at ncsu dot edu

Description:
------------
Compiled current production PHP 5.2.9 (and with CVS version
php5.2-200903181530) with Curl 7.19.4 (x86_64) using code below fails:

Compiled PHP 5.2.6 against Curl 7.19.4 works as expected.

Compiled php5.2-200903181530 compiled against RHEL curl 7.15.5 (x86_64)
works as expected.

Reproduce code:
---------------
<?php

$ch = curl_init();
//curl_setopt($ch, CURLOPT_URL, 'http://www.google.com/');
curl_setopt($ch, CURLOPT_URL, 'http://newton.ces.ncsu.edu/');
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

if (curl_exec($ch) === false) {
        echo 'Curl error: ' . curl_error($ch) . "\n";
}
curl_close($ch);
?>




Expected result:
----------------
$ php t.php
* About to connect() to newton.ces.ncsu.edu port 80
*   Trying 152.1.215.211... * connected
* Connected to newton.ces.ncsu.edu (152.1.215.211) port 80
> GET / HTTP/1.1
Host: newton.ces.ncsu.edu
Accept: */*

< HTTP/1.1 200 OK
< Date: Thu, 19 Mar 2009 13:20:25 GMT
< Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8j DAV/2
PHP/5.2.10-dev SVN/1.5.4
< Last-Modified: Mon, 23 Jan 2006 12:53:15 GMT
< ETag: "10486c8-3d-40b061d3ba4c0"
< Accept-Ranges: bytes
< Content-Length: 61
< Content-Type: text/html
* Connection #0 to host newton.ces.ncsu.edu left intact
* Closing connection #0


Actual result:
--------------
$php t.php
* <url> malformed
Curl error: <url> malformed


if you exchange newton.ces.ncsu.edu with www.google.com you get:

php t.php
* Input domain encoded as `UTF-8'
* getaddrinfo(3) failed for xn--6l4d:80
* Couldn't resolve host ?'
* Closing connection #0
Curl error: Couldn't resolve host ?'



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47717&edit=1

Reply via email to