1

PHP Curl is not working on Windows and APACHE. I get the following error:

Fatal error: Call to undefined function curl_init() in C:\Apache24...

What should I do?

Curl is installed but it is not showing up in phpinfo.

0

3 Answers 3

1

Enable extension php_curlin php.ini

extension=php_curl.dll

This solution is proposed based on Wamp. In other systems it may very. See @Mike's comment below this answer.

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

1 Comment

It depends on your system's setup. For Debian-based distros, the standard is to create a symbolic link in the /etc/php5/{type}/conf.d/ to /etc/php5/mods-available/ instead of hard-coding it like that into your php.ini. I would assume other distros would be similar. Also, if a file exists in the mods-available directory, you know it's actually installed and available (unless you've been messing with it manually somehow).
0

For windows 7 Some users have faced similar problem with easyphp. It has a solution for easyphp that I used once.

1) Installing/copying the bundle into D:/ drive instead of C:/ (assuming here it has windows).

2) Save a copy of your php.ini file at C:/Windows folder as well. Also, you can check which ini file is loaded by your php from the phpinfo().

Now restart your apache, and it may work for you too.

1 Comment

Yes. You'll see the curl extension there along with other things like mysql, openssl, etc. Just do a ctrl+f and search for curl on the page. If nothing, then extension is not enabled yet.
0

Had the same issue recently on my Windows 10 Pro notebook. Fixed it by just installing the latest Apache for Windows.

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.