ohdang888 Posted March 16, 2011 Share Posted March 16, 2011 I have a CentoOS Linux operating system with cPanel and WHM anyways, works great except curl... Fatal error: Call to undefined function curl_init() in my php scripts i have run this yum install curl works fine.. and did a graceful restart of the entire server. Getting the same error, as though its not enabled. Ran: which curl Outputs: /usr/bin/curl So, it's clearly installed, but why isn't it working? Also, i run a page with phpinfo(), and CTRL+F "curl" and it comes up with nothing. As though it doesn't event recognize it. Btw, running "yum install curl" says: Setting up Install Process Package curl-7.15.5-9.el5.x86_64 already installed and latest version Package curl-7.15.5-9.el5.i386 already installed and latest version Ideas? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/230768-installing-curl/ Share on other sites More sharing options...
lastkarrde Posted March 16, 2011 Share Posted March 16, 2011 Have you added the curl entry to php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/230768-installing-curl/#findComment-1188054 Share on other sites More sharing options...
JonnoTheDev Posted March 16, 2011 Share Posted March 16, 2011 yum install php-curl Quote Link to comment https://forums.phpfreaks.com/topic/230768-installing-curl/#findComment-1188096 Share on other sites More sharing options...
ohdang888 Posted March 16, 2011 Author Share Posted March 16, 2011 Have you added the curl entry to php.ini? I thought i only needed to do that in Windows (by removing that ";" in front of the extension). Either way, i removed the semi-colon and reboot the server... nothing. Using this: yum install php-curl Says this: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirrors.manchester.icecolo.com * base: anorien.csc.warwick.ac.uk * extras: anorien.csc.warwick.ac.uk * updates: mirrors.manchester.icecolo.com Excluding Packages in global exclude list Finished Setting up Install Process [b]No package php-curl available.[/b] Nothing to do Same goes for php5-curl Quote Link to comment https://forums.phpfreaks.com/topic/230768-installing-curl/#findComment-1188167 Share on other sites More sharing options...
ohdang888 Posted March 18, 2011 Author Share Posted March 18, 2011 When i check my errorlogs, i'm getting this: [18-Mar-2011 04:38:29] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_curl.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0 any ideas how to fix this? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/230768-installing-curl/#findComment-1189313 Share on other sites More sharing options...
Maq Posted March 18, 2011 Share Posted March 18, 2011 It's looking for a DLL when it should be a SO file. Can you show us that line in the php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/230768-installing-curl/#findComment-1189321 Share on other sites More sharing options...
ohdang888 Posted March 18, 2011 Author Share Posted March 18, 2011 It was this: ;extension=php_bz2.dll ;extension=php_cpdf.dll ;extension=php_crack.dll extension=php_curl.dll ;extension=php_db.dll and it changed it to ;extension=php_bz2.dll ;extension=php_cpdf.dll ;extension=php_crack.dll extension=php_curl.so ;extension=php_db.dll re-built and restarted apache, its still comes up with an error of: [18-Mar-2011 23:10:16] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_curl.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_curl.so: cannot open shared object file: No such file or directory in Unknown on line 0 Quote Link to comment https://forums.phpfreaks.com/topic/230768-installing-curl/#findComment-1189337 Share on other sites More sharing options...
ohdang888 Posted March 21, 2011 Author Share Posted March 21, 2011 Solved it. For anyone having this issue: Go into your WHM (Web Host Manager) then go to Software - EasyApache (Apache Update) - It may take a minute or so to load depending on your server and computer speed, once loaded click on start customizing based on profile down at the bottom then click Next Step until you are at Short Options List once there click Exhaustive Options List at the bottom of that page, then on the new page you are on you will find Apache options and settings for each PHP version you have. Check to see if "CurlSSL, and "Curl" checked. then save and build it Quote Link to comment https://forums.phpfreaks.com/topic/230768-installing-curl/#findComment-1190515 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.