Edit report at https://bugs.php.net/bug.php?id=62527&edit=1

 ID:                 62527
 Updated by:         larue...@php.net
 Reported by:        290762903 at qq dot com
 Summary:            curl localhost return false
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Windows Installer
 Operating System:   windows7
 PHP Version:        5.3.14
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

(seems you are a chinese, judged from your mail address)
检查你的system32/drivers/etc/hosts, 看看你的localhost alias到什么ip, 
然后看看你的nginx监
听的是什么address

这个不属于PHP的问题, 应该是你hosts的问题.


Previous Comments:
------------------------------------------------------------------------
[2012-07-11 06:21:13] 290762903 at qq dot com

Description:
------------
the devlop env :
windows7 x64
nginx 1.2.2 for windows
php5.3.6 MSVC9 (Visual C++ 2008)
-------------------------------------------
1.php script below "Test script"

when $url is 'http://www.baidu.com/' , it return source baidu.com .
when $url is 'http://localhost/2.php' , it return false! the script of 2.php 
only is:<?php echo time();?>

i thought localhost php-cgi has problem, but when i run http://localhost/1.php 
from another pc,and $url set be 'http://192.168.1.200/2.php' , it return 
1339022206 the true time. (192.168.1.200 is my ipaddress) .

i have no idea to see, when i use apache and php, no problem,but nginx has it.


Test script:
---------------
$url = 'http://www.baidu.com';
$curlHandle = curl_init();
curl_setopt( $curlHandle , CURLOPT_URL , $url ); 
curl_setopt( $curlHandle , CURLOPT_RETURNTRANSFER , true ); 
curl_setopt( $curlHandle , CURLOPT_SSL_VERIFYPEER, false);
curl_setopt( $curlHandle , CURLOPT_TIMEOUT, 10 ); 
curl_setopt( $curlHandle , CURLOPT_FRESH_CONNECT ,true); 
var_dump( curl_exec($curlHandle) );
curl_close($curlHandle);

Expected result:
----------------
the devlop env :
windows7 x64
nginx 1.2.2 for windows
php5.3.6 MSVC9 (Visual C++ 2008)
-------------------------------------------
1.php script below "Test script"

when $url is 'http://www.baidu.com/' , it return source baidu.com .
when $url is 'http://localhost/2.php' , it return false! the script of 2.php 
only is:<?php echo time();?>

i thought localhost php-cgi has problem, but when i run http://localhost/1.php 
from another pc,and $url set be 'http://192.168.1.200/2.php' , it return 
1339022206 the true time. (192.168.1.200 is my ipaddress) .

i have no idea to see, when i use apache and php, no problem,but nginx has it.




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



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

Reply via email to