Interview Question in SQL Server Security


 

Interview Question :: PHP session problems on shared servers


Hello,

I have built a few websites now with PHP sessions. They always work fine on my computer when I test them, but I always have many problems with users. Most of the solutions that I find online all recommend that I modify the php.ini file which I can’t do because these sites are on shared hosting accounts. Here are the main problems...

Proxy Servers - When people are in a corporate environment and have their security cranked up or are behind proxy servers none of the session variables work. This ruins everything from the shopping cart even to the login. I have looked at my script over and over and it seems basic and works on all the computers I test so I don't think that's the issue.

Cookies - The only time I have problems are if I disable cookies. I that cookies aren't even used on the users computer, only the server? That confuses me even more. I tried a script that saves session data to a SQL database?

How do sites like Amazon deal with sessions?
Answers to "PHP session problems on shared servers"
RE: PHP session problems on shared servers?

I don't know about the proxy settings, but cookies are stored on the user's PC. All the cookie has to store is the sessionid, but that is critical because that is how it connects the user to the session. There will be a file stored the server that contains all of the session information. So a user must use cookies, or they won't be able to use sessions.
 
Vote for this answer ::  
Update Alert Setting