Check if cURL Is Enabled

Recently, I was asked to install a module for a client that required cURL to be installed on the server. Having no knowledge of how to check this I reached out a colleague and genius developer Sean Breeden. Here is my explanation for the solution he provided.

In your web root directory create a new .php file. For our example we’ll call it pi.php

Now open the file for editing and input the following code and save the file.

<?php  phpinfo(); ?>

Note: According to the phpinfo function official documentation it will output a large number of items about the current state of PHP and can often be used for debugging purposes.

Next, view the file output in your browser by going to www.yourdomain.com/pi.php
Be sure to change .com to the appropriate top level domain (TLD) such as .net, .biz, .org etc

Scroll down to look for “cURL support” which will tell you if it is enabled or not.

That’s it!

There’s tons of other server information here too that you may want to check out, but you don’t want this to be public knowledge so be sure to remove the file from web root once you have the info you need.