● WAMP curl fix

Thu Aug 11, 2022 9:48 am
Clan Leader
Top Dog
Nuke Dev / Coder
2817 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 21.2hrs.
Total Played: 2,100hrs.


  
Taking a break from work!
Reputation: 7013.2
votes: 6
Okay, after further investigation, I finally figured out what is wrong and why it happens.
It happens because WAMPSERVER does NOT ship with a cacert.pem file. So, if you were thinking this was an issue with Xtreme, it's not.

To fix this is pretty straight forward. Just follow these steps and your localhost will be all good for any system.
You would need to do this for every version of PHP that you expect to use with WAMP.


  1. Go to
    Please login to see this link
    Get registered or Log in
    and download the cacert.pem file.
    Expand

  2. Now that you have that file, you need to go to your PHP folder and insert it into that folder. My folder path is E:\wamp64\bin\php\php7.4.9 but yours will probably be different. Your "bin" folder is going to be in the same folder as the "www" folder where you upload your files. Take note of the last folder there, "php7.4.9". That folder is my PHP version that I am currently using for all my projects, so just upload that file from step one.

  3. If you haven't already, start WAMP. Then, by your clock on your desktop, left-click on the WAMP icon, and go to PHP -> php.ini and open that.
    Expand

  4. Once opened, do a search for curl.cainfo.
    What you should find is something that looks like;

    Code: [ Select all ]

    ; curl.cainfo =


  5. Remove the ; from the beginning, then after the equals, (=), put the absolute path of the file.
    So in my case, it now looks like this:

    Code: [ Select all ]

    curl.cainfo = E:\wamp64\bin\php\php7.4.9\cacert.pem


  6. Now, once you have that in, save the file. Windows Shortcut is Ctrl + S to save.


Now, restart WAMP by left-clicking and selecting "Restart all services", and it should work now without needing to do the previous edits to the CMS.


Expand
Thu Aug 11, 2022 10:01 am
Spammer
106 Posts
casterdon
Currently Offline
Offline
  
Doesn't like playing games!
Reputation: 761.6
Perfect coRpSE, very nice find, thankyou
Forums ©