#47717 [NEW]: PHP / Curl issue
| From: | ray_kimsey at ncsu dot edu | Date: | Thu, 19 Mar 2009 13:28:19 +0000 |
| Subject: | #47717 [NEW]: PHP / Curl issue | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-134901@lists.php.net to get a copy of this message | ||
From: ray_kimsey at ncsu dot edu
Operating system: RHEL 5.3
PHP version: 5.2.9
PHP Bug Type: *General Issues
Bug description: PHP / Curl issue
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 bug report at http://bugs.php.net/?id=47717&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47717&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47717&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47717&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47717&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47717&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47717&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47717&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47717&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47717&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47717&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47717&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47717&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47717&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47717&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47717&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47717&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47717&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47717&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47717&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47717&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47717&r=mysqlcfg