My host (one) is not allowing me to change the php.ini file and nor can I find it (I probably don't have read access to it even). When I am trying to make session variables go across subdomains I can't since the session cookie is set for the main domain only (example.com
). I would like it to be set for .example.com
I have tried to set the php ini file to allow this.
ini_set('session.cookie_domain', '.example.com');
That did not work because I am not allowed to run the ini_set()
function. I also tried finding the php.ini file but could not find it in my FTP client. Using phpinfo()
wields me it is in /etc/php
but I don't have access to that directory.
I expect this to work but clearly it does not. Checking the developer console in Firefox the domain path for the PHPSESSID
cookie is still example.com
and not .example.com
Is there any workaround other than setting the session variables on the correct subdomain from the start?