<?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>Wed, 22 May 2013 06:43:31 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Sebastian Bergmann: Using PHPUnit from a PHP Archive (PHAR)]]></title>
      <guid>http://www.phpdeveloper.org/news/18568</guid>
      <link>http://www.phpdeveloper.org/news/18568</link>
      <description><![CDATA[<p>
<a href="http://phpunit.de">PHPUnit</a>, the popular PHP unit testing tool, has undergone some changes in its methods of deployment. First it was integrated into the <a href="https://packagist.org/packages/phpunit/phpunit">Composer/Packagist</a> dependency management system and now it's <a href="http://sebastian-bergmann.de/archives/924-Using-PHPUnit-from-a-PHP-Archive-PHAR.html">been implemented as a <a href="http://php.net/phar">phar</a> archive. <i>Sebastian Bergmann</i> explains how to use it in his latest post.
</p>
<blockquote>
Downloading a single file to use PHPUnit? Not an idea that is too phar out anymore! Starting with version 3.7.5, PHPUnit seems to finally work correctly when packaged as a PHP Archive (PHAR).
</blockquote>
<p>
He includes a list of steps you can follow to pull down the latest code and use the phar branch that executes with the archive file instead of the local "phpunit" executable. Of course, you can still (as always) install PHPUnit via the <a href="http://pear.phpunit.de/">PEAR process</a> as well.
</p>]]></description>
      <pubDate>Mon, 08 Oct 2012 10:18:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Project: Box - Making Creating PHARs Easier]]></title>
      <guid>http://www.phpdeveloper.org/news/18401</guid>
      <link>http://www.phpdeveloper.org/news/18401</link>
      <description><![CDATA[<p>
There's a new project on Github that wants to help making your <a href="http://php.net/phar">phar</a> archives for your PHP applications. The process is a little obtuse right now and <a href="https://github.com/kherge/Box">Box</a> wants to simplify it.
</p>
<blockquote>
Box is a library and command line application for simplifying the PHAR creation process. [Features include] creating new PHARs with a simple configuration file, add and replace files in existing PHARs, extract existing PHARs, with option to cherry pick files and verify PHAR signatures.
</blockquote>
<p>
The project is still relatively young but it looks like it's off to a good start. Phar files are a powerful tool to have in a PHP developer's arsenal but developing them can be a pain. Hopefully something like this can make life easier.  
</p>]]></description>
      <pubDate>Fri, 24 Aug 2012 10:33:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Two PHP 5 Security Flaws Found]]></title>
      <guid>http://www.phpdeveloper.org/news/18180</guid>
      <link>http://www.phpdeveloper.org/news/18180</link>
      <description><![CDATA[<p>
As reported in <a href="http://www.phpbuilder.com/articles/application-architecture/security/php-5-security-flaws-CVE-2012-2386-and-CVE-2012-2143.html">this new post</a> on PHPBuilder.com, there are two new security issues that could allow an attacker to execute their own code (note: these are fixed by the latest releases, PHP 5.4.4 and PHP 5.3.14).
</p>
<blockquote>
The flaws are related to each other, with the primary issue being an insecure implementation of the DES within the crypt() function. In his eSecurityPlanet article about <a href="http://www.esecurityplanet.com/patches/open-source-php-and-ruby-on-rails-updated-for-security.html">recent PHP security updates</a>, Sean Michael Kerner provides the details of these two security flaws.
</blockquote>
<p>
The issue stems from a flaw in the DES implementation where certain keys are truncated before the DES digestion and a problem in the <a href="http://php.net/phar">phar</a> extension that could allow for arbitrary code execution. You can find more on these security issues <a href="http://www.esecurityplanet.com/patches/open-source-php-and-ruby-on-rails-updated-for-security.html">here</a>.
</p>]]></description>
      <pubDate>Wed, 04 Jul 2012 21:04:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[7php.com: Interview with Davey Shafik, The Original Author of Phar]]></title>
      <guid>http://www.phpdeveloper.org/news/17848</guid>
      <link>http://www.phpdeveloper.org/news/17848</link>
      <description><![CDATA[<p>
On the 7php.com blog today they've posted the latest in their series of PHP community interviews - a few <a href="http://7php.com/php-interview-davey-shafik/">questions with Davey Shafik</a>, the original author of <a href="http://php.net/phar">phar</a>.
</p>
<blockquote>
In this edition I talked with Davey Shafik (<a href="http://twitter.com/dshafik">@dshafik</a>), who is one of the Founding Contributor of PHP Zend Framework. He has been a co-author of several prominent books, namely: php|architect's PHP 5 Zend Certification Study Guide, <a href="http://7php.com/recommended-book/book.php?b=Write-Cutting-Edge-Code">PHP Master: Write Cutting Edge Code</a>, The PHP Anthology: 101 Essential Tips, Tricks & Hacks. He is also a well-known speaker at several world-wide PHP Conferences - You can find <a href="http://7php.com/php-interview-davey-shafik/daveyshafik.com">his incoming conference schedules on his website</a>.
</blockquote>
<p>
In <a href="http://7php.com/php-interview-davey-shafik/">his answers</a> we find out about:
</p>
<ul>
<li>Where he feels his place is in the PHP community
<lI>What he's excited about in PHP 5.4
<li>Some advice to beginners about "scratching an itch"
<li>Recommendations about profiling your code
<li>Resources he suggests
<li>His admiration of <a href="http://twitter.com/s_bergmann">Sebastian Bergmann</a> for the hard work he does
</ul>
<p>
You can read more about these and the rest of his answers in <a href="http://7php.com/php-interview-davey-shafik/">the full interview</a>.
</p>]]></description>
      <pubDate>Mon, 23 Apr 2012 08:18:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Vance Lucas' Blog: Nginx + PHP-FPM Blank Pages with Phar Packages]]></title>
      <guid>http://www.phpdeveloper.org/news/17648</guid>
      <link>http://www.phpdeveloper.org/news/17648</link>
      <description><![CDATA[<p>
<i>Vance Lucas</i> has a new post sharing some of his experience in <a href="http://www.vancelucas.com/blog/nginx-php-fpm-blank-pages-with-phar-packages/">setting up nginx+PHP-FPM with phar packages</a> that he recently had with setting up a new server instance for a company. The problem showed itself as blank pages, apparently due to a feature in the Suhosin security package.
</p>
<blockquote>
Ran into this issue when setting up a new VPS for <a href="http://autoridge.com/">AutoRidge</a>. This happens when using Nginx and PHP-FPM with PHP 5.3+ and the Suhosin patch when trying to run a PHP script using a PHAR package. From what I can gather, the Suhosin patch basically blocks PHP include/require functions from executing files ending with .phar, which results in a PHP segfault that leaves no trace of any error at all.
</blockquote>
<p>
His solution is a pretty simple one - edit the "suhosin.ini" file to allow for the opening of includes in <a href="http://php.net/phar">phar</a> files (suhosin.executor.include.whitelist). You can find out more about the Suhosin security tool <a href="http://www.hardened-php.net/suhosin/">on the project's website</a>.
</p>]]></description>
      <pubDate>Thu, 08 Mar 2012 12:18:02 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Packaging Your Apps with Phar]]></title>
      <guid>http://www.phpdeveloper.org/news/17550</guid>
      <link>http://www.phpdeveloper.org/news/17550</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing you how to <a href="http://phpmaster.com/packaging-your-apps-with-phar/">package up your applications</a> using the <a href="http://php.net/phar">phar</a> functionality that's bundled in to recent PHP versions.
</p>
<blockquote>
PHAR ("Php ARchive") is analogous to the JAR file concept but for PHP. If you have PHP 5.3 or greater, the Phar extension is built-in and enabled; you can start using it without any additional requirements. This article is intended to shed some light on this important feature for those who haven't used it before. Hopefully you'll find it a very helpful tool and have a better and faster deployment experience.
</blockquote>
<p>
They show you how to create a sample project to build the phar from - a simple application that prints out a message and the contents of a configuration file. Code is included to help you build the phar file and how to define the stub file to pull in your application's files and folder.
</p>]]></description>
      <pubDate>Thu, 16 Feb 2012 09:53:11 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: PHAR and FreeBSD]]></title>
      <guid>http://www.phpdeveloper.org/news/17101</guid>
      <link>http://www.phpdeveloper.org/news/17101</link>
      <description><![CDATA[<p>
<i>Till Klampaeckel</i> has a new post about <a href="http://till.klampaeckel.de/blog/archives/172-PHAR-and-FreeBSD.html">replacing the now-missing phar port</a> on FreeBSD installations with a custom compile work-around.
</p>
<blockquote>
I noticed that archivers/pecl-phar vanished from the ports tree on one of my FreeBSD servers.
Problem? Reasons to remove the port were: the port is unmaintained, the port was based on the outdated phar extension from pec and that phar (in pecl) contains open security issues. The simple solution is to create a new port which of course will use the phar which is bundled in PHP's core.
</blockquote>
<p>
He includes the simple five or six step process you'll need to follow to compile your own phar extension for your installation - grabbing the latest source, compiling (configure/make) and putting the resulting shared object (.so) in the right place for PHP to find it. All that's left then is to enable it in the php.ini. <a href="http://php.net/phar">Phar</a> is an archive creation tool that (normally) comes bundled with versions of PHP and can be used to both read and write to compressed packages.
</p>]]></description>
      <pubDate>Tue, 08 Nov 2011 11:51:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: PHAR Out Autoloading]]></title>
      <guid>http://www.phpdeveloper.org/news/16982</guid>
      <link>http://www.phpdeveloper.org/news/16982</link>
      <description><![CDATA[<p>
On the ZendCasts.com site there's a new screencast posted looking at <a href="http://www.zendcasts.com/phar-out-autoloading-hd/2011/10/">autoloading in phar</a>, the <a href="http://php.net/phar">packaging tool</a> built into PHP.  This is a continuation of the series started <a href="http://www.zendcasts.com/fun-with-phar/2011/10/">here</a>.
</p>
<p>
Building on the foundation from the <a href="http://www.zendcasts.com/fun-with-phar/2011/10/">previous screencast</a>, he shows how to enhance it and allow it to autoload based on an autoloader defined in a "stub.php" file.
</p>
<p>
You can grab the complete source for this screencast <a href="https://gist.github.com/1276774">over on github</a>.
</p>]]></description>
      <pubDate>Wed, 12 Oct 2011 09:13:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Schaefer's Blog: Using PHP Web Scraper Goutte in a Console Task in a Silex project]]></title>
      <guid>http://www.phpdeveloper.org/news/16969</guid>
      <link>http://www.phpdeveloper.org/news/16969</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Christian Schaefer</I> shows how to use the <a href="https://github.com/fabpot/Goutte">Goutte</a> tool (a web scraper) to pull information from one site and use it in another <a href="http://silex.sensiolabs.org/">Silex</a>-powered one. <a href="http://test.ical.ly/2011/09/30/using-php-web-scraper-goutte-in-a-console-task-in-a-silex-project/">His tutorial</a> uses a custom service provider for the integration.
</p>
<blockquote>
Since I discovered the <a href="http://test.ical.ly/2011/09/29/deploy-your-silex-and-twig-powered-facebook-app-using-git-onto-free-heroku-cloud-hosting/">free Facebook App hosting by heroku</a> I keep wanting to make something useful out of it. So I thought about a small service app. Without going into details yet about its nature there was one immediate problem to be solved. How to get hold of the data? So I thought to scrape it off some website. I know this isn't very nice but unfortunately there is no feed I can use.. And how to best scrape a website? Use Goutte!
</blockquote>
<p>
All you'll need is two things - the <a href="https://raw.github.com/fabpot/Goutte/master/goutte.phar">goutte.phar</a> and <a href="http://silex.sensiolabs.org/get/silex.phar">Silex</a> phar files. The code for the service provider is a simple registration of namespaces. With that integrated, it's as simple as making a client object and calling it with a URL.
</p>]]></description>
      <pubDate>Mon, 10 Oct 2011 08:26:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: Fun with Phar]]></title>
      <guid>http://www.phpdeveloper.org/news/16944</guid>
      <link>http://www.phpdeveloper.org/news/16944</link>
      <description><![CDATA[<p>
New today on ZendCasts.com there's a screencast tutorial about <a href="http://www.zendcasts.com/fun-with-phar/2011/10/">using phar archives</a> in your applications. 
</p>
<blockquote>
Phar is a new thing that's developed on the horizon over the last few years that's essentially a PHP archive or library.
</blockquote>
<p>
He shows how to set up a basic application (non-Zend Framework) that does a "hello world" sort of output showing a date "next week". Also included are the commands to bundle it up into a phar archive using the <a href="http://php.net/phar">features already built into PHP</a>. The build stub uses the <a href="http://php.net/buildFromDirectory">buildFromDirectory</a> and compression/buffering. He also points out a common problem with the default settings on many PHP installed - an INI setting that disables phar creation. Thankfully, it's easy to change via a <a href="http://php.net/ini_set">ini_set</a> call updating the "phar.readonly" setting.
</p>]]></description>
      <pubDate>Tue, 04 Oct 2011 08:14:16 -0500</pubDate>
    </item>
  </channel>
</rss>
