summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-09-18 16:11:50 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-09-18 16:11:50 +0000
commitc8a5e8fa7a11123afac3c3955777e2a044794dda (patch)
treef418a3b850054b8ebbd52dd67220cc703d170b1d
parent8982cc04724bec2acaccd0553097c52523852f44 (diff)
downloadphp-git-c8a5e8fa7a11123afac3c3955777e2a044794dda.tar.gz
Fixed bug #38574 (missing curl constants and improper constant detection).
-rw-r--r--NEWS2
-rw-r--r--ext/curl/interface.c21
2 files changed, 15 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 17d594b713..2d02f118f1 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP NEWS
?? Sep 2006, PHP 5.2.0
- Fixed bug #38844 (curl_easy_strerror() is defined only since cURL 7.12.0).
(Tony)
+- Fixed bug #38574 (missing curl constants and improper constant detection).
+ (Ilia)
14 Sep 2006, PHP 5.2.0RC4
- Added DSA key generation support to openssl_pkey_new(), FR #38731
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 008f8ad1e6..a1fe485ed3 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -563,15 +563,9 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLE_SSL_CIPHER);
REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
-#ifdef CURLE_LDAP_INVALID_URL
REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
-#endif
-#ifdef CURLE_FILESIZE_EXCEEDED
REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
-#endif
-#ifdef CURLE_FTP_SSL_FAILED
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
-#endif
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);
@@ -593,13 +587,21 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLMSG_DONE);
-#ifdef CURLOPT_FTPSSLAUTH
+#if LIBCURL_VERSION_NUM >= 0x070c02
REGISTER_CURL_CONSTANT(CURLOPT_FTPSSLAUTH);
REGISTER_CURL_CONSTANT(CURLFTPAUTH_DEFAULT);
REGISTER_CURL_CONSTANT(CURLFTPAUTH_SSL);
REGISTER_CURL_CONSTANT(CURLFTPAUTH_TLS);
#endif
+#if LIBCURL_VERSION_NUM > 0x070b00
+ REGISTER_CURL_CONSTANT(CURLOPT_FTP_SSL);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_NONE);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_TRY);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_CONTROL);
+ REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
+#endif
+
#ifdef PHP_CURL_NEED_OPENSSL_TSL
{
int i, c = CRYPTO_num_locks();
@@ -1240,9 +1242,12 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
case CURLOPT_PROXYAUTH:
#endif
-#ifdef CURLOPT_FTPSSLAUTH
+#if LIBCURL_VERSION_NUM >= 0x070c02
case CURLOPT_FTPSSLAUTH:
#endif
+#if LIBCURL_VERSION_NUM > 0x070b00
+ case CURLOPT_FTP_SSL:
+#endif
case CURLOPT_UNRESTRICTED_AUTH:
case CURLOPT_PORT:
case CURLOPT_AUTOREFERER: