<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 20 Jun 2013 06:55:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Simon Holywell: Improve PHP session cookie security]]></title>
      <guid>http://www.phpdeveloper.org/news/19584</guid>
      <link>http://www.phpdeveloper.org/news/19584</link>
      <description><![CDATA[<p>
<i>Simon Holywell</i> has a new post talking about <a href="http://simonholywell.com/post/2013/05/improve-php-session-cookie-security.html">cookie security in PHP</a>, focusing on some of the PHP configuration settings that can help.
</p>
<blockquote>
The security of session handling in PHP can easily be enhanced through the use of a few configuration settings and the addition of an SSL certificate. Whilst this topic has been covered numerous times before it still bears mentioning with a large number of PHP sites and servers having not implemented these features.
</blockquote>
<p>
He talks about the <a href="https://www.owasp.org/index.php/HttpOnly">httponly</a> flag when setting the cookie/in the configuration, the "use only cookies" for sessions and forcing them to be "secure only".
</p>
Link: http://simonholywell.com/post/2013/05/improve-php-session-cookie-security.html]]></description>
      <pubDate>Tue, 14 May 2013 14:55:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Baking Cookies in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18274</guid>
      <link>http://www.phpdeveloper.org/news/18274</link>
      <description><![CDATA[<p>
On PHPMaster.com there's a new tutorial about <a href="http://phpmaster.com/baking-cookies-in-php/">working with cookies</a> in PHP applications - an introductory look at what they are, how to set them and how to read their values.
</p>
<blockquote>
Have you ever wondered that in spite of HTTP being a stateless protocol, when you log in to a website and buy stuff and checkout how the server can identify you uniquely? You might wonder if HTTP is stateless but your state is maintained through your interactions, isn't this a contradiction? Welcome to world of cookies (not the ones which we can eat, btw :)), one the of primary ways to maintain user state and interaction between the web browser and the web server.
</blockquote>
<p>
She shares a <a href="http://cdn.phpmaster.com/files/2012/07/bcookies-01.png">lifecycle</a> of a common cookie and describes the parts of the <a href="http://php.net/setcookie">setcookie</a> method (parameters). There's also a few code examples showing how to read and write to them as well as update their values/expirations.
</p>]]></description>
      <pubDate>Thu, 26 Jul 2012 08:07:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Philip Norton's Blog: Netscape HTTP Cooke File Parser In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16538</guid>
      <link>http://www.phpdeveloper.org/news/16538</link>
      <description><![CDATA[<p>
<i>Philip Norton</i> has <a href="http://www.hashbangcode.com/blog/netscape-http-cooke-file-parser-php-584.html">shared a script he's created</a> in a new post today that lets you read from a Netscape-formatted cookie file (as outputted from a curl request).
</p>
<blockquote>
This file is generated by PHP when it runs CURL (with the appropriate options enabled) and can be used in subsequent CURL calls. This file can be read to see what cookies where created after CURL has finished running. As an example, this is the sort of file that might be created during a typical CURL call.
</blockquote>
<p>
The file is structured, plain-text content with information on the domain, path, security, name and expiration details of each cookie. His script parses out these details and pushes them into a basic array, prime for searching and sorting (and reuse) in your application. 
</p>]]></description>
      <pubDate>Thu, 30 Jun 2011 09:09:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Tracking User Activity in PHP with Cookies and Sessions]]></title>
      <guid>http://www.phpdeveloper.org/news/16380</guid>
      <link>http://www.phpdeveloper.org/news/16380</link>
      <description><![CDATA[<>
On PHPBuilder.com today there's a new tutorial from <i>Leidago Noabeb</i> showing how you can track your website's users with the help of <a href="http://www.phpbuilder.com/columns/tracking-cookies-sessions/Leidago_Noabeb05242011.php3">sessions and cookies</a>, the handling for which are already included in PHP.
</p>
<blockquote>
So, why can't you maintain state with HTTP? The main reason is because HTTP is a stateless protocol, meaning that it has no built-in way of maintaining state between transactions. For example, when a user requests one page followed by another, HTTP does not provide a way for us to tell which user made the second request. In this article we will look at what maintaining state in PHP applications entails.
</blockquote>
<p>
They introduce cookies and how they can be used to store information about the user's session on their client for a certain amount of time. This makes it much simpler for the cross-page or cross-session details to persist. There's a bit of code showing how to set and get a cookie and how to do the same with a session.
</p>]]></description>
      <pubDate>Wed, 25 May 2011 08:53:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Evert Pot's Blog: Storing encrypted session information in a cookie]]></title>
      <guid>http://www.phpdeveloper.org/news/14789</guid>
      <link>http://www.phpdeveloper.org/news/14789</link>
      <description><![CDATA[<p>
<i>Evert Pot</i> has <a href="http://www.rooftopsolutions.nl/blog/storing-encrypted-session-information-in-a-cookie">a quick new post</a> to his blog today talking about how to push encrypted information into a cookie for storage.
</p>
<blockquote>
There have been a couple of approaches I've been considering [to replace sessions being stored in the database], one of which is simply storing all the information in a browser cookie. First I want to make clear I don't necessarily condone this. The reason I'm writing this post, is because I'm hoping for some more community feedback. Is this a really bad idea? I would love to know.
</blockquote>
<p>
He includes some code to make it happen - a class that uses the <a href="http://php.net/hash_hmac">hash_hmac</a> function and a SHA1 encryption type (along with a salt) to convert the information into a string that can be (relatively) safely stored in a cookie. Be sure to <a href="http://www.rooftopsolutions.nl/blog/storing-encrypted-session-information-in-a-cookie#comments">read the comments</a> for more opinions on the method.
</p>]]></description>
      <pubDate>Wed, 14 Jul 2010 09:13:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ProDevTips.com: Parsing with Zend HTTP Client]]></title>
      <guid>http://www.phpdeveloper.org/news/12101</guid>
      <link>http://www.phpdeveloper.org/news/12101</link>
      <description><![CDATA[<p>
On ProDevTips.com there's <a href="http://www.prodevtips.com/2009/03/09/parsing-with-zend-http-client/">a quick new tutorial</a> posted about using the Zend_Http component of the <a href="http://framework.zend.com">Zend Framework</a> to fetch a remote page that requires cookie authentication - a "cookie jar".
</p>
<blockquote>
As it happens I'm very satisfied with the performance of Zend Http when it comes to the fetching and cookie parts. [...] Note [in my example] the use of $client->setCookieJar();, that is all that is needed to manage the logged in state, awesome. Without it the second post to adv_stats.php would've failed due to unauthorized access.
</blockquote>
<p>
This fetching method pulls in the remote file, parses out the table (as defined by a pattern match) and grabs the rows/columns using getRows and getColumns and manipulates the content inside.
</p>]]></description>
      <pubDate>Tue, 10 Mar 2009 10:25:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Are You Making These 10 PHP Mistakes?]]></title>
      <guid>http://www.phpdeveloper.org/news/11877</guid>
      <link>http://www.phpdeveloper.org/news/11877</link>
      <description><![CDATA[<p>
All of you developers out there, NETTUTS.com has a question for you - are you making any of <a href="http://nettuts.com/articles/are-you-making-these-10-php-mistakes/">these ten PHP mistakes</a> in your day to day development? Which ones, you ask? Read on...
</p>
<blockquote>
Here are 10 PHP mistakes that any programmer, regardless of skill level, might make at any given time. Some of the mistakes are very basic, but trip up even the best PHP programmer. Other mistakes are hard to spot (even with strict error reporting). But all of these mistakes have one thing in common: They're easy to avoid.
</blockquote>
<p>Here's the list (as <i>Glen Stanberry</i> sees it):</p>
<ul>
<li>Single quotes, double quotes
<li>Semicolon after a While
<li>NOT Using database caching
<li>Missing Semicolon After a Break or a Continue
<li>Not Using E_ALL Reporting
<li>Not Setting Time Limits On PHP Scripts
<li>Not Protecting Session ID's
<li>Not Validating Cookie Data
<li>Not Escaping Entities
<li>Using Wrong Comparison Operators
</ul>]]></description>
      <pubDate>Wed, 04 Feb 2009 09:33:51 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Scott MacVicar' Blog: Stupid Bug Reports]]></title>
      <guid>http://www.phpdeveloper.org/news/11855</guid>
      <link>http://www.phpdeveloper.org/news/11855</link>
      <description><![CDATA[<p>
Most of the bugs that get reported to the PHP project are pretty useful. They help developers track down those small, random issues that might slip through the cracks otherwise. There are, however, some of them that make you wonder a bit about the person that submitted them <i>Scott MacVicar</i> takes a look at a few of them in <a href="http://www.macvicar.net/blog/2009/02/stupid-bug-reports.html">a new blog post</a>.
</p>
<blockquote>
Recently the PHP project has been receiving an increasing number of rather silly reports, these vary from simply not reading the manual, searching the internet or a fundamental lack of understanding how the internet works.
</blockquote>
<p>
He points out three in particular (from the same person, no less) about things that shown an almost complete lack of understand of what PHP does. One was a request to make PHP <a href="http://bugs.php.net/bug.php?id=46856">use less CPU</a> and another asking to make PHP <a href="http://bugs.php.net/bug.php?id=46875">censorship free</a> and, finally, <a href="http://bugs.php.net/bug.php?id=47248">a request to make PHP more secure</a>...by doing away with support for cookies. 
</p>
<p>
<i>Scott</i> also suggests a few constructive things you can do before submitting a good (useful) bug report:
</p>
<ul>
<li>Gather together as much relevant information as you can (generalizations are bad)
<li>Run performance checks against older PHP versions to try to pin down when the bug was added
<li>And, finally: "don't get aggressive or be an asshole when your bug reports get closed".
</ul>]]></description>
      <pubDate>Mon, 02 Feb 2009 09:34:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukas Smith's Blog: One thumb up and two down (Zend_Http_Client)]]></title>
      <guid>http://www.phpdeveloper.org/news/10418</guid>
      <link>http://www.phpdeveloper.org/news/10418</link>
      <description><![CDATA[<p>
Coming back from some <a href="http://www.phpdeveloper.org/news/10381">previous comments</a> about the Zend_Http_Client in the Zend Framework, <i>Lukas Smith</i> admits that a <a href="http://framework.zend.com/manual/en/zend.http.client.adapters.html#zend.http.client.adapters.proxy">certain feature</a> has come in handy with their development, but another bug has come up that has gotten under his skin - a problem with the component's cookie handling.
</p>
<blockquote>
We ran into a really hard to find <a href="http://framework.zend.com/issues/browse/ZF-1850">bug in the cookie handling</a> of Zend_Http_Client, which has been filed as a bug back in August 2007 against version 1.0.1 (today we are at 1.5.2). More over this is a bug that other similar packages have <a href="http://pear.php.net/bugs/bug.php?id=1080">gotten over in 2004</a>.
</blockquote>
<p>
He had to use <a href="http://www.wireshark.org/">wireshark</a> to finally track down the culprit - a call to urlencode on the contents of the cookie before sending it. He also includes some code to overcome a problem he had with UTF-16 in one of his feeds (a custom function that takes in and returns a string translated correctly).
</p>]]></description>
      <pubDate>Mon, 16 Jun 2008 09:32:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPFreaks.com: Sessions and cookies: Adding state to a stateless protocol]]></title>
      <guid>http://www.phpdeveloper.org/news/10349</guid>
      <link>http://www.phpdeveloper.org/news/10349</link>
      <description><![CDATA[<p>
On the PHPFreaks website, there's a <a href="http://www.phpfreaks.com/tutorial/sessions-and-cookies-adding-state-to-a-stateless-protocol">new tutorial</a> talking about sessions and cookies in PHP:
</p>
<blockquote>
HTTP is a stateless protocol. This means that each request is handled independently of all the other requests and it means that a server or a script cannot remember if a user has been there before. However, knowing if a user has been there before is often required and therefore something known as cookies and sessions have been implemented in order to cope with that problem.
</blockquote>
<p>
The <a href="http://www.phpfreaks.com/tutorial/sessions-and-cookies-adding-state-to-a-stateless-protocol">tutorial</a> is pretty introductory, so if you're not new to the PHP world, you won't learn much. New developers, though, will learn how to set cookies, use sessions and learn a bit about the security of both.
</p>]]></description>
      <pubDate>Thu, 05 Jun 2008 12:05:11 -0500</pubDate>
    </item>
  </channel>
</rss>
