By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,665 Members | 1,952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,665 IT Pros & Developers. It's quick & easy.

Problem running Curl

P: n/a
Bib
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?

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Bib <bi*@soreo.com> wrote:
Fatal error: Call to undefined function: curl_init() in
/usr/local/apache/htdocs/CHECK.php on line 6. 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?


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

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.