Portal Home > Knowledgebase > Articles Database > i want open function in one site
i want open function in one site
Posted by police_3001, 02-08-2011, 08:00 PM |
hello..
i want open functions :
curl_exec & and curl_setopt
for one site only
i add this value before
php_admin_flag enable_functions curl_exec
for user not work
when i remove it from disable_function work good without any problem but it work for all site
i need open it for one site only
i hope any one help me
Regards
|
Posted by Squidix - SamBarrow, 02-09-2011, 04:20 AM |
If you're using phpsu/cgi then you can drop your in php.ini file in the directory.
|
Posted by Natcoweb, 02-10-2011, 09:29 AM |
enable_functions" does not exist. Check http://us2.php.net/manual/en/ini.list.php
Only disable_functions is available.
May be you can use suhosin to enable a function for one domain only:
php_admin_value suhosin.executor.func.blacklist = "curl_exec, curl_setopt"
|
Posted by police_3001, 02-10-2011, 01:30 PM |
hello ,,
thanks for replay i get this error when add
error :
========
Syntax error on line 10614 of /usr/local/apache/conf/httpd.conf:
php_admin_value takes two arguments, PHP Value Modifier (Admin)
|
Posted by Natcoweb, 02-11-2011, 11:17 AM |
Try php_admin_value suhosin.executor.func.blacklist "curl_exec, curl_setopt" witout "="
|
Posted by artemirk, 02-13-2011, 09:36 PM |
Globally you need add suhosin.executor.func.blacklist = "curl_exec, curl_setopt,shell_exec" and all the functions that you want to disable globally.
After that for each domain in the virtual host section you can add suhosin.executor.func.blacklist again but without the function that you need to enable. And so you will enable that function only for one domain.
Example:
...
php_admin_value open_basedir "/usr/lib/php"
php_admin_value suhosin.executor.func.blacklist = "shell_exec"
In this example curl_exec, curl_setopt has been enabled for the VirtualHost.
This way it will be better as you do not need to modify all the virtual hosts only the ones that you need to enable one or more functions, instead disable_functions.
|
Add to Favourites Print this Article
Also Read