<?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>Sun, 12 Feb 2012 21:03:59 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Using Traits in PHP 5.4]]></title>
      <guid>http://www.phpdeveloper.org/news/17522</guid>
      <link>http://www.phpdeveloper.org/news/17522</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial about using a feature in the upcoming PHP release (5.4) to make it easier to work with more modular code - <a href="http://phpmaster.com/using-traits-in-php-5-4/">using traits</a>.
</p>
<blockquote>
In this article I will discuss traits, a new feature introduced in PHP 5.4 to overcome [issues where multiple inheritance is needed]. The concept of traits itself is nothing new to programming and is used in other languages like Scala and Perl. They allows us to horizontally reuse code across independent classes in different class hierarchies.
</blockquote>
<p>
Included in the post is example code showing what the use of a trait looks like and a method for creating a Singleton that can spawn instances of two classes. Also included are examples of:
</p>
<ul>
<li>using multiple traits at once, 
<li>traits made up of traits, 
<li>the importance of order, 
<li>aliasing to avoid conflicts, 
<li>reflection 
<li>and a few other features that come along with their use.
</ul>]]></description>
      <pubDate>Thu, 09 Feb 2012 08:40:50 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Using Phing]]></title>
      <guid>http://www.phpdeveloper.org/news/17350</guid>
      <link>http://www.phpdeveloper.org/news/17350</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial posted about <a href="http://phpmaster.com/using-phing/">using the Phing build tool</a> to automate a process, usually a build for a website launch. In his example, he shows a simple "Hello World" example and how to work with multiple targets in the same build file.
</p>
<blockquote>
Phing is a PHP project build tool based on Apache Ant. A build system helps you to perform a group of actions using a single command. [...] Phing helps overcome [human error] issues by automating tasks like running unit tests, applying database changes, deploying application code, etc. In this article I'll show you some of the basics of working with Phing.
</blockquote>
<p>
He includes the commands you'll need to install Phing (if it's not already) via the PEAR installer and a basic "build.xml" file. He explains the parts of the file - tags for "project", "target" "echo" and "property - and includes a more complex build example with multiple targets (and how to call one specifically from the command line).
</p>]]></description>
      <pubDate>Thu, 05 Jan 2012 10:41:40 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Christer Edvartsen's Blog: Running Multiple Versions of PHPUnit]]></title>
      <guid>http://www.phpdeveloper.org/news/17213</guid>
      <link>http://www.phpdeveloper.org/news/17213</link>
      <description><![CDATA[<p>
<i>Christer Edvartsen</i> has a recent post showing you how to <a href="http://tech.vg.no/2011/11/29/running-multiple-versions-of-phpunit/">get multiple PHPUnit versions installed</a> and working on your application. There's been some issues lately due to some updates in recent PHPUnit versions:
</p>
<blockquote>
The latest version of <a href="https://github.com/sebastianbergmann/phpunit/">PHPUnit</a> (3.6.4 at the time of this writing) does not play well with the <a href="http://framework.zend.com/">Zend Framework</a> extensions (<a href="http://framework.zend.com/manual/en/zend.test.phpunit.html">Zend_Test_PHPUnit</a>). After asking <a href="http://mwop.net/blog">Matthew Weier O'Phinney</a> about this he answered that they had <a href="https://twitter.com/#!/weierophinney/status/141141184411209729">standardized on PHPUnit-3.4 for ZF1</a>. Having just upgraded to the latest version of PHPUnit on our servers we were no longer able to test our Zend Framework applications. One option was to downgrade PHPUnit, but since we were already using some of the new features this was not going to happen.
</blockquote>
<p>
He method uses the "installroot" option that can be passed in to the PHPUnit installation process to point it to someplace other than the default PEAR install location. A small change is needed to the "phpunit" executable to have it correctly set the include path. Then it's just a matter of making a symlink to your "/usr/bin" directory pointing to the specific version.
</p>]]></description>
      <pubDate>Mon, 05 Dec 2011 12:26:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Multiple PHP versions set-up]]></title>
      <guid>http://www.phpdeveloper.org/news/17092</guid>
      <link>http://www.phpdeveloper.org/news/17092</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has a new post today looking at a method for <a href="http://derickrethans.nl/multiple-php-version-setup.html">setting up multiple PHP versions</a> on the same machine and switch between them with a little help from some simple bash scripts.
</p>
<blockquote>
For many of my projects (both <a href="http://derickrethans.nl/projects.html">hobby</a> and <a href="http://derickrethans.nl/who.html#derickrethansltd">commercial</a>) I need to support many different PHP configurations. Not only just different PHP versions, but also debug builds, ZTS builds and 32-bit builds. In order to be able to test and build extensions against all those different PHP configurations I have adopted a simple method that I'm sharing with you here.
</blockquote>
<p>
Using <a href="http://derickrethans.nl/files/php-build.sh.txt">this script</a> he can tell his system to pull the latest version of any release from SVN and try to compile it. The trick is putting each of them into a different directory under /usr/local. He uses another small shell function (with a function called "pe()") that sets up the pathing to the right release, complete with its own locations for PEAR/PECL and a php.ini.
</p>]]></description>
      <pubDate>Mon, 07 Nov 2011 09:14:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Thijssen's Blog: LAMP-stack? Forget it! It's a LAMPGMVNMCSTRAH-stack now...]]></title>
      <guid>http://www.phpdeveloper.org/news/17052</guid>
      <link>http://www.phpdeveloper.org/news/17052</link>
      <description><![CDATA[<p>
These days there's much more involved in making a good, solid web application than just the platform you serve from. <i>Joshua Thijssen</i> knows this and humorously points it out <a href="http://www.adayinthelifeof.nl/2011/10/26/lamp-stack-forget-it-its-a-lampgmvnmcstrah-stack-now/">in a new post</a> about a "LAMPGMVNMCSTRAH-stack" (that's fifteen different technologies for those counting).
</p>
<blockquote>
Back in the good old days - and in internet-time, this actually means just a few years ago - people were quite happy with their LAMP stack: Linux, Apache, MySQL and PHP. With this quartet, or a variation on it like PostgreSQL instead of MySQL, we could do everything: create a blog-site, setup an e-commerce web shop, making a guestbook, you name it and it was there.. But times have changed... radically.
</blockquote>
<p>
He talks about this "brave new world" developers live in today where they can't know everything that happens in every facet of the application (he likens it to the responsibilities of generals vs infantry in the army). 
</p>
<blockquote>
As a programmer, you simply cannot pretend that you and you alone are running a system. You are part of a whole, and even though you might be the most important part, or the controlling part, you still need to work with other components in order to get the job done. If you forget this, no matter how good your part is running, the whole system will fail because you either decided to do too much yourself, or did not correctly utilize the rest of the system.
</blockquote>
<p>
Wondering what his acronym stands for? LAMPGMVNMCSTRAH is short for "Linux, Apache, MySQL, PHP, Gearman, Memcached, Varnish, Ngnix, MongoDB, CouchDB, Solr, Tika, Redit, ActiveMQ, Hadoop."
</p>]]></description>
      <pubDate>Thu, 27 Oct 2011 12:49:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Splitting large MySQL dump files]]></title>
      <guid>http://www.phpdeveloper.org/news/16937</guid>
      <link>http://www.phpdeveloper.org/news/16937</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Sameer Borate</i> includes a handy bit of code you can use to <a href="http://www.codediesel.com/php/splitting-large-mysql-dump-files/">split up a large MySQL dump file</a> into smaller, easier to digest chunks.
</p>
<blockquote>
One of the frustrating things with working with MySQL is of importing large sql dump files. Either you get a 'max execution time exceeded' error from PHP or a 'Max_allowed_packet_size' from MySQL. In a recent task I needed to import a table of around a million records on a remote host, which quickly became an exercise in frustration due to various limitations on the server. SSH was of no help as changing the configuration files was restricted to the root user. My last resort was to split the huge 'INSERT' statements into smaller size files. 
</blockquote>
<p>
His script needs a little extra time to run (he sets max execute to 600 seconds) and takes the SQL file in line by line, splitting them back out to over files based on a "count" value - "dump-split-*". Depending on the size of your files, using something like this might not be an option. You might need something more like the <a href="http://kb.iu.edu/data/afar.html">command line "split" feature</a> to keep it outside of PHP's memory management all together.
</p>]]></description>
      <pubDate>Mon, 03 Oct 2011 08:44:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Transfer Data via Multiple Protocols with Libcurl]]></title>
      <guid>http://www.phpdeveloper.org/news/16876</guid>
      <link>http://www.phpdeveloper.org/news/16876</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's a new tutorial showing how to <a href="http://www.phpbuilder.com/columns/Libcurl/Libcurl_09-14-2011.php3">use libcurl to communicate with multiple protocols</a> like FTP, HTTP, HTTPS, SMTP and STMPS. The <a href="http://curl.haxx.se/libcurl/">libcurl</a> library that can be compiled in or installed as a shared module in your PHP install to provide enhanced networking abilities.
</p>
<blockquote>
As I wrote in my <a hef="http://www.phpbuilder.com/columns/php-multithreading-curl/Octavia_Anghel06072011.php3">PHP multithreading with cURL</a> article, the libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. PHP supports the libcurl library which allows you to connect and communicate to many different types of servers with many different types of protocols.
</blockquote>
<p>
<a href="http://www.phpbuilder.com/columns/Libcurl/Libcurl_09-14-2011.php3">The tutorial</a> focuses on two different types of connections (well, four really) - FTP/FTPS and HTTP/HTTPS - and how to transfer data across each. Some code is included to create a (procedural) tool to send an uploaded file to a remote site.
</p>]]></description>
      <pubDate>Mon, 19 Sep 2011 12:03:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Weiske's Blog: phpfarm moved to SourceForge]]></title>
      <guid>http://www.phpdeveloper.org/news/16819</guid>
      <link>http://www.phpdeveloper.org/news/16819</link>
      <description><![CDATA[<p>
<i>Christian Weiske</i> has a new post about a move the <a href="https://sourceforge.net/p/phpfarm">phpfarm</a> tool has made <a href="http://cweiske.de/tagebuch/phpfarm-on-sf.htm">over to SourceForge</a> for <a href="https://sourceforge.net/p/phpfarm">its project page</a>. phpfarm makes it simple to switch between multiple versions of PHP on the same server to make debugging and development a much simpler task (especially if you're not in a homogeneous environment).
</p>
<blockquote>
phpfarm, the tool that lets you install multiple PHP versions beside each other, finally got a proper project page on SourceForge. By moving from svn.php.net to SF, phpfarm got a nice <a href="https://sourceforge.net/p/phpfarm/code/">git repository</a>, a <a href="https://sourceforge.net/p/phpfarm/wiki/">wiki</a> and a <a href="https://sourceforge.net/p/phpfarm/tickets/">ticketing system</a>. It also has a <a href="http://www.phing.info/">Phing</a> build file now which generates and uploads <a href="https://sourceforge.net/projects/phpfarm/files/phpfarm/">release files</a>, so people don't have to install git to get phpfarm.
</blockquote>
<p>
<a href="http://cweiske.de/tagebuch/phpfarm-on-sf.htm">His post</a> also includes some of the changes made in the latest release (0.1.0) and how you can clone the code from the SF.net repository. 
</p>]]></description>
      <pubDate>Tue, 06 Sep 2011 10:10:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ServerGrove Blog: How to setup multiple PHP versions on Apache]]></title>
      <guid>http://www.phpdeveloper.org/news/16758</guid>
      <link>http://www.phpdeveloper.org/news/16758</link>
      <description><![CDATA[<p>
On the ServerGrove blog today there's a new post from <i>Ishmael</i> about setting up <a href="http://blog.servergrove.com/2011/08/22/how-to-setup-multiple-php-versions-on-apache/">multiple versions of PHP on one Apache instance</a> with the help of FastCGI.
</p>
<blockquote>
There are several reasons you might need to run multiple versions of PHP on the same server. Maybe you have a PHP 5.2 application running on your server and you need to start working on another application based on a new framework like Symfony2 or Lithium? Perhaps you haver a client with a legacy site that runs PHP 5.2, or maybe you simply want to test some of the new functionality? This post is going to explain how to setup a server to run multiple versions of PHP.
</blockquote>
<p>
Normally, Apache can only be compiled with one version of PHP, but FastCGI gets around that by letting you define it in a configuration file instead. They also include support for defining the user the process runs as (suexec) that helps to make permissions issues lesser. Included are all of the command-line calls and config settings you'll need to make to get things set up.
</p>]]></description>
      <pubDate>Tue, 23 Aug 2011 11:07:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Weiske's Blog: Installing PHP extensions for phpfarm]]></title>
      <guid>http://www.phpdeveloper.org/news/16624</guid>
      <link>http://www.phpdeveloper.org/news/16624</link>
      <description><![CDATA[<p>
<i>Christian Weiske</i> has a new post to his blog today on how to get <a href="http://cweiske.de/tagebuch/phpfarm-install-extensions.htm">PHP extensions installed for phpfarm</a>, the tool that lets you switch between <a href="http://cweiske.de/tagebuch/Introducing%20phpfarm.htm">multiple PHP versions</a> on the same machine.
</p>
<blockquote>
When using several PHP installations with <a href="http://cweiske.de/tagebuch/Introducing%20phpfarm.htm">phpfarm</a>, installing PHP extensions is not always easy - mostly because <a href="http://pear2.php.net/">Pyrus</a> is very strict about package files - and many of the packages in <a href="http://pecl.php.net/">PECL</a> unfortunately <a href="http://pecl.php.net/bugs/search.php?search_for=invalid+package.xml&limit=10&direction=ASC&cmd=display&status=Open&bug_type=All">have invalid</a> non-validating package.xmls.
</blockquote>
<p>
The installation follows most of the normal process with one exception - you use the phpfarm phpize and point the configure to use the phpfarm ini configuration file then enable it as usual.
</p>]]></description>
      <pubDate>Mon, 25 Jul 2011 08:15:15 -0500</pubDate>
    </item>
  </channel>
</rss>

