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.

easyapache and php suexec

Discussion in 'cPanel Developers' started by ilearn_webtech, Dec 19, 2007.

  1. ilearn_webtech

    Joined:
    Oct 8, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello ,

    Could some body please explain how the easyapache script really achieves the suexec ability , if the same features have to be achieved on servers not running cpanel .

    Thanks
     
  2. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
  3. ilearn_webtech

    Joined:
    Oct 8, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    any idea what it was with the older versions of easyapache , when suexec was going on ?
     
  4. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    I am not sure if this article answers your question: http://servertune.com/kbase/entry/46/
     
  5. ilearn_webtech

    Joined:
    Oct 8, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Andy , for pointing me to the article . I have phpsuexec enabled on one of my servers . If php is running as CGI and apache has been setup to accommodate the suexec feature then why does my server's php show up to be running as cli ? I enabled this feature using the easyapache script .

    Here's what my server's php got to say :

    ------------------------------------------------------------
    php -v
    PHP 4.4.7 (cli) (built: xxxxx xxxxxxxxxxx)
    Copyright (c) 1997-2007 The PHP Group
    ---------------------------------------------------
    I am pretty sure that php runs as CGI on my server . I am confused with this .
     
  6. ilearn_webtech

    Joined:
    Oct 8, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Ah , think this is because I used the php binary at the command line !
    I am I right ?
     
  7. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    I could be mistaken, but it is likely that easyapache on your server doesn't save the configuration(s) when re-compiling. It shouldn't matter, but did you try re-compiling Apache/Php from the browser, or at the prompt, or both?
     
  8. AnilR

    AnilR Active Member

    Joined:
    Nov 24, 2007
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    I do agree with mr. Andy Reed, it could be the case that easyapache does not save the configurations while re-compiling apache with php. Also PHP CLI means PHP Command Line Interface is a way of using PHP in the system command line and it is enabled by default at the time of initial installation of PHP and Apache. Thats why your server's php show up to be running as cli.

    And if you are using PHPSuexec then PHP scripts are running as nobody. Are you re-compiling the Apache and PHP using easyapache script from command line or from the WHM using Apache Update.
     
  9. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Correction above; the whole point of phpsuexec and suphp is that PHP scripts run as the user, not as nobody.
     
  10. ilearn_webtech

    Joined:
    Oct 8, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Nice to see so many responses :)

    I re-compile php always using the easyapache script and from the command line . I can see that no php script ever runs as user nobody . No script ever sends emails from sever as nobody . I see the same thing in many other servers where php is compiled with easyapache , from command line .
    phpinfo from the browser shows that the server's API is CGI , but at the command line it shows up as cli . I fell this is because I ran "php -v " from the command prompt .
     
  11. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Do you see the same Php version in Phpinfo page and at the prompt? What's your OS?
     
Loading...

Share This Page