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

common php scripts to include

Discussion in 'Plesk for Linux - 8.x and Older' started by dl2rbi, Dec 24, 2005.

  1. dl2rbi

    dl2rbi Guest

    There are many (SUB) Domains using the same common php tools (hits counter, date functions, ....)
    I don't like to use many copies of the same files in each domain's directory.
    Is there a common solution (like Alias in apache or sott links) to work together with suexec, apache2 and plesk enviroment ?.

    /var/www/vhosts/domain_1/httpdocs/<common> ---|
    /var/www/vhosts/domain_2/httpdocs/<common> ---|
    /var/www/vhosts/domain_3/httpdocs/<common> ---|--- linked to /share/common/<xxx.php>

    what about suexec's user / group values (there are different ftp (domain) accounts)

    Any idea ?
  2. ArchStanton

    ArchStanton Guest

  3. dl2rbi

    dl2rbi Guest

    uid eith safe_mode

    That's the solulution I searched, but with safe:mode on the uid must be the same.
    Because there are several different domains, each domain has its own ftp-user with their own uid.
    I'll get an error like:

    SAFE MODE Restriction in effect. The script whose uid is 10002 is not allowed to access ./srv_com/smarty/Smarty.class.php owned by uid 0 in /var/www/vhosts .....

    If safe_mode is switched off, I can use these scripts but ....
    Any idiea to access php scripts with different uid's in common directories with safe_mode on feature ??
  4. ArchStanton

    ArchStanton Guest

    If you use the sub-domain feature, you can upload the files using the same user. Of course if these aren;'t sub-domains, then I'm not really sure. If you have root access, you could upload the files with SSH. A good windows client for that is WinSCP:

    That may or may not help.
  5. dl2rbi

    dl2rbi Guest

    different uid's

    If I have subdomains with the same ftp-user account, there is no problem, because all sub-domains are using identical uid's.
    It's no problem to cahnge uid's of uploaded files, but which is the owner of the file ...?
    If I use the domain_1 as owner, the others aren't able to use the included modules in common.
    I wouldn't like to switch off safe_mode. Isn't there any solution with a common uid to handle it in safe_mode ?