Do settings in a particular site (virtual server) php.ini override the settings in the Virtualmin installation php.ini? Or are they just a limit on what is available from the installation to that particular virtual server?
How much memory would be available to php at mysite.com? I am guessing 128mb, Virtualmin overrides the site. Is that right? if the numbers were reversed in the above example, I believe the answer would still be 128MB. So to get mysite more memory, both would have to be 256mb?
Next Level: If mysite runs a cronjob on the Virtualmin Installation, is the memory available to php for that cronjob controlled by mysite.com or Virtualmin?
I am guessing for cronjobs the memory is controlled by Virtualmin.
What command could I run at the command level to see the answers?
If you’re using FCGID or CGI for that particular domain, which is the default, than that domain’s php.ini file is used for all PHP configuration.
In your example above, that means 256MB.
You could make changes to that config either in $HOME/etc/php.ini, or in Virtualmin using what you described above, Services->PHP Configuration – both of those are editing the same file.
To use the system-wide php.ini file, you could switch the domain to use mod_php… but we don’t recommend that for security reasons
To see what the values look like for your website, you could create a file named test.php, and for it’s contents, add the following into it:
<?php phpinfo(); ?>
And then access that in your browser… that will show you the PHP config variables being used.
Regarding the cron job – that’s a trickier question. It depends on how the cron job is being run
I’ve received notices the chronjob failed to finish due to a lack of memory, so I was trying to figure out what controls the memory available to run this job.