I need to know if I created millions upon millions of $_SESSIONs do you think this would overload a server? this site is getting millions of hits and sessions will be more secure for us. thanks for your help
Unless you have unlimited bandwidth, or you were setting hundreds or thousands of session variables, I think you would see performance degradation in several other areas before sessions could ever cause a problem.
One thing you can so is look at your session_save_path in php.ini. Watch the available space in that location if you are worried. Session data is stored there, so you should get a good idea on whether it is going to cause a problem. Also keep in mind that session data is destroyed after a certain amount of time.
ya I guess it makes sense, PHP probably wouldnt have even implemented sessions if they werent able to be used on a mass scale. thanks for your help
5 variables per session shouldn't be a real problem. although what you can do is set the session to timeout faster, and just make known to users that transactions expire after x amount of time or something.
PHP saves sessions in a single folder, keep in mind that the server would need to search through one file for every active session for every request. That means if you have 1 million active sessions, the server will have to search through 1 million files to fnd the session when the user requests the page, then do that again when the browser comes back for CSS, JS, images, etc, every one of them. I don't think you should even think about it unless you setup a RAM based session_save_handler such as memcached.
Php language has designed to handle million session realtime. Maybe Your hosting performance could be the main problem.