How to Enable Curl in Wamp Server

How to enable curl in Wamp server

The steps are as follows :

  1. Close WAMP (if running)
  2. Navigate to WAMP\bin\php\(your version of php)\
  3. Edit php.ini
  4. Search for curl, uncomment extension=php_curl.dll
  5. Navigate to WAMP\bin\Apache\(your version of apache)\bin\
  6. Edit php.ini
  7. Search for curl, uncomment extension=php_curl.dll
  8. Save both
  9. Restart WAMP

How to enable CurlHttpClient for WAMP in PHP 7.4+?

Go to https://curl.se/docs/caextract.html and download the latest .pem file.

Copy the .pem file to ..... well I put mine in C:\wamp64\bin\php called cacert.pem

This contains a whole bunch of certificates and because the file is created by Mozilla we sort of trust it.

Now using the WAMPManager, edit your current php.ini file by

left click wampmanager -> PHP -> php.ini

Find this parameter, it will be commented out with a ;

;openssl.cafile=

Change it to

openssl.cafile="c:/wamp64/bin/php/cacert.pem"

Save the edit, and then restart Apache to activate the change

How to get CURL to work with PHP on Windows? (WAMP)

You don't have to reboot the computer, just restart the apache and the php module will read the new ini.

Did you change the correct php.ini? In case of doubt

<?php echo 'php.ini: ', get_cfg_var('cfg_file_path'); ?>

can tell you.

Is there something in the error.log of the apache that indicates that something went wrong while loading php and the php_curl.dll?

Did you start the apache as a win32 service? If you did try to start it as a console application. Error messages will show up on the console then. Or start it as a service and take a look at the error.log file and the windows event log (start, run, eventvwr.msc /s).

edit:

"The specified procedure could not be found"

You need a dll that is compatible with your php version and build. Exactly what did you install and where did you get it from?

curl on WAMP server

A few things you can check:
See this link for enabling curl in wamp on windows.

http://www.phpmind.com/blog/2011/02/how-to-enable-curl-in-wamp/

Most likely solution:

You have to replace the php_curl.dll with the following:
This version for windows is compatible with wamp.
You have to replace it in the PHP extensions tab in wamp server.

Look for Fixed curl extensions and choose your php version.
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/

I've got this from another SO Post and this worked for a lot of people.

https://stackoverflow.com/a/13677593/1379394



Related Topics



Leave a reply



Submit