How fix "php_admin_value takes two arguments" ?

I need disable some dangerous functions in php 5.3, but per domain basis not globaly. To do so i created such config in virtual host:

Code:
<VirtualHost 127.0.0.1:8080>
  <IfModule mod_php5.c>
php_admin_value suhosin.executor.func.blacklist = "system, shell_exec, passthru, exec, popen, gzinflate, fsockopen, pfsockopen"
</IfModule>
    ServerName mydomain.com
    ServerAlias www.mydomain.com

    DocumentRoot "/usr/local/www/apache22/data/mydomain.com"
  <Directory "/usr/local/www/apache22/data/mydomain.com">
	Options Indexes FollowSymlinks MultiViews
	Order allow,deny
	Allow from all
  </Directory>
  <Directory /usr/local/www/apache22/data/mydomain.com>
     php_admin_value open_basedir "/usr/local/www/apache22/data/mydomain.com"
  </Directory>

    CustomLog /dev/null combined
    ErrorLog /var/log/www/mydomain.com/aerror.log

</VirtualHost>

When i restarted apache got an error:

Code:
Performing sanity check on apache22 configuration:
Syntax error on line 3 of /usr/local/etc/apache22/Includes/mydomain.com.conf:
php_admin_value takes two arguments, PHP Value Modifier (Admin)
Found some related articles telling that it could happened because misspeled configuration. I tried other variations (single quotes, no quotes), no effect.
 
Demontager said:
Code:
<VirtualHost 127.0.0.1:8080>
  <IfModule mod_php5.c>
php_admin_value suhosin.executor.func.blacklist [color="Red"]=[/color] "system, shell_exec, passthru, exec, popen, gzinflate, fsockopen, pfsockopen"

Code:
Performing sanity check on apache22 configuration:
Syntax error on line 3 of /usr/local/etc/apache22/Includes/mydomain.com.conf:
php_admin_value takes two arguments, PHP Value Modifier (Admin)
No "=" in php_admin_value.
 
Removed "=" and part of config as follows:
Code:
<IfModule mod_php5.c>
php_admin_value suhosin.executor.func.blacklist "system, shell_exec, passthru, exec, popen, gzinflate, fsockopen, pfsockopen"
</IfModule>
Restarted apache, yes no error, but disabled function still works. Just for test i added "phpinfo" and it working after apache restart.
Sure I added phpinfo in php.ini as:
Code:
suhosin.executor.func.blacklist = "system, shell_exec, passthru, exec, popen, gzinflate, fsockopen, pfsockopen, phpinfo"
 
php -v
Code:
PHP 5.3.19 with Suhosin-Patch (cli) (built: Dec 30 2012 11:44:04) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH
phpinfo shows "This server is protected with the Suhosin Extension 0.9.33"
 
SOLVED
Oops, sorry maybe due to holidays i didn't add blocked functions in vhost config :)
Code:
Warning: phpinfo() has been disabled for security reasons in /usr/local/www/apache22/data/mydomain.com/1.php on line 2
 
Back
Top