curl-and-php
Re: Building PHP 4.3.x fails for Curl 7.11.1
Date: Fri, 26 Mar 2004 12:37:15 +0100 (CET)
On Fri, 26 Mar 2004, Vladimir Brajovic wrote:
> Compiling ext/curl/curl.c fails because struct HttpPost is not declared. The
> Curl change log indicates that '#define HttpPost curl_httppost' has been
> removed from header file. However this seems to be causing this particular
> problem since PHP still refers to HttpPost structure. By adding '#define
> HttpPost curl_httppost' into curl.h, or by changing all references to
> HttpPost in curl.c, I was able to eliminate this problem.
The official API has been using curl_httppost for more than 2 years. I
consider that enough time for everyone to move over.
This change was also available in daily snapshots and the 7.11.1 pre-release
in good time before the public release was made which should've given everyone
who cared enough to test it.
Not a single soul identified this as a problem before release.
So, now everyone need to patch their *PHP source code*. The correct fix is to
rename the structs in the PHP source code (or add the define in there). It is
not to put back the define in the curl header. IMHO.
> I am stuck with this problem. This is what I am getting on compiling
> ext/curl/curl.c (PHP-4.3.4):
>
> /usr/local/src/php-4.3.4/ext/curl/curl.c: In function `zif_curl_setopt':
> /usr/local/src/php-4.3.4/ext/curl/curl.c:838: duplicate case value
> /usr/local/src/php-4.3.4/ext/curl/curl.c:695: this is the first entry for
> that value
CURLOPT_PASSWDFUNCTION is obsolete and is defined to 0 now, and so is a few
other obsolete options and since this code does a switch() on them two uses of
obsolete options in the switch causes this compiler error.
> Any idea how to fix this? Is there an older curl version that will not show
> these problems with PHP-4.3.4?
The problems here are with PHP not being up-to-date with libcurl's latest and
greatest.
Yes, you can downgrade libcurl and use an inferior version and most likely
work around these problems.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-03-26