[nycphp-talk] Session problem on virtual host?

Stephen Musgrave stephen at
Wed Jan 19 19:05:12 EST 2005

List -

I am having a problem with a content management system that I wrote 
running on a Speakeasy shared host.  I use session to store variables 
to maintain state such as the primary key ID for a content row I am 

For the most part, this works really well, but from time to time 
something goes wrong and it feels like the session gets wiped out or a 
formerly used primary key ID reappears into the session, overwriting 
the current primary key ID and causes me to overwrite that record in 
the database.

I haven't actually witnessed this occurrence, as it happens only about 
5 percent of the time, according to the person who is reporting it.

I think I have read somewhere in passing that if shared hosts are not 
setup properly, sessions from other virtual domains can conflict or 
that session is flaky altogether.

I have reason to suspect that the server isn't setup properly because 
when I use $_SERVER['DOCUMENT_ROOT'], it points to a directory that is 
somewhere else in the file system.  Somebody told me that this is 
because they are cheating and using symbolic links.  I'm not a server 
guy and I haven't been able to get a straight answer from the hosting 
provider support staff.

I should note that this CMS has run on at least 5 other shared hosting 
environments and it has been a problem.



More information about the talk mailing list