cURL won’t work locally

We setup up two brand spankin’ new installations of XAMPP on two computers here at work and tried to run a PHP script that uses cURL to get some facebook data….

Low and behold it didn’t work, but when I loaded it on my old machine and the server everything was fine! My first thought was to check and make sure the curl module was loaded so I created a php page and quickly loaded in:

<?php
phpinfo();
?>

Then visited that file in a browser. It said cURL was enabled! WTF. So I did a bit of googling and found that even though its enabled, xampp may not have loaded the right .dll or .so automatically. Now worries, go into your php.ini file here (mac):

/Applications/XAMPP/xamppfiles/etc/php.ini

Search for “;extension=php_curl.so” (.dll if your on windows) and uncomment it be removing the “;” semicolon.

Whabam, done!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.