cURL / Mailing Lists / curl-library / Single Mail


Problem using curl in a Apache module

From: Juanjo C <>
Date: Wed, 27 Mar 2013 10:53:09 +0100


I'm trying to do a Apache module in C and in this module I'm using curl.
With APXS, I can to deploy the module into Apache, but when I try to
restart Apache, it shows me this error. "undefined symbol:
curl_easy_perform. Action 'configtest' failed."

The module is trivial... only a example of how to made a connection via
HTTP from a Apache module to a URL.

        CURL *curl;
CURLcode res;

curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "

/* is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);

/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);

/* Check for errors */
if(res != CURLE_OK) {
ap_rprintf(r, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
} else {
ap_rputs("<br/>OOOOOOOOOKKKKKKKKKKKKK.", r);

/* always cleanup */

The module works fine when I don't put anything about curl, but when I
include the code that does reference to curl, the Apache server don't
restart and it shows the error.


List admin:
Received on 2013-03-27