0

On my server (lighttpd + php-cgi) I have several php-cgi processes, each running as the user of the site it's serving. I know I can set a php.ini for each process through the PHPRC enviroment variable. Unfortunately this causes PHP to only read that php.ini file. I would like to have one php.ini file for all processes and overrides for each process.

Basically what I want to achieve is to have all the processes share configuration except for open_basedir (since it should be that users web dir) and upload_tmp_dir (since the user whould have write permissions to it).

How should I solve this? Do I need to provide more details?

Zeta Two
  • 101
  • 4

2 Answers2

1

Depends on distro. Usually you can achieve this by using /etc/php.d/ and have separate files for all users.

GioMac
  • 4,444
  • 3
  • 24
  • 41
0

I ended up switching to PHP-FPM. Which spawns php processes which run under approppriate users.

Zeta Two
  • 101
  • 4