Reputation: 4383
I wanna run php script which has got curl on it.
but following functions are disabled by php.ini:
exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,show_source
I have changed following line in php.ini:
disable_functions = exec,passthru,shell_exec,system,proc_open,popen,show_source
and run service httpd restart command on ssh,but when I run phpinfo()
function it will show curl_exec and curl_multi_exec are disabled again.
where is the problem and how should I solve it?
Upvotes: 3
Views: 30403
Reputation: 11
If you are kloxo user then you can follow these steps to enable curl.
http://www.bloggertale.com/2013/10/22/enable-curl-kloxo/
or if you are not using kloxo then login with in your root directory then go to
/etc
at there you will get php.ini
As i know that there is 2 lines
exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,show_source
mean one is middle of php.ini and then in last one. You have to Remove from both place.
First :- search curl_exec,curl_multi_exec
and you will get this line in two place just remove it and save the php.ini and then
Use this command :- service httpd restart
Then create a file
info.php
and write this code to get the status of curl
<?=phpinfo();?>
At their you will able to see CURL IS ENABLE.
Upvotes: 1
Reputation: 21
Go to the end of php.ini, and find the following line:
disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source;
Just edit it like this:
disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source;
Upvotes: 2
Reputation: 1527
The command line php may be using a different ini file to the one loaded up by Apache.
you must be find which php configuration in used. you need to edit current configuration file.
$> php -i | grep "Loaded Configuration File"
Loaded Configuration File => /usr/local/lib/php.ini
$> vim /usr/local/lib/php.ini
and remove disabled function. and final step is :
/etc/init.d/httpd restart
Upvotes: 4
Reputation: 1793
First of all please check permission for php.ini ,this must be writable. then go to php.ini and find line
;extension=php_curl.dll
and remove ;
for uncomment it. and then restart your xampp or wamp server. Please try this change and if get any further problem let me know.
thanks.
Upvotes: -1
Reputation: 6463
Just uncomment this line in your php.ini file
;extension=php_curl.dll
and restart your server.
Upvotes: -1