News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Brian Moon's Blog:
PHP session cookie refresh
0 comments :: posted Wednesday May 14, 2008 @ 12:51:02
voice your opinion now!

Brian Moon has posted a tip (and a bit of code) he's worked up to help make a users cookies last a bit longer than they were originally designed to:

When you start a session, if the user had no cookie, they get a new session id and they get a cookie. You can configure that cookie to last for n seconds via php.ini or session_cookie_set_params(). But, and this is a HUGE but for me, that cookie will expire in n seconds no matter what.

His method provides a way to extend the life of the cookies currently set for the domain by changing the time to live through a series of ini_get calls wrapped in a setcookie() call.

tagged with: cookie session refesh timetolive setcookie iniset


Stoyan Stefanov's Blog:
www vs no-www and cookies
0 comments :: posted Wednesday May 14, 2008 @ 11:18:39
voice your opinion now!

Stoyan Stefanov has come up against one of the frustrations of web development involving cookies - problems caused by the switch from a "www." in the host to none. He's come up with a test to show you how cookies are set and where you can access them from.

One of the implications of following the rule is related to the whole www vs no-www question. Basically you should always use www if you're planning to use any other sub-domains and you want them cookie-free. This is because you have no way to set a cookie only to the top-level domain.

His code sets cookies for the ".phpied.com", "phpied.com" and "www.phpied.com" domains. Since the domains without the "www" offer a bit broader range of possible matches, he recommends that if you're ever going to use any kind of subdomain, you'll want to use the more broad cookie to cover it.

tagged with: cookie hostname test board coverage

Ed Finkler's Blog:
Encouraging steps towards security in Wordpress 2.5
0 comments :: posted Wednesday April 02, 2008 @ 21:09:47
voice your opinion now!

Ed Finkler, not normally a big fan of the WordPress PHP-based blogging system, has pointed out some positive steps that were made in the latest release in the security arena.

Anyone who gets me liquored up knows that I'm not a fan of Wordpress. I think it's great from a user (that is, the person writing the content) standpoint, but it has lagged behind severely in terms of security, and I don't believe its popularity is the sole reason WP has been the subject of dozens of vulnerability reports every year. That being said, the WP 2.5 release appears to offer significant improvements in a couple areas: password hashes and cookie data encryption.

He mentions two things in particular - their addition of salted passwords and secure cookies.

tagged with: wordpress security secure cookie password hash blog

Brian Moon's Blog:
Responsible use of the $_REQUEST variable
0 comments :: posted Tuesday January 22, 2008 @ 09:38:00
voice your opinion now!

In one of his recent blog entries, Brian Moon takes a look at what he considers the "proper use" of the PHP superglobal $_REQUEST (as brought on by a thread on the PHP internals mailing list.

I have seen more than one person make the following logic mistake: I may get data via GET, I may get data via POST - Ah, I should use $_REQUEST as it will catch both.

Brian points out the error - cookies aren't in $_REQUEST so improper handling of those values could lead to cookie data overwriting GET/POST data from $_REQUEST. Several of the comments on the post also warn against improper handling of the values, noting that doing so could lead to holes open for attacks (like session fixation).

tagged with: get post request superglobal cookie security merge


release application releases mysql job database book package code cakephp zend security framework PHP5 ajax PEAR zendframework pecl conference developer

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