News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Tom Rawcliffe's Blog:
session_start() blocking in php
May 25, 2011 @ 10:46:21

Tom Rawcliffe has a new post to his blog talking about an issue he found when trying to optimize a site for his company's systems - a problem with the blocking sessions caused when the pages were loaded.

Now I didn't know it but is seems that php's session handling is blocking on a per request basis. Kinda makes sense if you think about it, that if two requests simultaneously try and change a session variable then you would get constancy issues. So php handles this by making session_start() a blocking action and will wait for any other request to either finish or close the session using session_write_close().

The only reliable fix he found for the issue was to only selectively use the session in certain circumstances (or on certain pages) and closing it out when you were done with it.

0 comments voice your opinion now!
sessionstart blocking page load issue


blog comments powered by Disqus

Similar Posts

PHP Security Blog: A Trio of Javascript Issues

Pierre-Alain Joye's Blog: Zip-1.7.5 works even with broken path

Hasin Hayder's Blog: International PHP-Magazine - Is it dead?

Sanisoft Blog: Radio button issues while migrating from cakePHP-1.2alpha app to 1.2prebeta

NETTUTS.com: 404/403 Website Error Pages With PHP Auto-Mailer


Community Events











Don't see your event here?
Let us know!


introduction database symfony2 framework performance package install example language podcast component facebook project hhvm security application hack composer release unittest

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework