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.

PHP SuExec in /scripts/easyapache

Discussion in 'EasyApache' started by nitromax, Mar 5, 2003.

  1. nitromax

    nitromax Well-Known Member

    Joined:
    Feb 12, 2002
    Messages:
    189
    Likes Received:
    0
    Trophy Points:
    16
    Does anyone know about the PHP SuExec option in the latest /scripts/easyapache?

    I have a customer who has shown us an example of how php scripts running as user 'nobody', when creating and writing to files on their account, will be created as user and group 'nobody'. When that is done any other user on the server can access and modify those files!

    We checked the option mentioned above when we ran the latest build apache routine, but we don't see that php is running with suexec.

    I have looked in the /home/cpapachebuild/buildapache directory and I see a couple of files in there, one is named suexec.patch, and the other is suexec+php.patch. There is also another file called apache_1.3.27-php-suexec-patch.

    Is there something we are supposed to do to get it working? If it was supposed to be installed when we ran /scripts/easyapache, is there a way we can tell if it has been installed? I looked in the apache.conf file and don't see anything in there. When looking at the contents of the patch files mentioned above it showed that there should be a file called suexec.c. I figured it would be called in the apache.conf file, but didn't see it.

    We would like to get this working, if anyone knows how.

    Thanks...
     
  2. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    I've been waiting a long time for a php suexec to come out... I cant wait until it's considered stable and included by default.


    I hate not yet played with buildapache and it though. Maybe i'll give it a try tomarrow.
     
  3. denisdekat

    denisdekat Active Member

    Joined:
    Feb 12, 2002
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem and cannot tell yet why this is happening. I followed the eeror page to the php.com site and all and it said that if you are running apache with suexec on, it should work. Somehow, suexec is only working for me with Perl, not php.
     
  4. Stenny Chong

    Stenny Chong Well-Known Member

    Joined:
    Jun 12, 2002
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Since suexec only work in cgi-bin directory, I guess you need to put your php script inside the directory cgi-bin and add #!/usr/bin/php header.

    correct me if i'm wrong, but i have try and can see my userid are use to run the php script in ps aux list.
     
  5. mpierre

    mpierre Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Has anyone run PHP suexec ???

    Anyone at all ???

    I want to try this week, but I wanted to know if anyone tested it before hand...

    I know how to install it, I am just a little afraid to try it, since most of my clients use PHP.
     
  6. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    AddHandler application/x-httpd-php .php .php4 .php3
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml


    make sure you have the addhandler line in httpd.conf for php suexec to work
     
Loading...

Share This Page