From:             kf at sumptuouscapital dot com
Operating system: GNU/Linux
PHP version:      5.4.8
Package:          HTTP related
Bug Type:         Feature/Change Request
Bug description:CURLOPT_RESOLVE not defined

Description:
------------
Since curl 7.21.3 curl_easy_setopt has an option CURLOPT_RESOLVE [0]. Using
this option from within PHP results in the following NOTICE and WARNING.
Usage of this functionality is necessary for proper Sever Name Indication
for verifying CA Certs in certain scenarios. The actual functionality
presented by this option seems to work despite the notice and warning. 

The notice is: 

PHP Notice:  Use of undefined constant CURLOPT_RESOLVE - assumed
'CURLOPT_RESOLVE' in
/var/www/localhost/htdocs/status-srv/sks_get_peer_data.php on line 351

This Notice can be removed by explicitly setting a string rather than using
it as a constant, however, the following Warning is still presented in both
scenarios: 

Warning: curl_setopt() expects parameter 2 to be long, string given in
/var/www/localhost/htdocs/status-srv/sks_get_peer_data.php on line 351

[0] http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

Test script:
---------------
<?php
// Minimum working example to produce the reported behavior
$ch = curl_init("https://www.google.com:80/";);
curl_setopt($ch, CURLOPT_RESOLVE, "google.com:80:173.194.32.5");
curl_exec($ch);
?>

Expected result:
----------------
No warning

Actual result:
--------------
works, but with notice and warning output. 

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

Reply via email to