325ey Posted March 15, 2010 Share Posted March 15, 2010 Hi all, Quick question - I'm developing a form to webservice system and using a PHP session for as part of the server side validation. Basically if I get an error response from the server I'm submitting to, I return the person to the form page and use a php session to bring the original form data and errors with them. Pretty common I think. My question is, how likely is it that a php session will fail? And so the system. If a failure occurs I'm expecting it to normally be because the persons browser will not accept the session cookie, can I get around this? I don't really want to append a session ID to the URL as the CMS I'm using is being difficult about it but would this be a safe gaurd? Thanks. Link to comment https://forums.phpfreaks.com/topic/195324-php-sessions-full-proof/ Share on other sites More sharing options...
Wolphie Posted March 15, 2010 Share Posted March 15, 2010 What about using cookies? I've never heard of a session failing, however if the users browser doesn't accept sessions then this could be a problem. I'd attempt using cookies and then as a fallback I'd temporarily store their form data in a database. Although, personally I'd rather store the data in the URL as a fallback. Link to comment https://forums.phpfreaks.com/topic/195324-php-sessions-full-proof/#findComment-1026437 Share on other sites More sharing options...
simshaun Posted March 15, 2010 Share Posted March 15, 2010 If the data needs to be secure, avoid passing a session ID around in the URL if at all possible. Allowing it opens up the possibility of session hijacking via session fixation. Link to comment https://forums.phpfreaks.com/topic/195324-php-sessions-full-proof/#findComment-1026484 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.