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.

PSTREE Output

Discussion in 'General Discussion' started by scrlk, Jul 24, 2010.

  1. scrlk

    scrlk Registered

    Joined:
    Jul 24, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Is the number of httpd processes normal? The only one that I figure should be running is the one for user "lsforums" but I can't figure out the rest.

    http://img715.imageshack.us/img715/651/pstree.gif

    Also, the reason I posted this question in here as opposed to some apache thread is because cpanel and whm may affect the whole equation.
     
  2. Miraenda

    Miraenda Well-Known Member

    Joined:
    Jul 28, 2004
    Messages:
    242
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Coralville, Iowa USA
    Apache processes run as the user nobody, so it is normal to have multiple Apache processes running as the user nobody. Here is the output on my machine (which isn't overly active):

    Code:
            ├─httpd(1023)─┬─httpd(4825,nobody)
            │             ├─httpd(28250,nobody)
            │             ├─httpd(28252,nobody)
            │             ├─httpd(28254,nobody)
            │             ├─httpd(28256,nobody)
            │             ├─leechprotect(28251)
            │             ├─splitlogs(28248)
            │             └─splitlogs(28249)
    Which PHP handler are you using in WHM > Apache Configuration > PHP and SuEXEC Configuration area?
     
  3. scrlk

    scrlk Registered

    Joined:
    Jul 24, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Well, the configuration in WHM says I am using FCGI along with SuEXEC. Though I am not too sure that my FCGI is working right.

    I installed it using easyapache and then I added these lines to my /usr/local/apache/conf/userdata/std/2/mysiteuser/mysite.com/include.conf

    Code:
    <Directory "/home/mysiteuser/public_html">
    	Options -Indexes FollowSymLinks +ExecCGI
    	AllowOverride AuthConfig FileInfo
    	AddHandler fcgid-script .php
    	Action fcgid-script /cgi-bin/php.fcgi
    	Order allow,deny
    	Allow from all
    </Directory>
    
    <Directory "/home/mysiteuser/public_html/cgi-bin">
    	AllowOverride None
    	Options None
    	Order allow,deny
    	Allow from all
    </Directory>
    Then created a file called php.fcgi in my /cgi-bin/ path and placed the following into it:

    Code:
    #!/bin/bash
    # Shell Script To Run PHP5 using mod_fastcgi under Apache 2.x
    # Tested under Red Hat Enterprise Linux / CentOS 5.x
    ### Set PATH ###
    PHP_CGI=/usr/bin/php-cgi
    PHP_FCGI_CHILDREN=4
    PHP_FCGI_MAX_REQUESTS=1000
    ### no editing below ###
    export PHP_FCGI_CHILDREN
    export PHP_FCGI_MAX_REQUESTS
    exec $PHP_CGI
    Yet when I restarted apache I get an internal server error 500... Prior adding the custom directives to <VirtualHost> and creating the php.fcgi file everything was working fine, but then again I suppose that php was not being served through cgi right?
     
  4. scrlk

    scrlk Registered

    Joined:
    Jul 24, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Well I got part of it working... it no longer craps out with a 500 error. What I did was place the action call in my .htaccess file instead of the <VirtualHost> hook which is probably called before php.conf.

    Anyway though... I still can't figure out how to tell if my php files are being served through fcgi or not. Is there an easy way to tell because when I insert some random name into the action call it still works... for example:

    Works -> Action fcgid-script /cgi-bin/php.fcgi
    Works -> Action fcgid-script /cgi-bin/fakenamenofilehere
     
    #4 scrlk, Jul 24, 2010
    Last edited: Jul 24, 2010
Loading...

Share This Page