1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enable php function for single account

Discussion in 'General Discussion' started by webstyler, Sep 14, 2009.

  1. webstyler

    webstyler Member

    Joined:
    Nov 20, 2003
    Messages:
    413
    Likes Received:
    0
    Trophy Points:
    16
    Hello

    I need to enable system() php function for single account

    I have try to add
    php_admin_value disable_functions = show_source, shell_exec, passthru, exec, proc_open, allow_url_fopen
    to httpd.conf but not work.. when restart apache httpd failed

    Any suggest ?

    Thanks
     
  2. MattCurry

    MattCurry Member

    Joined:
    Aug 18, 2009
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Tx
  3. webstyler

    webstyler Member

    Joined:
    Nov 20, 2003
    Messages:
    413
    Likes Received:
    0
    Trophy Points:
    16
    Not work

    <VirtualHost **.**.255.228:80>
    ServerName dev.**.com
    ServerAlias www.dev.**.com
    DocumentRoot /home/devsite/public_html
    ServerAdmin webmaster@dev.**.com
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/dev.**.com combined
    CustomLog /usr/local/apache/domlogs/dev.**.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User devsite # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
    suPHP_UserGroup devsite devsite
    php_admin_value disable_functions = show_source, shell_exec, passthru, exec, proc_open, allow_url_fopen
    </IfModule>
    <IfModule !mod_disable_suexec.c>
    SuexecUserGroup devsito devsito
    </IfModule>
    ScriptAlias /cgi-bin/ /home/devsito/public_html/cgi-bin/

    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/devsito/dev.**.com/*.conf"

    </VirtualHost>
     
  4. thewebhosting

    thewebhosting Active Member

    Joined:
    May 9, 2008
    Messages:
    1,202
    Likes Received:
    1
    Trophy Points:
    38
    Please make sure that you have installed suhosin in your server. To enable the php function for a single account suhosin must be installed on the server.
     
  5. webstyler

    webstyler Member

    Joined:
    Nov 20, 2003
    Messages:
    413
    Likes Received:
    0
    Trophy Points:
    16
    at this time is not installed on server

    There is only way to use it ?

    thanks
     
  6. webstyler

    webstyler Member

    Joined:
    Nov 20, 2003
    Messages:
    413
    Likes Received:
    0
    Trophy Points:
    16
    We have installed suhosin .. but stil not work

    Have checked on php info and function backlist displayed

    on httpd.conf we have

    ## User mydomai # Needed for Cpanel::ApacheConf
    <IfModule mod_userdir.c>
    Userdir disabled
    Userdir enabled mydomai
    </IfModule>
    <IfModule mod_suphp.c>
    suPHP_UserGroup mydomai mydomai
    </IfModule>
    <IfModule concurrent_php.c>
    php4_admin_value open_basedir "/home/mydomai:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
    php5_admin_value open_basedir "/home/mydomai:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule !concurrent_php.c>
    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/mydomai:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/$
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_value open_basedir "/home/mydomai:/usr/lib/php:/usr/local/lib/php:/tmp"
    php_admin_value suhosin.executor.func.blacklist = "show_source,shell_exec,passthru,exec,popen,proc_open,allow_url_fopen$
    </IfModule>
    <IfModule sapi_apache2.c>
    php_admin_value open_basedir "/home/mydomai:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/$
    </IfModule>
    </IfModule>
    <IfModule !mod_disable_suexec.c>
    SuexecUserGroup mydomai mydomai
    </IfModule>
    CustomLog /usr/local/apache/domlogs/mydomain.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/mydomain.net combined
    ScriptAlias /cgi-bin/ /home/mydomai/public_html/cgi-bin/
    </VirtualHost>

    -------------------

    Apache restarted but function still disabled
     
  7. webstyler

    webstyler Member

    Joined:
    Nov 20, 2003
    Messages:
    413
    Likes Received:
    0
    Trophy Points:
    16
    any suggest ?

    thanks
     
  8. webstyler

    webstyler Member

    Joined:
    Nov 20, 2003
    Messages:
    413
    Likes Received:
    0
    Trophy Points:
    16
    not found any work solutions :(
     
  9. hostultra

    hostultra Member

    Joined:
    Aug 21, 2002
    Messages:
    167
    Likes Received:
    0
    Trophy Points:
    16
    Its not working because your putting the line in the wrong place in httpd.conf

    Your putting the line inside <IfModule mod_suphp.c>
    If your using mod suPHP then you cant use php_admin_value, thats a mod_php feature.
    If your not using suPHP, then anything inside that IfModule is not going to be seen, so either way its not going to work.

    Don't set a php_admin_value inside a <IfModule mod_suphp.c>
     
  10. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    There is a MUCH SIMPLER way to do that!

    However I am reluctant to post the details as that is one of the "aces up my sleeve" currently so to speak. ;)

    I'll give you a few tips in your private message box though. :D
     
  11. webstyler

    webstyler Member

    Joined:
    Nov 20, 2003
    Messages:
    413
    Likes Received:
    0
    Trophy Points:
    16
    I'm using suPHP and suhosin ..so where and how set
    ... suhosin.executor.func.blacklist = "show_source,allow_url_fopen" ...
    for a virtualhost ??

    Thanks
     

Share This Page