PHP template configuration and actions

Suppose I have the file /etc/php.ini to have additional lines such as:

eaccelerator.cache_dir="${HOME}/tmp/eaccelerator"
Two questions:
  1. When a new server is created, will this correctly be changed to something like the following?
eaccelerator.cache_dir="/home/account/domains/mydomain.com/tmp/eaccelerator"
2. When a new server is created, I need to do:
mkdir "${HOME}/tmp/eaccelerator"
and I also need to ensure that the UID and GID for that directory is set correctly. Can this be done? If so, how?
1. When a new server is created, will this correctly be changed to something like the following?

If you want to be able to use variables in the php.ini file, then you’d want to use the PHP template option in System Settings -> Server Templates -> Apache Website called “Template PHP 5 configuration file”.

Using that supports variables.

mkdir "${HOME}/tmp/eaccelerator" and I also need to ensure that the UID and GID for that directory is set correctly. Can this be done? If so, how?

Hmm, I suspect you’ll want to create a script for this – which you can have Virtualmin call when creating a Virtual Server.

You can take a look at System Settings -> Module Config -> Actions upong user and server creation – "Command to run after making changes to a server".
-Eric

the correct variable is like so, this is my working example for open_basedir
open_basedir = $HOME:$HOME/tmp:/usr/lib/php:/usr/share/pear so without the {}

then i saved it as php.ini.virtualmin and told the server templates to use that ini file. In the past with an update the php.ini file was overwritten.

mkdir “${HOME}/tmp/eaccelerator”
isn’t this were the /etc/skel comes in?

1. When a new server is created, will this correctly be changed to something like the following?

If you want to be able to use variables in the php.ini file, then you’d want to use the PHP template option in System Settings -> Server Templates -> Apache Website called “Template PHP 5 configuration file”.

Using that supports variables.

mkdir "${HOME}/tmp/eaccelerator" and I also need to ensure that the UID and GID for that directory is set correctly. Can this be done? If so, how?

Hmm, I suspect you’ll want to create a script for this – which you can have Virtualmin call when creating a Virtual Server.

You can take a look at System Settings -> Module Config -> Actions upong user and server creation – "Command to run after making changes to a server".
-Eric