cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: Curl & PHP install problem...

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 22 Feb 2002 12:56:11 +0100 (MET)

On Fri, 22 Feb 2002, Michael Mussulis wrote:

Please don't address me personally, use the mailing list. I CC this reply
back to the list.

> It's not likely to be php_curl.so, the naming convention from what I can
> gather is: "php_[xyz].dll" for Win32, and "[xyz].o or .so" for unix
> systems.

I was hoping someone on the list could confirm the assumption or tell me I'm
wrong.

I'm not good at PHP details and I'm not 100% sure of what follows here.

Remember that the [xyz] is *not* "libcurl" for the PHP curl module. It's
'curl' short and simple.

> And as far as I can understand it, PHP needs the .so or .o library for
> specified in the .ini file for the physical code base itself.

PHP needs the .so or .o library that contains the PHP module for the
particular feature you want to enable. libcurl.so is not a PHP module.

> This is in my fact is my problem (and confusion), because according to
> php.net the process of of setting this up as of PHP 4.0.2 onwards is
> straight forward, i.e. 1) Install PHP with built in function definitions of
> curl (similar to compiling with "--with curl" but not needed as of v4.0.2
> onwards)

That is not true. You must use --with-curl. Since PHP 4.0.2, that works, and
before that it wasn't available.

> 2) Install Libcurl (which should place libcurl.so the extensions directory
> and other relvant files accordingly,

You really should build and install libcurl first, so that you can point to
the resulting library with --with-curl afterwards.

> 3) restart Apache
> 4) Use phpinfo() to see if curl is being recognized.

Right.

> I am very reluctant to accept that PHP needs compiling in order to enable
> curl support as of version 4.0.2 onwards, in the same way it doesn't need
> compiling when enabling MySQL, Postgress, Interbase, GD support, etc. But
> so far no one can confirm this to be correct.

It does. The curl support is not (fully) integrated in the default PHP
archive. You can't build for curl module support without having libcurl
installed.

I hope this helps.

Again, I am not fluent in PHP nor in PHP config details. Please keep in mind
that libcurl is a file transfer library with *13* different language bindings
and interfaces. PHP is one of them.

--
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-02-22