Tuesday, 30 March 2010

How to enable CURL extension in your PHP?

There are few steps through which you can find CURL extension is enbaled in your PHP or not:

These are the steps to take:

1. open a blank text document.

2. copy and paste this code into notepad and save it as test.php

<?php
echo '<pre>';
var_dump(curl_version());
echo '</pre>';
?>

4. If there was an error, then it means that you do not have this extension enabled. and you will see an error similar to this one:
Fatal error: Call to undefined function curl_version() in test.php on line 2

5. Open your php.ini file and look for this line:
;extension=php_curl.dll

path: php > php.ini

Remove ; before the extension word and done!

your curl has been enabled.

Restart your server.

Cheers!

No comments:

Post a Comment