0

I just installed cURL for PHP on SUSE, my phpinfo() shows that curl.ini is being loaded, but I am still getting php errors for example:

Fatal error: Call to undefined function curl_init()

My phpinfo() is being loaded here: http://beatengine.com/network/home/server

Can someone tell me what's wrong? I've restarted apache several times, no avail

hakre
  • 193,403
  • 52
  • 435
  • 836
Ron
  • 513
  • 1
  • 4
  • 22
  • Have you checked `/etc/php5/conf.d/curl.ini` ? – LSerni Sep 28 '12 at 23:22
  • 3
    cURL is *not* installed. If it were, you'd see it listed as a module. It's telling you that curl.ini is being parsed, but all INI files in `/etc/php5/conf.d` are parsed, so that doesn't mean anything. Here's what a phpinfo() on a server where cURL is properly installed looks like: http://codepad.viper-7.com/H8OkCL – NullUserException Sep 28 '12 at 23:27
  • @Iserni I did check and it was loading the extension libcurl.so – Ron Sep 29 '12 at 01:47
  • @NullUserException That's what I was thinking, so I went to go re-install curl, and this is what comes up when I do so http://i.imgur.com/niRIO.jpg – Ron Sep 29 '12 at 01:48
  • Your phpinfo shows that you have not installed the PHP curl extension successfully. Please follow the installation instructions. And make yourself comfortable how php.ini files are loaded. Then try to understand what needs to be done to actually load an extension in PHP. Then compare with your own setup if all these conditions are matched. I'd say it's likely that the `extension=xyz_curl.so` line is missing or pointing to a wrong location. You can also debug in looking for startup errors which requires you to configure logging, enable startup errors and tracking it. – hakre Sep 29 '12 at 12:43
  • The extension name should be 'curl.so' (not `libcurl.so`), and ought to be in `/usr/lib64/php5/extensions/curl.so` (or `lib` if you have a 32bit system). – LSerni Sep 29 '12 at 12:43
  • I see, all I had to do was uninstall php5-curl, and I found a package php53-curl, and that installed perfectly and setup my curl correctly. When I tried to re-install php5-curl I had gotten compatability issues between the php version. Thanks for all the help everyone If anyone else has this issue 'zypper in php53-curl' – Ron Sep 29 '12 at 17:26

0 Answers0