suPHP problem

Discussion in 'Installation/Configuration' started by DUCKFACE, May 9, 2010.

  1. DUCKFACE

    DUCKFACE Banned

    when i change the engine from mod_php to suPHP the website starts to act strange.
    system('id'); returns
    uid=33(www-data) gid=33(www-data) groups=33(www-data),5003(ispconfig),5004(client2),5005(client3),5006(client4),5007(client5),5008(client0),5009(client6),5010(client7),5011(client8),5012(client9),5013(client10),5014(ispapps)
    isn't that wrong ... www-data
    how to fix it ?
     
    Last edited: Jul 28, 2011
  2. DUCKFACE

    DUCKFACE Banned

    whats wrong ?

    when i change from suPHP to mod_php MySQL database gets empty, ftp folder change the path....
    is this the way it have to be ?
     
    Last edited: Jul 28, 2011
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Enable debugging in ispconfig. But as the code to empty the database is not connected to the website settings in any way, I see no wy how it can get emptied by switching between mod_php and suphp. Also the FTP folder does not change the path, at least if you have not changed the default path settings for websites in ispconfig.
     
  4. DUCKFACE

    DUCKFACE Banned

    debu enabled

    11.05.2010-10:57 - DEBUG - Processed datalog_id 303
    11.05.2010-10:57 - DEBUG - Call function 'restartHttpd' in module 'web_module'.
    11.05.2010-10:57 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    11.05.2010-10:58 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    11.05.2010-10:58 - DEBUG - Found 1 changes, starting update process.
    11.05.2010-10:58 - DEBUG - Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    11.05.2010-10:58 - DEBUG - Call function 'update' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
    11.05.2010-10:58 - DEBUG - exec: chmod 751 /var/www/clients/client4/web4/
    11.05.2010-10:58 - DEBUG - exec: chmod 751 /var/www/clients/client4/web4/*
    11.05.2010-10:58 - DEBUG - exec: chmod 710 /var/www/clients/client4/web4/web
    11.05.2010-10:58 - DEBUG - exec: chmod 777 /var/www/clients/client4/web4/tmp
    11.05.2010-10:58 - DEBUG - exec: usermod --groups sshusers web4
    11.05.2010-10:58 - DEBUG - exec: chown web4:client4 /var/www/clients/client4/web4
    11.05.2010-10:58 - DEBUG - exec: chown web4:client4 /var/www/clients/client4/web4/log/error.log
    11.05.2010-10:58 - DEBUG - Disable SSL for: garant-stroi.com
    11.05.2010-10:58 - DEBUG - Processed datalog_id 304
    11.05.2010-10:58 - DEBUG - Call function 'restartHttpd' in module 'web_module'.
    11.05.2010-10:58 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

    but still no changes in uid
    uid=33(www-data) gid=33(www-data) groups=33(www-data),5003(ispconfig),5004(client2),5005(client3),5006(client4),5007(client5),5008(client0),5009(client6),5010(client7),5011(client8),5012(client9),5013(client10),5014(ispapps)

    here is the lines from vhost
    # suphp enabled
    <Directory /var/www/clients/client4/web4/web>
    suPHP_Engine on
    # suPHP_UserGroup web4 client4
    AddHandler x-httpd-suphp .php .php3 .php4 .php5
    suPHP_AddHandler x-httpd-suphp
    </Directory>
    the strange part for me is # on suPHP user. when i try to remove it .. i gtet an error "Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration
    "
     
    Last edited: May 11, 2010
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the reason why it is commented out. Suphp on all major linux distributions is compiled to execute the php files under their owner. The setting suPHP_UserGroup is only be used if you recompile your suphp with "paranoid" switch, if its not compiled like that, you get the error message.

    If your php files are ecxecuted under the wrong user, you might have uploaded them with the wrong user or you chowned them to www-data. Make sure that the php files are owned by the user of the website, thats the case when you upload them with FTP. If you installed them manually with SSH then you have to chown them.
     

Share This Page