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?
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
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With