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.

phpsuesec

Discussion in 'General Discussion' started by WilliamE, May 13, 2005.

  1. WilliamE

    WilliamE Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Once phpsuexec is installed on a server is it possible to use a .htaccess to enable the parsing of .html files as php or is there anyway to do this on a directory by directory basis? Thanks.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You have to put the directives into a local php.ini file.
     
  3. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    AddHandler application/x-httpd-php .htm
    AddHandler application/x-httpd-php .html
    AddType application/x-httpd-php .htm
    AddType application/x-httpd-php .html

    add this to the .htaccess and php will parse the .htm and .html files using phpsuexec
     
  4. WilliamE

    WilliamE Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Thanks!

    And on a related note, happen to know how to get .phps (php-source) files working properly with phpsuexec. Tried entering the addtype entries and such for php-source files in a .htaccess file and didn't work, just trying to download the file.
     
  5. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    AddHandler application/x-httpd-php-source .phps

    Pop that in the .htaccess file, and that should do it. Not sure it you maybe have to specify it as text or source.
     
  6. webfors

    webfors Registered

    Joined:
    Jul 21, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi All,

    I tried adding:

    AddHandler application/x-httpd-php-source .phps

    in a local php.ini file, however .phps files are still not being parsed. It appears you can't use .htaccess files for php related configurations when running phpsuexec.

    I've searched the forums thoroughly and found only one instance of someone asking how to parse .phps files with phpsuexec.

    Anyone else run into this before?
     
  7. WilliamE

    WilliamE Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Gave that a shot, think I did previously also, didn't do the job, still just getting download for it.
     

Share This Page