When installing drupal on my server I kept getting the error:

Use of undefined constant CURLPROTO_HTTPS

It was because that constant was introduced in curl 7.19.4. As my host refused to update the library the fix was to comment out the two offending lines in shorten.module (lines 443 and 447)

        curl_setopt($c, CURLOPT_PORT, isset($uri['port']) ? $uri['port'] : 80);
        // curl_setopt($c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP); inconmpatible line
      }
      elseif ($uri['scheme'] == 'https') {
        curl_setopt($c, CURLOPT_PORT, isset($uri['port']) ? $uri['port'] : 443);
        // curl_setopt($c, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS); incompatible line

I'm not sure if that counts as a bug but I hope it can be either taken into account or at least be useful for other people with the same problem.

Comments

icecreamyou’s picture

Status: Active » Fixed

Committed fix to dev. You're right, those two lines aren't required.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.