• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

common php scripts to include

D

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 ?
 
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 ??
 
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:
http://winscp.net/

That may or may not help.
 
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 ?
 
Back
Top