Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    318
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Faldran

    Faldran Well-Known Member

    Joined:
    May 28, 2002
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    316
    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:
    318
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    318
    Didn't see your post faldran.. but thank you very much for the reply!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice