In VirtualMin we have
ServerConfiguration --> Web Site Options - PHP Execution mode --> FCGId
but http://thisdomain.com/info.php loads /etc/php.ini
This is blowing session management because sessions are written to:
/var/lib/php/session and owner “ThisDomain” cannot access that directory outside /home
/home/himalayan/etc/php.ini # as it should and then looks to
/etc/php.ini for includes.
If I go to the Services --> PHP 5 Configuration window for any domain we see
MANAGE PHP CONFIGURATION (centered underneath:)
but if I click the link to “Module Index” it goes to /etc/php.ini
which reflects the same behavior as a top level php page and sessions under 'http" (but https) works as expected.
? FYI this is a new server installation and we upgraded php along the way after installing VirtualMin. I have run the reload modules command already a couple of times in the process, but this behavior does not change.
Which Linux distribution/version is it that you’re using there? And how did you perform the installation, did you use the install.sh script?
If you go into System Settings -> Re-Check Config. does it notice any problems?
- Yes, I used the install.sh
- server settings appear OK except we have this report:
Default IP address is set to 184.108.40.206, but the detected external address is actually 220.127.116.11. This is typically the result of being behind a NAT firewall, and should be corrected on the module configuration page.
I’m not exactly where to change that or even if it is wise: eth0 is 18.104.22.168 and 22.214.171.124 is what ServePath refers to as the VLAN/Router address for the machine and “should not be used by you for anything” though I do certainly need to use it for the SPF text records at SOA because that is the IP from which mail comes…
Other than that… we have no other errors
I’m having this problem as well with one domain. Unfortunately, it’s a rather important one for me, as without it - I can’t bill anyone.
The sessions being written to the wrong place, and therefore not being able to be written (no permissions).
Anyone have any insight?
Good news is we solved this, bad news is my support team (which includes me) are not good with documentation on solutions. I think it was as simple as
setting php to execution to FCGid (as virtual domain owner “bigfish”)
set the sessions directory to /home/bigfish/tmp (so that PHP, acting as “bigfish” will definitely have permisisons to read and write anywhere in /home/bigfish
I also set the errors log to /home/bigfish/etc/php5/php-error.log
for all domains onthe box because previously all php errors, from all domains were being aggregated into a single /etc/php/errors log.
#3 has nothing to do with your problem, but may help sorting things out. because you can tail that log and see only errors pertaining to that one domain.
Disclaimer: my wizard guys may have done some thing else too and simply told me “I fixed it.” But not how.