Problem running Curl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bib

    Problem running Curl

    I'm working on a box that allegedly has curl support, but when I run a
    script that access curl, I get this error:

    Fatal error: Call to undefined function: curl_init() in
    /usr/local/apache/htdocs/CHECK.php on line 6.


    Line 6 is:
    $ch = curl_init();

    Now this script works fine on my development box, but not the
    production environment. At first I thought PHP was not compiled with
    curl support, but looking at a phpinfo shows me:

    '--with-curl=shared,/usr/local'

    on the box. The "box" is also a virtual "server" at a hosting
    company, so I may not have a lot of lattitude in recompiling php,
    etc.. Does this look like curl support is compiled in but somehow
    not working, or needs a parameter in the php.ini or something?

    Any ideas, anyone?





  • Daniel Tryba

    #2
    Re: Problem running Curl

    Bib <bib@soreo.co m> wrote:[color=blue]
    > Fatal error: Call to undefined function: curl_init() in
    > /usr/local/apache/htdocs/CHECK.php on line 6.[/color]
    [color=blue]
    > At first I thought PHP was not compiled with
    > curl support, but looking at a phpinfo shows me:
    >
    > '--with-curl=shared,/usr/local'
    >
    > on the box. The "box" is also a virtual "server" at a hosting
    > company, so I may not have a lot of lattitude in recompiling php,
    > etc.. Does this look like curl support is compiled in but somehow
    > not working, or needs a parameter in the php.ini or something?
    >
    > Any ideas, anyone?[/color]

    Curl support isn't build _into_ that PHP, is compiled as a module. All
    you need to do is include the curl module (propably called curl.so),
    you'll need to either enable it in php.ini or load it with dl()

    --

    Daniel Tryba

    Comment

    Working...