How To Find Out If Php Is Compiled With Curl Extension Installed Enabled
Posted On Thu Jun 21, 2007 By hostman In Linux Forums And Topics Discussions For Wallpaper Websites Running On Linux Servers Forums
at some point, you will find out that some scripts require you to have cURL extension enabled in your web server.
well, how can you tell whether the CURL extension is enabled or compiled in your PHP?
these are the steps to take:
1. open a blank text document. i will be using notepad in windows.
2. copy and paste this code into notepad and save it as testcurl.php
3. if you prefer, you can download the full script at this link:
How To Check Curl Installed In Php
4. IF IT FAILS:
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 testcurl.php on line 2
HOW TO FIX IT:
open you php.ini file and look for this line:
extension=php_curl.dll
this is how my server was:
If you notice, i have a semi-colon (;) before extension=php_curl.dll
so all you have to do is to remove that semi-colon save your php.ini file and restart your server. now try to open your testcurl.php file with your browser and this time you should not get this error anymore.
5. IF SUCCESS.
if you have extension=php_curl.dll enabled, then you will see something like this:
Here is a good tutorial explaining how to use cURL:
http://tournasdimitrios1.wordpress.com/2010/10/17/php-basics-accessing-remote-urls-using-curl/
Now i just have to figure out how i can do this on a linux server. if anyone knows how to activate it in a linux machine, let me know please
well, how can you tell whether the CURL extension is enabled or compiled in your PHP?
these are the steps to take:
1. open a blank text document. i will be using notepad in windows.
2. copy and paste this code into notepad and save it as testcurl.php
<?php
## Test if cURL is working ##
## SCRIPT BY WWW.WEBUNE.COM (please do not remove)##
echo '<pre>';
var_dump(curl_version());
echo '</pre>';
?>
## Test if cURL is working ##
## SCRIPT BY WWW.WEBUNE.COM (please do not remove)##
echo '<pre>';
var_dump(curl_version());
echo '</pre>';
?>
3. if you prefer, you can download the full script at this link:
How To Check Curl Installed In Php
4. IF IT FAILS:
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 testcurl.php on line 2
HOW TO FIX IT:
open you php.ini file and look for this line:
extension=php_curl.dll
this is how my server was:
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;extension=php_adt.dll
;extension=php_apd.dll
;extension=php_blenc.dll
;extension=php_bz2.dll
;extension=php_bz2_filter.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
;extension=php_curl.dll
;extension=php_date.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_dio.dll
;extension=php_domxml.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_ffi.dll
;extension=php_filepro.dll
;extension=php_fribidi.dll
extension=php_gd2.dll
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;extension=php_adt.dll
;extension=php_apd.dll
;extension=php_blenc.dll
;extension=php_bz2.dll
;extension=php_bz2_filter.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
;extension=php_curl.dll
;extension=php_date.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_dio.dll
;extension=php_domxml.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_ffi.dll
;extension=php_filepro.dll
;extension=php_fribidi.dll
extension=php_gd2.dll
If you notice, i have a semi-colon (;) before extension=php_curl.dll
so all you have to do is to remove that semi-colon save your php.ini file and restart your server. now try to open your testcurl.php file with your browser and this time you should not get this error anymore.
5. IF SUCCESS.
if you have extension=php_curl.dll enabled, then you will see something like this:
array(9) {
["version_number"]=>
int(461570)
["age"]=>
int(1)
["features"]=>
int(540)
["ssl_version_number"]=>
int(9465919)
["version"]=>
string(6) "7.11.2"
["host"]=>
string(13) "i386-pc-win32"
["ssl_version"]=>
string(15) " OpenSSL/0.9.7c"
["libz_version"]=>
string(5) "1.1.4"
["protocols"]=>
array(9) {
[0]=>
string(3) "ftp"
[1]=>
string(6) "gopher"
[2]=>
string(6) "telnet"
[3]=>
string(4) "dict"
[4]=>
string(4) "ldap"
[5]=>
string(4) "http"
[6]=>
string(4) "file"
[7]=>
string(5) "https"
[8]=>
string(4) "ftps"
}
}
["version_number"]=>
int(461570)
["age"]=>
int(1)
["features"]=>
int(540)
["ssl_version_number"]=>
int(9465919)
["version"]=>
string(6) "7.11.2"
["host"]=>
string(13) "i386-pc-win32"
["ssl_version"]=>
string(15) " OpenSSL/0.9.7c"
["libz_version"]=>
string(5) "1.1.4"
["protocols"]=>
array(9) {
[0]=>
string(3) "ftp"
[1]=>
string(6) "gopher"
[2]=>
string(6) "telnet"
[3]=>
string(4) "dict"
[4]=>
string(4) "ldap"
[5]=>
string(4) "http"
[6]=>
string(4) "file"
[7]=>
string(5) "https"
[8]=>
string(4) "ftps"
}
}
Here is a good tutorial explaining how to use cURL:
http://tournasdimitrios1.wordpress.com/2010/10/17/php-basics-accessing-remote-urls-using-curl/
Now i just have to figure out how i can do this on a linux server. if anyone knows how to activate it in a linux machine, let me know please
David Fri May 25, 2012
This is how i did it.
Copied ssleay32.dll,li and php_curl.dll to Windows/System3 that enabled it in the php.ini,and restarted Apache.
Copied ssleay32.dll,li and php_curl.dll to Windows/System3 that enabled it in the php.ini,and restarted Apache.
Jiancarlos Sat May 12, 2012
if the error doesnt go away just unistall the apache and install it again.
Mahesh Tue Mar 13, 2012
I have removed ; but still same error
what should i do
what should i do
Ian Tue Feb 28, 2012
Thanks alot! Really helped.
Autumn Mon Jan 30, 2012
So what happens if you end up with a blank page? I copied the code into a php file and uploaded it onto my server.
Ranga Tue Nov 29, 2011
Thanks a lot! it fixed my problem!!
Abhishek Mon Sep 26, 2011
yaa its very easy steps to enable curl
khaled Fri Aug 19, 2011
thanks it is very usefull
Manikandan Thu Aug 18, 2011
Yes Its really Nice ...
It Works...
It Works...
Sérgio Fri Jul 29, 2011
THANKS!, directly from Brazil! xD
negmorne Mon Jul 11, 2011
thank yon u very much. the information helped
toocool Thu Mar 24, 2011
thanks! useful!
Sekhar Fri Mar 11, 2011
Yeah.. It works for me..
Thanks for the tip dude..:)
Thanks for the tip dude..:)
tejas Thu Mar 10, 2011
yes it really works for me thanks dude.....
david Mon Jan 31, 2011
yes. it works. thanks.
Related Content
Information
Forums »
Linux Forums And Topics Discussions For Wallpaper Websites Running On Linux Servers »
How To Find Out If Php Is Compiled With Curl Extension Installed Enabled
Linux Forums And Topics Discussions For Wallpaper Websites Running On Linux Servers »
How To Find Out If Php Is Compiled With Curl Extension Installed Enabled
Title: How To Find Out If Php Is Compiled With Curl Extension Installed Enabled
Description: this post shows you how how to find out if php is compiled with curl extension and its installed or how to verify if its enabled in your php configuration settings
Tags: php , curl , server , service , computer , enable , verify
Info: This Post Has Been Viewed 0 Times Since
Date: Thu Jun 21, 2007
Author hostman Received 39 Replies #2917
Date: Thu Jun 21, 2007
Author hostman Received 39 Replies #2917
Share
URL: 

Embed: 

To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it
BBCODE:: 

BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
wallpaperama | Wallpapers | Forums | Terms Of Service
copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5
copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5