Results 1 to 11 of 11

Thread: Enable php function for single account

  1. #1
    Registered Member
    Join Date
    Nov 2003
    Posts
    396

    Default Enable php function for single account

    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. #2
    Registered Member
    Join Date
    Aug 2009
    Location
    Houston, Tx
    Posts
    275

    Default Enable php function for single account

    Hello,

    I do see what you are trying to do, I will attach a link to this post that is an article on this subject. Please let me know if you have any other questions.

    How to Enable PHP function for a one account ? | Linux Windows System Administrator Help

    Thank you,
    Matthew Curry

  3. #3
    Registered Member
    Join Date
    Nov 2003
    Posts
    396

    Default

    Quote Originally Posted by cPanelMattCurry View Post
    Hello,

    I do see what you are trying to do, I will attach a link to this post that is an article on this subject. Please let me know if you have any other questions.

    How to Enable PHP function for a one account ? | Linux Windows System Administrator Help

    Thank you,
    Matthew Curry
    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. #4
    Registered Member
    Join Date
    May 2008
    Posts
    1,202

    Default

    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.
    AccuWebHosting.Com | cPanel Hosting Provider Since 2003
    Cloud Powered Hosting | cPanel VPS
    Trusted by 20,000+ Clients Worldwide

  5. #5
    Registered Member
    Join Date
    Nov 2003
    Posts
    396

    Default

    Quote Originally Posted by thewebhosting View Post
    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.
    at this time is not installed on server

    There is only way to use it ?

    thanks
    --

  6. #6
    Registered Member
    Join Date
    Nov 2003
    Posts
    396

    Default

    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. #7
    Registered Member
    Join Date
    Nov 2003
    Posts
    396

    Default

    any suggest ?

    thanks
    --

  8. #8
    Registered Member
    Join Date
    Nov 2003
    Posts
    396

    Default

    not found any work solutions
    --

  9. #9
    Registered Member
    Join Date
    Aug 2002
    Posts
    167

    Default

    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>
    Host Ultra
    Quality Affordable Web Hosting

  10. #10
    BANNED
    Join Date
    Jun 2005
    Posts
    2,023

    Exclamation

    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.

  11. #11
    Registered Member
    Join Date
    Nov 2003
    Posts
    396

    Default

    Quote Originally Posted by hostultra View Post
    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>
    I'm using suPHP and suhosin ..so where and how set
    ... suhosin.executor.func.blacklist = "show_source,allow_url_fopen" ...
    for a virtualhost ??

    Thanks
    --

Similar Threads

  1. PHP Function to Create Account
    By hostwiser in forum General Discussion
    Replies: 6
    Last Post: 07-21-2013, 01:03 PM
  2. How to enable php EXEC function for only one domain ?
    By sh4ka in forum General Discussion
    Replies: 5
    Last Post: 11-29-2011, 08:38 AM
  3. php function mail () not working within my account
    By chike in forum General Discussion
    Replies: 7
    Last Post: 06-07-2010, 02:03 PM
  4. Perl (module) function to enable/disable shell account
    By przemcio in forum cPanel Developers
    Replies: 1
    Last Post: 09-03-2007, 10:48 AM
  5. Using list account function to get IP address in php
    By fransisco in forum General Discussion
    Replies: 2
    Last Post: 10-23-2005, 09:41 AM
bargain