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.

howto parse php in .html files fcgi

Discussion in 'General Discussion' started by mtech-hosting, Sep 15, 2007.

  1. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Just as the title states, we moved php5 to fcgi-suexe and now we need to parse some php thats in html fils. How should we go about this?

    Also, where are all the settings for fcgi? Shouldnt there be something like this someone for the settings?
    Code:
    <IfModule mod_fastcgi.c>
    FastCgiIpcDir /usr/local/www/fcgi_ipc/tmp
    AddHandler fastcgi-script .fcgi
    FastCgiSuexec /usr/local/sbin/suexec
    FastCgiConfig -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 240 -pass-header HTTP_AUTHORIZATION
    </IfModule>
    <Location /php-fastcgi/>
    Options ExecCGI        
    SetHandler fastcgi-script
    </Location>
    Thanks
     
    #1 mtech-hosting, Sep 15, 2007
    Last edited: Sep 15, 2007
  2. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Anyone? I cant find any configurable options anywhere
     
  3. rustelekom

    rustelekom Well-Known Member
    PartnerNOC

    Joined:
    Nov 13, 2003
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    moscow
    If you use Apache 2.xxx and php 5.xxx try set in user .htaccess fille RemoveType directive. Like this one:

    RemoveType .php .php3 .php4 .phtml .asp .htm .html
    AddType x-httpd-php5 .php .php3 .php4 .phtml .asp .htm .html
    AddHandler x-httpd-php5 .php .php3 .php4 .phtml .asp .htm .html

    It should be help with interpreting .html extension as php
     
  4. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for the info but i dont think that would would help since the php is using a wrapper. I managed to solve the issue by using
    Code:
    # Fastcgi configuration for PHP5
    LoadModule fcgid_module modules/mod_fcgid.so
    MaxRequestsPerProcess 500
    AddHandler fcgid-script .php5 .php .php3 .php2 .phtml .html 
    FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php5
    FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php
    FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php3
    FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php2
    FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .phtml
    FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html
    
    I just added another wrapper for .html to the AddHandler and a FCGIWrapper for html. I dont know if this will enable it html parsing for the entire server, but its working now though it may not be the correct way to do it.
     
Loading...

Share This Page