5

I have php_curl.dll in xampp/php/ext/ folder and in php.ini file I set extension=php_curl.dll (removed ';'). I also set extension_dir = "C:\xampp\php\extensions\" in php.ini file. Then I restarted the Apache, even I restarted the system 2 times. But till in Phpinfo() I cant see curl. and I am getting error like"Call to undefined function curl_init()"`

I have PHP version 5.2.4.

Echilon
  • 10,064
  • 33
  • 131
  • 217
user1808669
  • 75
  • 2
  • 2
  • 7
  • 2
    Sometime there are several .ini files that PHP can use, are you sure you updated the right one? – Mark Baker Nov 08 '12 at 09:06
  • `extension_dir` is already set to `C:\xampp\php\ext` for me. Try moving your `php_curl.dll` into that directory. – Anirudh Ramanathan Nov 08 '12 at 09:08
  • Thank you for reply. I installed Xampp 1.6.4. I did not uploaded any php_curl.dll file. Can you give me a link to download php_curl.dll? – user1808669 Nov 08 '12 at 09:16
  • You mentioned that you set `extension_dir` to `C:\xampp\php\extensions`, yet you put the actual extension in `C:\xampp\php\ext`? – h2ooooooo Nov 08 '12 at 09:34

5 Answers5

1

Check your Apache's error_log file. Even if php_curl.dll is activated in your php.ini, a startup problem might disable your php_curl.dll, so it doesn't show up in phpinfo(). Search for any line like this:

PHP Warning: PHP Startup: Unable to load dynamic library

Also check that the correct php.ini is loaded (is shown at the beginning of phpinfo()) and that your extension_dir is correctly configured.

Marcelo Pascual
  • 810
  • 8
  • 20
  • 1
    Thank you, I hadn't been checking my error logs >.<. After doing that I could see it wasn't loaded, so I followed the steps in this answer: https://stackoverflow.com/a/40425431/1001328 – James Apr 14 '19 at 19:16
1

"At http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ . Download the file that you need from the fixed curl extensions list at the bottom of the page, for example Windows 7 64 bit Machines will work correctly with the non nts file."

Source: http://www.developingtheweb.co.uk/php-5-4-3-and-5-3-13-curl-extension-fix/

0

Not every php_curl.dll is compatible with your system configuration. Make sure you are using a compatible version of the extension.

Yet, to make sure that you are editing the correct php.ini, you can read the phpinfo's output. It will tell you which php.ini file has been loaded. Make sure that you are modifying the same file.

Mehran
  • 15,593
  • 27
  • 122
  • 221
  • I uncommented the extenssion in 2 places. in php.ini under PHP directoey and another php.ini under apache/bin directory. Then i restarted the XAMPP. it is woking fine then – user1808669 Nov 15 '12 at 06:35
0

Add

extension=php_curl.dll 

in php.ini

Akhilraj N S
  • 9,049
  • 5
  • 36
  • 42
0

You may need to use the entire path instead of the relative path.

Changing that line to this fixed it for me: extension="C:\php\ext\php_curl.dll"

mczarnek
  • 1,305
  • 2
  • 11
  • 24