cURL / Mailing Lists / curl-library / Single Mail

curl-library

php/libcurl installed, undefined function curl_init

From: John <john_at_hsource.net>
Date: Thu, 20 May 2004 13:25:54 -0400

Hello,

Let me apologize for the length of this email. From past experience, I
found it better to overexplain a problem than underexplain. Also,
thanks in advance for any assistance you can provide.

We are migrating to a freebsd system installed almost primarily via
ports (for simplicity and upgradeability). I discovered that the php
install did not have libcurl, so I went to add this much needed
functionality.

By default port, php is compiled like this:
./configure --enable-versioning --enable-memory-limit --with-layout=GNU
--with-zlib-dir=/usr --disable-all --with-regex=php
--with-apxs2=/usr/local/sbin/apxs --enable-ctype --with-mysql=/usr/local
--enable-overload --with-pcre-regex=yes --enable-posix --enable-session
--enable-tokenizer --enable-xml --with-expat-dir=/usr/local
--with-zlib=yes --prefix=/usr/local i386-portbld-freebsd4.9

I upgraded from the php-port (4.3.3) to php 4.6.6 via source.

I downloaded curl-7.11.2 and compiled it with standard:
./configure
make
make test # all 100% passed btw
sudo make install

This picked up on my ssl libraries, created the curl and curl-config,
and placed libcurl.* files in /usr/local/lib

-bash-2.05b$ curl-config --libs
-L/usr/local/lib -lcurl -lssl -lcrypto -lz

The curl cli binary allows me to retrieve http & https urls.

So far everything looks good.

So, I go into the php source directory and do this:

./configure --enable-curl --enable-versioning --enable-memory-limit
--with-layout=GNU --with-zlib-dir=/usr --disable-all --with-regex=php
--with-apxs2=/usr/local/sbin/apxs --enable-ctype --with-mysql=/usr/local
--enable-overload --with-pcre-regex=yes --enable-posix --enable-session
--enable-tokenizer --enable-xml --with-expat-dir=/usr/local
--with-zlib=yes --prefix=/usr/local i386-portbld-freebsd4.9

Note: I have tried this with --enable-curl=/usr/local/lib as well with
the same results.

In both cases, php compiles without errors and when I restart apache, it
shows the php 4.3.6 installed. phpinfo does NOT return a curl section.

 From either the web page or a command line, any script I write with
"$whatever = curl_init();" returns "Fatal error: Call to undefined
function: curl_init() in ...".

Just to go a bit extra, I ran /sbin/ldconfig (a throwback to when I
dealt with redhat linux) and recompiled php (making sure to start with a
fresh source directory for good measure). I still have the same problem.

As far as I can tell from my searching, I am in a league of my own with
this problem, so any help anyone can provide me will be much appreciated.

Thanks,
John
Received on 2004-05-20