mcHenry Posted May 21, 2006 Share Posted May 21, 2006 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 65Windows XPPHP 4.4.2php info shows: CURL support enabled CURL Information libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3Any help would be greatly appreciated.Thanks in advance... Link to comment https://forums.phpfreaks.com/topic/10090-undefined-function-curl_init/ Share on other sites More sharing options...
test006 Posted May 21, 2006 Share Posted May 21, 2006 [!--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 65Windows XPPHP 4.4.2php info shows: CURL support enabled CURL Information libcurl/7.14.0 OpenSSL/0.9.8a zlib/1.2.3Any 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 https://forums.phpfreaks.com/topic/10090-undefined-function-curl_init/#findComment-37529 Share on other sites More sharing options...
mcHenry Posted May 21, 2006 Author Share Posted May 21, 2006 [!--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.phpFatal error: Call to undefined function: curl_init() in C:\PHP4\cli\testcurl.php on line 3C:\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 https://forums.phpfreaks.com/topic/10090-undefined-function-curl_init/#findComment-37576 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.