<?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>Mon, 21 May 2012 08:56:44 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Dave Marshall's Blog: Defending against Cache Stampedes]]></title>
      <guid>http://www.phpdeveloper.org/news/17393</guid>
      <link>http://www.phpdeveloper.org/news/17393</link>
      <description><![CDATA[<p>
<i>Dave Marshall</i> has a new post to his blog showing one method for <a href="http://davedevelopment.co.uk/2012/01/13/defending-against-cache-stampedes.html">defending against cache stampedes</a> from assaulting your caching servers and (possibly) bringing them down.
</p>
<blockquote>
I've recently had a problem with a rather large operation (that could probably be optimised considerably, but nevermind), where by if the cached result of the operation expired, several web server threads would attempt the operation, causing some major headaches for our database and web servers. This is something I've come across before, and is commonly(?) known as a <a href="http://en.wikipedia.org/wiki/Cache_stampede">Cache Stampede</a>. This is bad, this post describes the basics of what I've done to deal with it.
</blockquote>
<p>
His example uses a Zend_Cache interface to Memecache, but it could be applied in other places too. His method uses a <a href="http://en.wikipedia.org/wiki/Semaphore_%28programming%29">binary semaphore</a> to check and see if there's a "lock" and sleep for a bit before checking again. Sample code is included showing how to create this system and how to refresh the data with a new expiration on a cache miss.
</p>]]></description>
      <pubDate>Fri, 13 Jan 2012 13:13:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP.net: PHP 5.4.0RC4 Released!]]></title>
      <guid>http://www.phpdeveloper.org/news/17313</guid>
      <link>http://www.phpdeveloper.org/news/17313</link>
      <description><![CDATA[<p>
The latest version of PHP in the 5.4.0 release candidate series <a href="http://www.php.net/index.php#id2011-12-25-1">has been posted</a> - PHP 5.4.0 RC4</a>, complete with new features and lots of bugfixes.
</p>
<blockquote>
The PHP development team is proud to announce the 4th release candidate of PHP 5.4. PHP 5.4 includes new language features and removes several legacy (deprecated) behaviours. Windows binaries can be downloaded from the Windows QA site. THIS IS A RELEASE CANDIDATE - DO NOT USE IT IN PRODUCTION! This is the 4th release candidate. The release candidate phase is intended as a period of bug fixing prior to the stable release. No new features should be included before the final version of PHP 5.4.0.
</blockquote>
<p>
Updates in this release candidate include an update to the max_input_vars directive and a fix for a segfault in the traits code. You can find the full notes for the release in the <a href="https://svn.php.net/repository/php/php-src/tags/php_5_4_0RC4/NEWS">NEWS</a> file and can download the latest from the PHP.net site - <a href="http://www.php.net/downloads.php">source downloads</a>, <a href="http://windows.php.net/qa/">Windows binaries</a>.
</p>]]></description>
      <pubDate>Wed, 28 Dec 2011 08:55:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP.net: PHP 5.4 beta2 released]]></title>
      <guid>http://www.phpdeveloper.org/news/17050</guid>
      <link>http://www.phpdeveloper.org/news/17050</link>
      <description><![CDATA[<p>
The PHP.net site has a <a href="http://www.php.net/index.php#id2011-10-26-1">new announcement</a> about the latest version of the language in the PHP 5.4.x series - beta 2 has <a href="http://www.php.net/downloads.php">been released</a> for testing.
</p>
<blockquote>
The PHP development team is proud to announce the second <a href="http://qa.php.net/">beta release</a> of PHP 5.4. PHP 5.4 includes new language features and removes several legacy (deprecated) behaviours. Windows binaries can be downloaded from the <a href="http://windows.php.net/qa/">Windows QA site</a>. [...] Please help us to identify bugs by testing new features and looking for unintended backward compatibility breaks, so we can fix the problems and fully document intended changes before PHP 5.4.0 is released. Report findings to the <a href="php-qa@lists.php.net">QA mailing list</a> and/or the <a href="https://bugs.php.net/">PHP bug tracker</a>.
</blockquote>
<p>
Remember - this is <b>not</b> a production release, so do not use it in your live applications (unless you really like to live dangerously, of course). You can look at <a href="http://www.php.net/releases/NEWS_5_4_0_beta2.txt">the NEWS file</a> for a complete list of changes.
</p>]]></description>
      <pubDate>Thu, 27 Oct 2011 10:12:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Some notes on SQL Server blobs with sqlsrv]]></title>
      <guid>http://www.phpdeveloper.org/news/15470</guid>
      <link>http://www.phpdeveloper.org/news/15470</link>
      <description><![CDATA[<p>
In <a href="http://akrabat.com/php/some-notes-on-sql-server-blobs-with-sqlsrv/">this new post</a> to his blog, <i>Rob Allen</i> has posted notes on some of his experience in working with blobs with SQL Server using UTF-8.
</p>
<blockquote>
This turned out to be easy enough: Use ntext, nvarchar types in the database and add resources.db.params.driver_options.CharacterSet = "UTF-8" to your application.ini 
</blockquote>
<p>
He also includes some code to fix a problem he spotted with storing binary data into a varbinary field giving him an error about string translation. The fix came in the way of replacing the direct <a href="http://php.net/file_get_contents">file_get_contents</a> assignment to a variable over to a binding method that specified the data type as well.
</p>]]></description>
      <pubDate>Mon, 22 Nov 2010 11:15:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Unpacking binary data in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15170</guid>
      <link>http://www.phpdeveloper.org/news/15170</link>
      <description><![CDATA[<p>
<i>Sameer Borate</i> has <a href="http://www.codediesel.com/php/unpacking-binary-data/">a new post</a> to his blog today talking about a method for unpacking binary data directly in PHP - specifically in working with images.
</p>
<blockquote>
To set the stage we will start with a programming problem, this will keep the discussion anchored to a relevant context. The problem is this : We want to write a function that takes a image file as an argument and tells us whether the file is a GIF image; irrelevant with whatever the extension the file may have. We are not to use any GD library functions.
</blockquote>
<p>
He shows how to use the <a href="http://php.net/manual/en/function.unpack.php">unpack</a> function to open up the file and pull out the raw data - including the header information that tells you what kind of file it is you're working with. There's also an example of unpacking the header contents and grabbing things like height, width and the aspect of the image.
</p>]]></description>
      <pubDate>Wed, 22 Sep 2010 10:45:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Using CouchDb as filesystem with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15061</guid>
      <link>http://www.phpdeveloper.org/news/15061</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Gonzalo Ayuso</i> shows an interesting use for the CouchDB tool - using it <a href="http://gonzalo123.wordpress.com/2010/08/30/using-couchdb-as-filesystem-with-php/">as a filesystem</a> for cross-server handling of things like images or other binary resources.
</p>
<blockquote>
One of the problems I need to solve in my <a href="http://gonzalo123.wordpress.com/2010/07/27/clustering-php-applications-tips-and-hints/">clustered PHP applications</a> is where to store files. When I say files I'm not speaking about source code. I'm speaking about additional data files, such as download-able pdfs, logs, etc. Those files must be on every node of the cluster. [...] CouchDb has two great features to meet or requirements with this problem. It allows us to store files as attachments and it also allows to perform a great and very easy multi-master replica system.
</blockquote>
<p>
He shows how use <a href="http://gonzalo123.wordpress.com/2010/01/09/building-a-simple-http-client-with-php-a-rest-client/">two</a> <a href="http://gonzalo123.wordpress.com/2010/03/15/php-and-couchdb/">libraries</a> he's created to connect to the CouchDB instance and, based on <a href="http://gonzalo123.files.wordpress.com/2010/08/couchdb_fs1.png">this structure</a>, be able to insert the content - a text file in this case - pull it back out, get the meta data about it and even move it to another location in the structure.
</p>]]></description>
      <pubDate>Wed, 01 Sep 2010 13:41:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 2]]></title>
      <guid>http://www.phpdeveloper.org/news/15037</guid>
      <link>http://www.phpdeveloper.org/news/15037</link>
      <description><![CDATA[<p>
<i>Kevin Schroeder</i> has <a href="http://www.eschrade.com/page/want-what-with-chapter-4c77e335">posted a new book excerpt</a> from his "You Want to Do WHAT with PHP?" book - chapter two dealing with binary protocols.
</p>
<blockquote>
PHP developers know text really, really well.  We can write SQL, we can build HTML, we can work with XML.  But computers don't speak in terms of structured text markup, they speak in terms of bytes.  And while there are many PHP developers who can speak at the lower level of bytes and bits and such, there are many more that have difficulty there.  
</blockquote>
<p>
His short excerpt (from a very long chapter) talks about working with DNS information and how you can send requests (similar to the unix "host" command) and parse them correctly. Some sample code is provided to make a request for a record on mcpressonline.com and the output it would produce.
</p>]]></description>
      <pubDate>Fri, 27 Aug 2010 08:09:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeremy Cook's Blog: Handling Binary Data with PDO]]></title>
      <guid>http://www.phpdeveloper.org/news/14125</guid>
      <link>http://www.phpdeveloper.org/news/14125</link>
      <description><![CDATA[<p>
<i>Jeremy Cook</i> has put together a quick guide for something that can be tricky when using PDO in PHP - <a href="http://jeremycook.ca/2010/02/21/handling-binary-data-with-pdo/">handling binary data</a> in the return from your queries.
</p>
<blockquote>
I like the fact that if I needed to use MS SQL Server, Oracle or any of the other big RDBMS's I could use the same PDO syntax to access them rather than learning a new database access library. However, there do seem to be some bugs in PDO  according to what I've read on the web. While I haven't encountered most of them and can't comment on them I'd like to write about one that I ran into the other day and how I worked around it.
</blockquote>
<p>
He was storing images in the database and pushing the information into the database was working fine. When he tried to pull the contents back out, however, the information wasn't being handled correctly (according to the example in the <a href="http://www.php.net/manual/en/pdo.lobs.php">PHP manual</a>) because of a differing return value for the fetch call - sometimes it's a string but, in this case, it's binary data so it needs to just be passed on through.
</p>]]></description>
      <pubDate>Wed, 03 Mar 2010 14:48:56 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Math & Number Handling in PHP - The ABCs of PHP Part 6 ]]></title>
      <guid>http://www.phpdeveloper.org/news/12383</guid>
      <link>http://www.phpdeveloper.org/news/12383</link>
      <description><![CDATA[<p>
On PHPBuilder.com today they've <a href="http://www.phpbuilder.com/columns/peter_shaw04202009.php3">posted the next article</a> in their "ABCs of PHP" series. This time they focus on math and number handling.
</p>
<blockquote>
Last time we looked at text and strings in variables, in this episode we're going to continue with our exploration of PHP variables and delve deeper into math and number handling in PHP. Using numbers is not much different to using text and strings, you allocate variables and fill them in, using exactly the same techniques as you do using strings & text. 
</blockquote>
<p>
They covers some of the basic operators (+,-,*,etc), evaluation with equals, number shifting, binary and creating a "barrel shifter" to work with the binary bits of a number.
</p>]]></description>
      <pubDate>Wed, 22 Apr 2009 07:57:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: The ABC's of PHP II - What do I need to make it work?]]></title>
      <guid>http://www.phpdeveloper.org/news/12137</guid>
      <link>http://www.phpdeveloper.org/news/12137</link>
      <description><![CDATA[<p>
<i>Peter Shaw</i> has <a href="http://www.phpbuilder.com/columns/peter_shaw031301.php">posted the second part</a> of his introductory series to PHP - "The ABCs of PHP". In this new article <i>Peter</i> looks at the installation and configuration of PHP on your platform of choice (Windows or Linux-based).
</p>
<blockquote>
PHP runs on all the major computing platforms available today, this includes all versions of windows, all the major linux distro's and a lot of specialist systems for devices like the Cobalt Raq and a lot of embedded devices. In this article however we will be concentrating on running PHP under the Apache and IIS web servers, which between the two covers approx 95% of the systems most people will have access to. 
</blockquote>
<p>
He uses packages on the linux installation to make things simple (for a basic Apache2 and PHP5) and the PHP and Apache binaries from each project on the Windows platform.
</p>]]></description>
      <pubDate>Mon, 16 Mar 2009 07:58:31 -0500</pubDate>
    </item>
  </channel>
</rss>

