0

Curl is enabled on the server but curl_exec function is disabled for security reasons.

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

I know that I can enable this function from php.ini but it will affect the entire server. Can you help me with suggestions on how to activate this function (curl_exec) only for a specific sub-folder? I tried using .htaccess but no luck.

vv_vv
  • 105
  • 4

1 Answers1

2

The disable_functions directive must be set in php.ini. You cannot set this in httpd.conf or .htaccess.

See doc: http://php.net/manual/en/ini.core.php#ini.disable-functions

If you need different restrictions on functions per directory you can use separate instances of PHP-FPM, each of which can have its own php.ini.

See also: http://php-fpm.org/

Federico Sierra
  • 3,589
  • 1
  • 20
  • 26