From:             290762903 at qq dot com
Operating system: windows7
PHP version:      5.3.14
Package:          Windows Installer
Bug Type:         Bug
Bug description:curl localhost return false

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 bug report at https://bugs.php.net/bug.php?id=62527&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=62527&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=62527&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=62527&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=62527&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62527&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=62527&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=62527&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=62527&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=62527&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=62527&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=62527&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=62527&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=62527&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=62527&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=62527&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62527&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=62527&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=62527&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=62527&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=62527&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=62527&r=mysqlcfg

Reply via email to