These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for PHP template configuration and actions on the new forum.
Suppose I have the file /etc/php.ini to have additional lines such as:
eaccelerator.cache_dir="${HOME}/tmp/eaccelerator"Two questions:
and I also need to ensure that the UID and GID for that directory is set correctly. Can this be done? If so, how?
<div class='quote'>1. When a new server is created, will this correctly be changed to something like the following?</div>
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.
<div class='quote'>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?</div>
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
<div class='quote'>1. When a new server is created, will this correctly be changed to something like the following?</div>
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.
<div class='quote'>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?</div>
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?