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 in .html not wrapping w/ phpsuexec

Discussion in 'General Discussion' started by haze, Oct 31, 2003.

  1. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    I really would like to move over to the phpsuexec option so we can more efficiantly hunt down abusers and spammers, etc. Only problem is, myself as well as a couple of clients are running php within html documents. That is to say, the documents are tittled for instance: index.html and we use the following directive in .htaccess to execute the php:
    AddType application/x-httpd-php .php .html .htm

    Now, with phpsuexec enabled, I get a 500 error on the document. I had a look in the suexec logs and the apache error logs and came to the conclusion that the phpsuexec wrapper wasn't wrapping these documents, so i added #!/usr/bin/php to the top to test out my theory and it worked.

    Only problem is, I don't want to have to go through all the documents and add this line.. i might as well waste my time moving everything to .php which i really can't be bothered to do.

    Does anyone have any idea how i can get phpsuexec to recognize these files?
     
  2. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Simple fix..
    change
    AddType application/x-httpd-php .php .html .htm
    to
    AddHanlder application/x-httpd-php .php .html .htm
     
  3. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    I guess it pays to search before you post :P

    I fixed this by changing the folling in my .htaccess:

    This:

    AddType application/x-httpd-php .php .php3 .phtml .html .htm .php4

    To:

    AddHandler application/x-httpd-php .php .php3 .phtml .html .htm .php4
     
  4. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    Didn't see your post faldran.. but thank you very much for the reply!
     
Loading...

Share This Page