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.

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:
    1
    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:
    36
    Location:
    If there is trouble, it will find me
    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:
    1
    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:
    36
    Location:
    If there is trouble, it will find me
Loading...

Share This Page