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!

suPHP per site?

Discussion in 'General Discussion' started by danf, Jan 6, 2009.

  1. danf

    danf Active Member

    Joined:
    Apr 10, 2006
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    151
    Is there any way to turn on suPHP using .htaccess, or some other way to do it on a site-by-site basis? I would like to test this functionality before turning it on for all users.

    Thanks.
     
  2. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    191
    You can install two instances of PHP. One php4 and one php5 (one CGI and one apache module). I forgot how it's done, but you should be able to use the apache conf file to assign different users to different instances of PHP.
     
  3. danf

    danf Active Member

    Joined:
    Apr 10, 2006
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    151
    Thanks, but I don't want to install PHP 4. It's never been installed on this server, and it is now end-of-lifed.

    I was hoping to be able to do something like this in a user's .htaccess:

    suPHP_Engine on

    This didn't work, but I did find something that did work. I used a .conf files for a virtual host and added these lines:

    suPHP_Engine on
    AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
    suPHP_AddHandler application/x-httpd-php5

    I then ran this:

    /scripts/ensure_vhost_includes --user=username

    It seemed to work fine.
     
  4. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    191
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