[solved] disable_functions per user

Discussion in 'General' started by javii, Oct 31, 2011.

  1. javii

    javii New Member

    Hi,

    I'm running LSWS Enterprise on a Plesk server using suexec, i also have some php functions disabled with "disabled_functions" in php.ini global file.

    Now I want to enable some php functions in only one vhost, is this possible with LSWS?
    Last edited by a moderator: Nov 2, 2011
  2. webizen

    webizen New Member

  3. mistwang

    mistwang LiteSpeed Staff

    You can also override disabled_functions with "php_admin_value" in the virtual host configurations for that user.
  4. javii

    javii New Member

    Thank you.
  5. julian

    julian New Member

    some reason directive 'disable_functions' ignored
    my config lsws 4.2.14 -> Virtual Hosts -> domain.com -> general -> Apache Style Configurations
    Code:
    php_admin_value error_log  $SERVER_ROOT/logs/$VH_NAME/php_errors.log
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f noreply@$VH_NAME"
    php_admin_value display_errors 0
    php_admin_value disable_functions system
    php_admin_value open_basedir "$VH_ROOT:/var/lib/php5:/lsws/lib:/lsws/lsphp54/share/pear"
    
    and test.php
    Code:
    <?php
    var_dump(ini_get ( 'disable_functions' ) );
    system('id');
    ?>
    result
    Code:
    string(6) "system"
    uid=1116(www_1116) gid=1116(www_1116) groups=1116(www_1116)
    
  6. mistwang

    mistwang LiteSpeed Staff

    check phpinfo() output see if any of your configuration override works.
  7. julian

    julian New Member

    phpinfo()
    phpinfo.png
  8. julian

    julian New Member

  9. mistwang

    mistwang LiteSpeed Staff

    You should file a bug report to php.net, it is a PHP internal issue, system() should be disabled. You can try other functions.
  10. julian

    julian New Member

    I tried to change to a different version, the same error!
    built from source
    phpinfo_5515.png

Share This Page