Linux Php Fatal Error Call To Undefined Function Curl_init
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow php fatal error call to undefined function curl_init() ubuntu the company Business Learn more about hiring developers or posting ads with us Stack
Call To Undefined Function Curl_init() Windows
Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of call to undefined function curl_init() in codeigniter 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function curl_init() in … on line 9 up vote 36 down vote favorite
Call To Undefined Function Curl_init() Wamp
8 base64_encode($data), 'key' => IMGUR_API_KEY); $timeout = 30; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'http://api.imgur.com/2/upload.xml'); curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $pvars); $xml = curl_exec($curl); curl_close ($curl); var_dump($xml); ?> I'm playing with the Imgur API, but it doesn't seems to work. PHP.net says that curl_init() is in call to undefined function curl_init() linux PHP5, but my host says it isn't. How can I make this work? php linux ubuntu curl debian share|improve this question edited Nov 3 '14 at 21:04 austin 4,65611835 asked Dec 9 '10 at 9:44 Thew 4,777153783 add a comment| 6 Answers 6 active oldest votes up vote 30 down vote accepted curl is an extension that needs to be installed, it's got nothing to do with the PHP version. http://www.php.net/manual/en/curl.setup.php share|improve this answer answered Dec 9 '10 at 9:46 fire 12.6k104695 +1 And if you can't install the curl extension, you can try using shell_exec (or similar) with the curl command. Or you can probably "fake it" with fsockopen. –bogeymin Dec 9 '10 at 11:54 2 That page doesn't say a word about HOW TO install the extension. Any better resources? –matteo Oct 21 '14 at 12:01 add a comment| up vote 89 down vote On current versions of Debian and Ubuntu, you can likely solve this by installing the Curl extension for PHP, and restarting the webserver. Assuming the webserver is Apache 2: sudo apt-get install php5-curl sudo service apache2 restart It's possible you'll need to install more: sudo apt-get install curl libcurl3 libcurl3-dev; share|improve this answer edited Oct 17 '13 at 12:38 Amol M Kulkarni 7,6941270130 answered Nov 20
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about
Call To Undefined Function Curl_init() In Php
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Php7 Curl_init
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each what is curl_init() in php other. Join them; it only takes a minute: Sign up Call to undefined function curl_init().? [duplicate] up vote 165 down vote favorite 23 Possible Duplicate: curl_init() function not working When i am going to implement Authorize.net payment gateway. However, http://stackoverflow.com/questions/4396779/fatal-error-call-to-undefined-function-curl-init-in-on-line-9 I got this error: Call to undefined function curl_init() Please let me know what is wrong in it. php curl share|improve this question edited Jan 23 '14 at 18:52 aksu 3,94451434 asked Jun 17 '11 at 7:15 Pramod 3,61051948 marked as duplicate by cwallenpoole, marc_s, codingbadger, Roddy, Graviton Jun 17 '11 at 9:15 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. http://stackoverflow.com/questions/6382539/call-to-undefined-function-curl-init 3 You don't have curl support in your PHP. This question has been asked many times here –Shef Jun 17 '11 at 7:20 @Shef , Why are you linking back to this thread? –Pacerier Jul 16 '15 at 10:35 @Pacerier Please, double verify, because I am quite certain I am linking to a search page and not this "thread". –Shef Jul 16 '15 at 10:37 add a comment| 3 Answers 3 active oldest votes up vote 380 down vote accepted Go to your php.ini file and remove the ; mark from the beginning of the following line: ;extension=php_curl.dll ubuntu 13.0 and above, simply use the debundled package. In a terminal type the following to install it and do not forgot to restart server. sudo apt-get install php-curl Or if you're using the old PHP5 sudo apt-get install php5-curl share|improve this answer edited Aug 10 at 19:56 Jeff Puckett II 5,85631144 answered Jun 17 '11 at 7:20 rahim asgari 5,71663049 32 This would assume that he's on Windows. That won't work on Linux/Unix/OSX. –Francois Deschenes Jun 17 '11 at 7:22 35 Make sure you restart your Apache server after making this change. –Kevin_TA Dec 22 '11 at 2:52 18 If this doesn't work, check out this question. It provides a link for downloading a "fixed" php_curl.dll for PHP 5.3.13 (or 5.4.3). I had
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies http://stackoverflow.com/questions/12593883/how-to-remove-fatal-error-call-to-undefined-function-curl-init of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/14724661/fatal-error-call-to-undefined-function-curl-init-using-batch-file Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: call to Sign up how to remove Fatal error: Call to undefined function curl_init() up vote 1 down vote favorite I am having following error on using curlas extension Fatal error: Call to undefined function curl_init() in C:\wamp\www***\index.php on line 15 I have following configuration ;extension=php_bz2.dll extension=php_curl.dll ;extension=php_dba.dll i installed wampserver2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-x64.exe i tried to enable other extension also and restarted server but they local call to undefined host is not able to load that extension. php wampserver share|improve this question edited Jun 26 '13 at 11:27 Aditya P Bhatt 9,079145785 asked Sep 26 '12 at 2:46 Kasma 1,17341524 Are those extension directives really all on one line? If so, it is invalid (and commented out anyway) –Michael Berkowski Sep 26 '12 at 2:51 1 Also, be sure you are modifying the correct php.ini. Check the output of phpinfo() to see which php.ini file is being loaded, and load the extension in that one. –Michael Berkowski Sep 26 '12 at 2:52 Are you trying to load a page through a browser on your local machine, or execute a script via command-line? –newfurniturey Sep 26 '12 at 2:55 @MichaelBerkowski not in single line...it was in stackoverflow code... another thing , yes i verified all available php.ini... although i corrected ini which was refernced in phpinfo() –Kasma Sep 26 '12 at 3:18 @newfurniturey using browser on local machine.... –Kasma Sep 26 '12 at 3:19 | show 1 more comment 4 Answers 4 active oldest votes up
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function curl_init() using Batch File up vote 0 down vote favorite I have a PHP that downloads files from backend. I am using WAMP in Windows 7 and it works perfectly when done through the browser. Now I have created a batch file to execute the php and it shows: Fatal error: Call to undefined function curl_init() Not sure why something that could work over in browser is not working in batch file. Below is my code for the batch file: @ECHO OFF php.exe -f "C:\wamp\www\test\test.php" Any idea what's the issue? php curl share|improve this question edited Feb 6 '13 at 8:38 KingCrunch 71.3k12105140 asked Feb 6 '13 at 8:33 aandroidtest 43331545 1 Check the php.ini for your cli environment. –j0k Feb 6 '13 at 8:37 install php curl library... –Deadlock Feb 6 '13 at 8:42 add a comment| 4 Answers 4 active oldest votes up vote 3 down vote accepted uncomment the following on your php.ini ;extension=php_curl.dll and restart webserver. This might be due to curl disabled in your php. share|improve this answer answered Feb 6 '13 at 8:42 user7282 2,85232350 add a comment| up vote 2 down vote When you use wamp, xamp or other all-in-one server, it uses an overrided php.ini located into bin/conf/ instead where original is. You need copy from these or edit the ini located at php.exe folder. If you cant access it (shared server, etc), you can create a custom php.ini file into script folder, and put needed instructions: extension_dir = "c:/wamp/bin/php/php5.3.5/ext/" // change version if needed to yours extension = php_curl.dll share|improve this answer answered Jun 15 '13 at 0:30 erm3nda 771619 add a comment| up vote 0 down vote When using through browser it is using WAMP and the PHP ini is from C:\wamp\bin\php\php5.4.3 But I have set my php directory to C:\php-5.4.9 in environmental variables, thus when using windows batch it is calling php from that directory and there was no php.ini file there. I copied the PHP ini file from wamp to php folder and now it is working. App