<?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>Tue, 21 May 2013 21:15:21 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Oscar Merida's Blog: Using bcrypt to store passwords]]></title>
      <guid>http://www.phpdeveloper.org/news/18100</guid>
      <link>http://www.phpdeveloper.org/news/18100</link>
      <description><![CDATA[<i>Oscar Merida</i> has a recent post to his blog about <a href="http://oscarm.org/2012/6/using-bcrypt-store-passwords">using the bcrypt functionality</a> to more securely store the password information for your application's users.
</p>
<blockquote>
<p>
The linkedin password breach highlighted once again the risks associated with storing user passwords. I hope you are not still storing passwords in the clear and are using a one-way salted hash before storing them. But, the algorithm you choose to use is also important. [...] The choice, at the moment, seems to come down to SHA512 versus <a href="http://en.wikipedia.org/wiki/Bcrypt">Bcrypt</a> encryption.
</p>
<p>
[...] I wanted to switch one of my personal apps to use bcrypt, which on php means using Blowfish encryption via the crypt() function. There's no shortage of classes and examples for using bcrypts to hash a string. But I didn't find anything that outlined how to setup a database table to store usernames and passwords, salt and store passwords, and then verify a login request.
</p>
</blockquote>
<p>
He shows you how to set up a simple "users" table and the code for a "save_user" method that takes in the username/password and generates a salt and calls <a href="http://php.net/crypt">crypt</a> on it with the Blowfish prefix on the string ($2a$). His login check function ("validate_user") then takes the user's input, does the same hashing and checks the result.
</p>]]></description>
      <pubDate>Fri, 15 Jun 2012 10:52:41 -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[Alvaro Videla's Blog: Erlang as a Fast Key Value Store for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14149</guid>
      <link>http://www.phpdeveloper.org/news/14149</link>
      <description><![CDATA[<p>
<i>Alvaro Videla</i> has submitted a new post he's written up combining PHP and Erlang yet again, but this time he's using it to just <a href="http://obvioushints.blogspot.com/2010/03/erlang-as-fast-key-value-store-for-php.html">store key/value pairs</a> rather than for <a href="http://www.phpdeveloper.org/news/13871">session data</a>.
</p>
<blockquote>
In this post I want to show you some of the neat things that can be done with the <a href="http://code.google.com/p/mypeb/">PHP-Erlang Bridge extension</a>: A Key Value Store. Erlang comes packed with a Key Value store in the form of the ETS module. This is database is pretty fast and efficient for storing the Erlang terms in memory.
</blockquote>
<p>
He tried a proof of concept to see how well the system would respond and was able to push over 150k items into the storage in one second. Sample code and instructions on getting the bridge working are included in the post.
</p>]]></description>
      <pubDate>Mon, 08 Mar 2010 13:37:51 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: How to setup multiple stores on different domains with Magento]]></title>
      <guid>http://www.phpdeveloper.org/news/12428</guid>
      <link>http://www.phpdeveloper.org/news/12428</link>
      <description><![CDATA[<p>
On Till Klampaeckel's blog <a href="http://till.klampaeckel.de/blog/archives/27-How-to-setup-multiple-stores-on-different-domains-with-Magento.html">this recent post</a> shows you how to (quick and easy) set up multiple Magento stores on different domains with the same codebase.
</p>
<blockquote>
Multiple stores is probably the killer feature of the Magento Commerce store. It enables the needy to manage multiple stores through a single interface. Your very own mall in a box. It's also a management/deployment <strike>nightmare</strike>dream come true. A single piece of software powering multiple websites.
</blockquote>
<p>
He sets up his directory structure and shows how to alias certain directories to ones in the local document root so that the application will find things correctly. Drop in a custom index.php "bootstrap" file to run the application and you should be all set.
</p>]]></description>
      <pubDate>Wed, 29 Apr 2009 12:05:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[David Goodwin's Blog: Storing PHP objects in a database (please no!)]]></title>
      <guid>http://www.phpdeveloper.org/news/12133</guid>
      <link>http://www.phpdeveloper.org/news/12133</link>
      <description><![CDATA[<p>
<i>David Goodwin</i> has a suggestion for those developers that think storing objects in a database is a good idea - <a href="http://codepoets.co.uk/storing-php-objects-database-please-no">don't do it!</a>
</p>
<blockquote>
Short answer: <b>DO NOT DO IT</b>. Longer answer:....I hate seeing serialized PHP objects within a database.
</blockquote>
<p>Some of his reasons include:</p>
<ul>
<li>It's difficult to index/search - you'll probably need to use a regexp.
<li>PHP Specific - good luck doing much with the data in a.n.other language
<li>If the objects are large, you're likely to have a text or a blob field - this will suck from a performance point of view (at least in MySQL)
<li>Why bother storing serialized objects in a database - surely to the filesystem would be better?
</ul>
<p>
Several opinions are expressed <a href="http://codepoets.co.uk/storing-php-objects-database-please-no#comments">in the comments</a> including some that agree with <i>David</i> and some that still defend the idea.
</p>]]></description>
      <pubDate>Fri, 13 Mar 2009 12:01:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jani Hartikainen's Blog: Zend_Acl part 3: creating and storing dynamic ACLs]]></title>
      <guid>http://www.phpdeveloper.org/news/11979</guid>
      <link>http://www.phpdeveloper.org/news/11979</link>
      <description><![CDATA[<p>
<i>Jani Hartikainen</i> has posted the <a href="http://codeutopia.net/blog/2009/02/18/zend_acl-part-3-creating-and-storing-dynamic-acls/">third part</a> of his series looking at access control and the Zend_Acl component of the <a href="http://framework.zend.com">Zend Framework</a>. This article focuses on creating and storing dynamic ACL lists in a database.
</p>
<blockquote>
As we have previously looked at ACLs which are hardcoded, we will now look at building a "dynamic" ACL. Previously shown "static" ACLs are good for quick and simple sites, but when you actually require the ability for administrators to define access rights on the fly using an admin panel, they quickly lose their usefulness.
</blockquote>
<p>
Dynamic lists provide more flexibility in handling the access control of your site - it allows you to only pull what you need (just that user) when you need it. His method uses an ACL factory class to create the Zend_Acl objects for each request. He includes an example of protecting an application used to serve out files to visitors. You can <a href="http://codeutopia.net/filesystem.zip">download the code</a> if you'd like to mess around with it yourself.
</p>]]></description>
      <pubDate>Thu, 19 Feb 2009 07:56:49 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Etienne Kneuss' Blog: SplObjectStorage for a fast and secure object dictionary]]></title>
      <guid>http://www.phpdeveloper.org/news/11700</guid>
      <link>http://www.phpdeveloper.org/news/11700</link>
      <description><![CDATA[<p>
<i>Etienne Kneuss</i> has <a href="http://www.colder.ch/news/01-08-2009/34/splobjectstorage-for-a-fa.html">posted a look</a> at using the SplObjectStorage functionality of the Standard PHP Library as a safe place to tuck away and protect your objects.
</p>
<blockquote>
In PHP, you basically need two things to safely identify an object: a object index, the handle, and the class handlers which is how the object will react internally. This set of handlers is actually a pointer, and since disclosing valid pointers is not something that should be done, spl_object_hash is simply providing a MD5 hash of those two values concatenated.
</blockquote>
<p>
Since arrays are hashed when they are created as well, your script is doubling the amount of work it has to do behind the scenes. Instead, <i>Etienne</i> suggests that you use a SplObjectStorage object instead of an array to keep objects inside. The unique identifier for it is then used directly (instead of rehashed, leaving it open for possible referencing collisions) to reference the object.
</p>]]></description>
      <pubDate>Thu, 08 Jan 2009 10:28:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Symfony Blog: Call the expert: A refactoring story (in Five Parts)]]></title>
      <guid>http://www.phpdeveloper.org/news/11059</guid>
      <link>http://www.phpdeveloper.org/news/11059</link>
      <description><![CDATA[<p>
In a five part series on the symfony blog, <i>Fabien Potencier</i> relates a call to the expert, a refactoring story where he helped out a fellow symfony developer with their first application.
</p>
<blockquote>
Some time ago, Vince, a seasoned PHP developer, asked me to have a look at his very first symfony project, a product store. As the mistakes he did were quite common, I decided to tell you the story of this refactoring session in the hope you will learn as much as Vince did
</blockquote>
<p>
Here's links to each of the five parts:
</p>
<ul>
<li><a href="http://feeds.feedburner.com/~r/symfony/blog/~3/395996234/call-the-expert-a-refactoring-story-part-1-5">Part 1</a>
<li><a href="http://feeds.feedburner.com/~r/symfony/blog/~3/396914161/call-the-expert-a-refactoring-story-part-2-5">Part 2</a>
<li><A href="http://feeds.feedburner.com/~r/symfony/blog/~3/397863121/call-the-expert-a-refactoring-story-part-3-5">Part 3</a>
<li><A href="http://feeds.feedburner.com/~r/symfony/blog/~3/398701864/call-the-expert-a-refactoring-story-part-4-5">Part 4</a>
<li><a href="http://feeds.feedburner.com/~r/symfony/blog/~3/399485018/call-the-expert-a-refactoring-story-part-5-5">Part 5</a>
</ul>]]></description>
      <pubDate>Mon, 22 Sep 2008 15:34:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Kimsal's Blog: Grails for PHP Developers Part 5]]></title>
      <guid>http://www.phpdeveloper.org/news/9663</guid>
      <link>http://www.phpdeveloper.org/news/9663</link>
      <description><![CDATA[<p>
<i>Michael Kimsal</i> <a href="http://michaelkimsal.com/blog/?p=467">points out</a> the posting of the latest part of his "Grails for PHP developers" series to his blog site - <a href="http://michaelkimsal.com/blog/?page_id=451">Part Five</a> of the series.
</p>
<blockquote>
I've put up the latest installment in my "Grails for PHP developers".  Rather than delve too much more in to Grails head on, I'm taking this installment (and at least the next one) to delve more in to the Groovy language itself.  Groovy offers similarities to PHP, but also many differences which can trip you up if you're not careful.  I'll try to lay those out as best I can in the next couple of installments.
</blockquote>
<p>
This <a href="http://michaelkimsal.com/blog/?page_id=451">new part</a> of the series goes back and puts the spotlight on GRoovy, the base of the Groovy/Grails combo. He talks about working with variables and arrays as containers for multiple pieces of data and some possible gotchas that could come up along the way.
</p>]]></description>
      <pubDate>Tue, 19 Feb 2008 12:02:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: Putting files into a database]]></title>
      <guid>http://www.phpdeveloper.org/news/8898</guid>
      <link>http://www.phpdeveloper.org/news/8898</link>
      <description><![CDATA[<p>
In a <a href="http://doughboy.wordpress.com/2007/10/19/putting-files-into-a-database/">recent blog post</a>, <i>Brian Moon</i> talks about doing something he never thought he'd do - storing files in a database. He does, however, have two legitimate places he's found it useful.
</p>
<blockquote>
Now, most people will say you should never do this.  And lots of time they are right.  And once upon a time I agreed with them without question.  Then I started living in the real world where sometimes you have to do things you never thought you would.  Here are the two places where I stores files in a database.
</blockquote>
<p>
His places are in Phorum, using the method to keep the system's database and file attachments contained and easier to move around, and in the replication of their databases, making it simple to have images for the deals on <a href="http://dealnews.com/">dealnews</a> transferable to the various slave databases.
</p>
]]></description>
      <pubDate>Wed, 24 Oct 2007 11:24:00 -0500</pubDate>
    </item>
  </channel>
</rss>
