Enable curl_exec on php.ini

I want to run a php script that has curl.

but the following functions are disabled by php.ini:

EXEC, PassThru, shell_exec, system, proc_open, POPEN, curl_exec, curl_multi_exec, show_source

I changed the following line in php.ini:

disable_functions = exec, passthru, shell_exec, system, proc_open, popen, show_source

and run the service httpd restart command on ssh, but when I run the function phpinfo(), it will show curl_exec and curl_multi_exec will turn off again.

where is the problem and how to solve it?

+3
source share
5 answers

On the php command line, another ini file can be used for Apache loaded.

, php . .

$> php -i | grep "Loaded Configuration File"
Loaded Configuration File => /usr/local/lib/php.ini
$> vim /usr/local/lib/php.ini

. :

/etc/init.d/httpd restart
+4

php.ini :

disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source;

:

disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source;
+2

kloxo, , .

http://www.bloggertale.com/2013/10/22/enable-curl-kloxo/

kloxo, ,

/ ..

php.ini

, 2

exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,show_source

, php.ini, . .

: - search curl_exec,curl_multi_exec, , php.ini,

: - service httpd restart

info.php

, curl

<?=phpinfo();?>

CURL IS ENABLE.

+1
source

Just uncomment this line in php.ini file

;extension=php_curl.dll

and reboot the server.

-1
source

First of all, please check the permission for php.ini, this should be writable. then go to php.ini and find the line

;extension=php_curl.dll

and delete ;to uncomment it. and then restart your xampp or wamp server. Please try this change, and if there is any additional problem, let me know.

thank.

-1
source

All Articles