6

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.

4
  • 2
    Sometime there are several .ini files that PHP can use, are you sure you updated the right one? Commented Nov 8, 2012 at 9:06
  • extension_dir is already set to C:\xampp\php\ext for me. Try moving your php_curl.dll into that directory. Commented Nov 8, 2012 at 9: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? Commented Nov 8, 2012 at 9:16
  • You mentioned that you set extension_dir to C:\xampp\php\extensions, yet you put the actual extension in C:\xampp\php\ext? Commented Nov 8, 2012 at 9:34

5 Answers 5

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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: stackoverflow.com/a/40425431/1001328
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/

Comments

0

Add

extension=php_curl.dll 

in php.ini

Comments

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.

1 Comment

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
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"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.