1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

suPHP option

Discussion in 'Plesk for Linux - 8.x and Older' started by Serge, Jun 13, 2006.

  1. Serge

    Serge Guest

    0
     
    It would be very nice to have an option to turn on/off the possibility to run php-scripts on behalf of a user, not from the web-server. For example - via suPHP. Not on every domain as it would be incompatible with the existing behaviour but as an option.
    It's one of the most required features.
     
  2. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    +1

    I'd say just integrate suPHP (like we have suExec for Perl already). People keep asking why they can't remove uploaded pictures, etc. "Well, they're owned by apache, not your domain user." Clients don't really like that answer and setting up cronjobs for the root user to chown -R files seems clunky as well.
     
  3. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    I completely forgot that I put together some mod_suphp packages in the atomic-testing channel. Must have been drunk at the time or something.
     
  4. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    If you could get that to work I think a lot of people would be very happy, Scott. Still I think this is really something SWsoft should be doing.
     
  5. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    We've been kicking it around for an ASL tie-in for a while now.
     
  6. dom974

    dom974 Guest

    0
     
    yep

    Hi everyone,

    totally right about suphp.

    It's incredible, it should be activated by default. I'm so annoyed because my clients tell me "i don't know why but it works everywhere else"

    I tried to search on the internet but it seems no one really succeeded...

    bye

    dominique.
     
  7. benji

    benji Guest

    0
     
    Ok guys, now that vacations are over,

    Shall we get this perm anoying thing going!

    I've been like one year after this issue, still havent found a global solutions for this.

    Atomic, i'm sure you know the solution for this, could you give us a light on this?
     
  8. dom974

    dom974 Guest

    0
     
    Hi,

    Just a quick word to say that I've successfully installed suPHP on my Plesk8 box !!

    It was pretty easy:

    1/ yum install mod_suphp
    2/ vi suphp.conf in httpd directory
    put suphp engine to on
    put suphp config path to/etc/yoursuphp dir where you have your suphp.ini file
    3/ vi httpd.conf
    remove php handler because it's already used by suphp
    4/ service httpd restart

    ... and that's all it works like a charm now !

    bye
    dominique.
     
  9. benji

    benji Guest

    0
     
    Hi dominique,

    By the way, I'm still on plesk 7.5.4, in ur opinion how was de update to 8? Any problems on update? Any advises?

    And, will this install of suPHP work also in plesk 7.5.4 ?

    Tx very much.
     
  10. dom974

    dom974 Guest

    0
     
    hi benji,

    I don't know for plesk 7.5. My plesk box has been plesk8 right from the start.

    But as far as I know, I don't see why it shouldn't work. If you're running apache2/php4-5, that would work.
    I just installed the rpm package made for fedora/rh and I didn't have to modify loads of things.

    Once I got suphp to work (as a module for apache mod_suphp it's not compiled directly but loaded as a dso), I wasn't able to use my horde webmail.
    So if it's your case, just put something like that in your httpd.conf file:

    Code:
    <Directory /usr/share/psa-horde>
           php_admin_flag engine on
           suPHP_Engine off
           AddHandler php5-script .php
           AddType text/html .php
    </Directory>
    don't forget the AddHandler directive otherwise mod_php is activated but it doesn't take in charge of php files (was my case)

    dominique.
     
  11. benji

    benji Guest

    0
     
    Thanks a lot for ur info. I guess i will have to update to version 8 anyway, and put the suphp thingie, o well..., o probably a sunday plesk party (to ensure no clients are upset by the possible offline times) :)

    Regards.
     
  12. dom974

    dom974 Guest

    0
     
    Yep, send me an email if you have issues while setting suphp at dwanhoi (at) gmail (dot) com

    i won't connect to that forum very often

    bye

    dominique.

    PS: clients and offline times during updates ... tricky very tricky, that's the worst thing I am experiencing, clients putting pressure on your shoulders
     
  13. CryoGenID

    CryoGenID Regular Pleskian

    25
    90%
    Joined:
    Apr 14, 2004
    Messages:
    150
    Likes Received:
    0
    Hey!

    I've read all threads regarding the suPHP and tried to install it myself...

    But I am stuck :-(

    The current status is that when I run a PHP-Script, I get a "500 Internal Server Error".

    What I did was to rename /etc/httpd/conf.d/php.conf to php.xxx so that it is not processed any more.
    (As suPHP calls PHP right?)
    Then I edited /etc/httpd/conf.d/suphp.conf .
    This is the current suphp.conf:
    ---
    # This is the Apache server configuration file providing suPHP support..
    # It contains the configuration directives to instruct the server how to
    # serve php pages while switching to the user context before rendering.
    # For directives see <URL:http://httpd.apache.org/docs-2.0/mod/mod_suphp.html>

    LoadModule suphp_module modules/mod_suphp.so

    # To use suPHP to parse PHP-Files
    #AddHandler x-httpd-php .php
    AddHandler x-httpd-php .php .php4 .php3 .phtml

    #AddHandler php5-script .php
    #AddType text/html .php


    # This option tells mod_suphp if a PHP-script requested on this server (or
    # VirtualHost) should be run with the PHP-interpreter or returned to the
    # browser "as it is".
    suPHP_Engine on

    # This option tells mod_suphp which path to pass on to the PHP-interpreter
    # (by setting the PHPRC environment variable).
    # Do *NOT* refer to a file but to the directory the file resists in.
    #
    # E.g.: If you want to use "/path/to/server/config/php.ini", use "suPHP_Config
    # /path/to/server/config".
    #
    # If you don't use this option, PHP will use its compiled in default path.
    #suPHP_ConfigPath /etc


    # If you compiled suphp with setid-mode "force" or "paranoid", you can
    # specify the user- and groupname to run PHP-scripts with.
    # Example: suPHP_UserGroup foouser bargroup
    # suPHP_UserGroup apache apache
    ---

    When I look into the suphp.log-File I see s.th. like this which looks perfectly correct:
    ---
    [Wed Sep 27 20:53:13 2006] [info] Executing /var/www/vhosts/xxx.com/httpdocs/who.php as user xxx_com (10001), group psacln (10001)
    ---

    Why am I getting the "Internal Server Error"?

    I think it has somehow s.th. do to with the "AddHandler"/"AddType" in the suphp.conf. If I play around with those,
    I either get the "Internal Server Error" or absolutely no output is displayed :(

    Do I need to check s.th. regarding PHP? (When I type "php -v" on the console, php answers this here:
    ----
    PHP 5.0.4 (cli) (built: Jan 29 2006 21:37:43)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
    with eAccelerator v0.9.4, Copyright (c) 2004-2004 eAccelerator, by eAccelerator
    ----)
    Can please anybody help me? I need the suPHP to get Typo3 4.0 working correctly...

    Thanks a lot in advance!

    Chris
     
  14. regen

    regen Guest

    0
     
    wrong GROUP, check out 'psaserv' as group.
     
  15. ptnetworks

    ptnetworks Guest

    0
     
    yum mod_suphp does not find any packages, i have Centos 4.2

    Can i download it from some place?

    Thanks,
    Ruben
     
  16. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Both dag.wieers.com and centos.karan.org have mod_suphp packages for RHEL/CentOS 4. See http://dag.wieers.com/packages/mod_suphp/ for instance. Or just add Dag's channel to your yum configuration, then you can install it using yum (and keep it up to date).
     
  17. ptnetworks

    ptnetworks Guest

    0
     
    It worked, now can i do the same thing for php5 ?

    When i change the suphp.conf settings mysql stops working in php, only scripts that do not use mysql work, any ideas?

    Regards
    Ruben
     
  18. dom974

    dom974 Guest

    0
     
    what errors does the php page give you ?

    What user/group did you put in your suphp.conf ?

    Dominique.
    Pureweb.fr
     
  19. thewolf

    thewolf Regular Pleskian

    25
    57%
    Joined:
    Mar 11, 2004
    Messages:
    231
    Likes Received:
    0
    Hi,

    We're also considering to install suPHP on our RHEL4 servers running Plesk 8.0.

    Is there anything we should know (e.g. things that may break) before we proceed?

    Also, SWsoft should really include suPHP into Plesk!

    Thanks.
     
  20. dom974

    dom974 Guest

    0
     
    I don't think suphp should be installed _by default_.

    I assume there will be too many questions like : why is chmoding 777 giving me errors ? why is webdav not working properly, etc ...

    but they should definitely include this option like "safe mode" option in hosting configuration.

    there's nothing to take care of before installing suphp. If you have loads of files already in your apache folders, just make sure user id of the owner won't be rejected by suphp after the install (make a script to change thoses perms)
     
Loading...