How to enable curl in Wamp server
The steps are as follows :
- Close WAMP (if running)
- Navigate to
WAMP\bin\php\(your version of php)\
- Edit
php.ini
- Search for curl, uncomment
extension=php_curl.dll
- Navigate to
WAMP\bin\Apache\(your version of apache)\bin\
- Edit
php.ini
- Search for curl, uncomment
extension=php_curl.dll
- Save both
- 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
PHP: If Internet Explorer 6, 7, 8 , or 9
Using PHP'S Swiftmailer With Gmail
Pdo Prepared Statements With Wildcards
How to Get Enum Possible Values in a MySQL Database
How to Get the Sqlsrv Extension to Work With PHP, Since Mssql Is Deprecated
PHP 5 Strpos() Difference Between Returning 0 and False
Best Way to Automatically Remove Comments from PHP Code
PHP Install Ssh2 on Windows Machine
MySQL_Fetch_Array Return Only One Row
How to Create Multilingual Translated Routes in Laravel
Yii2 Htaccess - How to Hide Frontend/Web and Backend/Web Completely
Fatal Error: Call to a Member Function Prepare() on Null
MySQL - Ignore Insert Error: Duplicate Entry