The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to enable shell_exec() for user using .htaccess

Discussion in 'General Discussion' started by SACHIN, Jan 10, 2007.

  1. SACHIN

    SACHIN Guest

    Hello,

    How to enable enable shell_exec() function for any use on the Linux server using the .htaccess file. Now shell_exec() is in the disable function list in php.ini file of the server.

    So please assist me, then how can i enable shell_exec() for any user using the .htaccess file, if shell_exec is disabled globally on the server in php.ini file.

    Waiting for the reply.

    Sachin.
     
  2. HelloAdam

    HelloAdam Well-Known Member

    Joined:
    Nov 6, 2005
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    Hey,

    I don't think you can have that option to turn on and off that function per domain using .htaccess


    From,
    Adam
     
  3. SACHIN

    SACHIN Guest

    Hello,

    But we can enable some of the variables or functions of php in .htaccess.

    Like we can set register_globales On or Off for user in .htaccess file. Or else we can set the upload_max_filesize for the user in .htaccess.


    So there might be some way that we can enable shell_exec() for user in .htaccess if that function is disabled globally in php.ini of the server.

    Thanks for your replies to this thread.


    Sachin.
     
  4. HelloAdam

    HelloAdam Well-Known Member

    Joined:
    Nov 6, 2005
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    Hey,

    From my understanding of this, if its not in any phpinfo page, it can't be changed. shell_exec() or anything close to that, doesn't show in any phpinfo page.

    I know with PHPsuexec running you have a little more control over what goes in a php.ini file per user rather then .htaccess.

    From,
    Adam
     
  5. Kelmas

    Kelmas Well-Known Member

    Joined:
    Nov 6, 2006
    Messages:
    121
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    I don't think so. Have you succeded at least once?

    I don't think it is possible to use functions that are on disabled functions setting.
     
  6. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Although you can change some variables in a .htaccess file, it's not possible to modify the disabled functions. Just think about it - If anyone could enable disabled functions, it's not very good security, is it? ;)

    I personally run LightTPD on a seperate port, and then use mod_proxy to proxy requests for a certain VirtualHost to the LightTPD server. The LightTPD server uses a completely different version of PHP, and a completely different php.ini file (with nothing disabled)
     
Loading...

Share This Page