Hi
I have a domain domain.com and subdomain sub.domain.com Those two domains have different ftp users (user1, user2) belonging to the same group (usergroup) on linux environment. Finally I have the same PHP application that uses sessions on both domains (one is live and other is testing environment).
When I go to domain.com without going first to sub.domain.com, PHP session file is created in default folder /tmp/ with proper permissions 600 and user1:usergroup, when I access sub.domain.com without going first to domain.com, a file is created with permissions 600 and user2:usergroup.
All is great for all browsers but IE (please do not focus on this). What I found out is that when I access sub.domain.com and then try domain.com PHP tries to read the same session file but has no permissions and page is loading indefinitely. Changing ownership of the file to user1 makes domain.com work but prevents sub.domain.com from working.
How to make Apache or PHP create different files for sessions or make them accessible from both domains.
P.S. Like I said for some weird reason this happens only for IE and the error message from PHP is: Uncaught PHP Error: session_start() [function.session-start]: open(/tmp/sess_t1..., O_RDWR) failed: Permission denied (13) in file xxx.php on line 46 on line on line 46 is session_start();
Thank you for any advice in this.