Jump to content

undefined function curl_init()


mcHenry

Recommended Posts

I am trying to use curl however am not having any success with a CLI script.
Fatal error: Call to undefined function: curl_init() in
C:\PHP4\cli\processweb.php on line 65


Windows XP
PHP 4.4.2

php info shows:
CURL support enabled
CURL Information libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3


Any help would be greatly appreciated.

Thanks in advance...
Link to comment
Share on other sites

[!--quoteo(post=375603:date=May 20 2006, 07:31 PM:name=mcHenry)--][div class=\'quotetop\']QUOTE(mcHenry @ May 20 2006, 07:31 PM) [snapback]375603[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I am trying to use curl however am not having any success with a CLI script.
Fatal error: Call to undefined function: curl_init() in
C:\PHP4\cli\processweb.php on line 65
Windows XP
PHP 4.4.2

php info shows:
CURL support enabled
CURL Information libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3
Any help would be greatly appreciated.

Thanks in advance...
[/quote]
Hi,
I googled the following error "Fatal error: Call to undefined function: curl_init()" and got this web address back.
This might be of some use to you.
[a href=\"http://www.tonyspencer.com/mt/archives/2003/10/curl_with_php_a.htm\" target=\"_blank\"]http://www.tonyspencer.com/mt/archives/200..._with_php_a.htm[/a]
Let me know if this works.
If not let me know i have same setup as you and it is working for me.
Can you also post your code so i can have look.

Thanks
Link to comment
Share on other sites

[!--quoteo(post=375606:date=May 21 2006, 08:42 AM:name=test006)--][div class=\'quotetop\']QUOTE(test006 @ May 21 2006, 08:42 AM) [snapback]375606[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi,
I googled the following error "Fatal error: Call to undefined function: curl_init()" and got this web address back.
This might be of some use to you.
[a href=\"http://www.tonyspencer.com/mt/archives/2003/10/curl_with_php_a.htm\" target=\"_blank\"]http://www.tonyspencer.com/mt/archives/200..._with_php_a.htm[/a]
Let me know if this works.
If not let me know i have same setup as you and it is working for me.
Can you also post your code so i can have look.

Thanks
[/quote]

Thanks for the help...

I am working through the url you provided slowly...
I had guessed that as php_info() shows the curl module as loaded then this would have confirmed the config as being correct ?

I am executing a simple script using the command line:

C:\PHP4\cli>php testcurl.php

Fatal error: Call to undefined function: curl_init() in C:\PHP4\cli\testcurl.php on line 3

C:\PHP4\cli>


The code is simply:

<?php
$url="http://wwww.yahoo.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec ($ch);
curl_close ($ch);
?>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.