<?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, 19 Jun 2013 21:42:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Alvaro Videla: Using RabbitMQ in Unit Tests]]></title>
      <guid>http://www.phpdeveloper.org/news/19529</guid>
      <link>http://www.phpdeveloper.org/news/19529</link>
      <description><![CDATA[<p>
<i>Alvaro Videla</i> has a new post today showing how he <a href="http://videlalvaro.github.io/2013/04/using-rabbitmq-in-unit-tests.html">used RabbitMQ in his unit testing runs</a> with a small, quickly installed version of the server that can be removed once the tests are complete.
</p>
<blockquote>
In this blog post I want to show you a very simple technique for using RabbitMQ in our Unit or Functional Tests. Let's say you wrote a bunch of tests for your RabbitMQ consumers and then it's time to run them. To do that you probably need to setup a RabbitMQ server just for tests with their own users and passwords, or you need to set up a whole new virtual host for your tests. [...] With a future release of RabbitMQ that we can already test on the nightlies website, we can run RabbitMQ without the need to install Erlang. We created a package that ships a stripped down version of Erlang together with the broker bits, so running RabbitMQ now is as easy as downloading a tarball, uncompressing it and starting the server. 
</blockquote>
<p>
With a combination of this more self-contained package and some listener handling through PHPUnit, they uncompress the tarball with a PHP script and start the server with the defined configuration. Then, once the tests are done, it cleans itself up and removes the entire server directory to make for a clean run the next time.
</p>
Link: http://videlalvaro.github.io/2013/04/using-rabbitmq-in-unit-tests.html]]></description>
      <pubDate>Wed, 01 May 2013 09:10:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Software Gunslinger: PHP is meant to die, continued]]></title>
      <guid>http://www.phpdeveloper.org/news/19511</guid>
      <link>http://www.phpdeveloper.org/news/19511</link>
      <description><![CDATA[<p>
In his <a href="http://phpdeveloper.org/news/19417">previous post</a> ("PHP was meant to die") the point was made that PHP isn't really designed as a language to handle long running processes very well. It's made to handle a few operations and then die at the end of the request. In <a href="http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued">this follow up post</a> he talks more about using PHP for long running processes and a library that could help.
</p>
<blockquote>
Yes, I already acknowledged that PHP has a garbage collection implementation starting 5.3.0 and up (opt-in or opt-out, that's not the problem). I also acknowledge that garbage collection works, and is able to take care of most circular references just fine. [...] Anyway, as previously stated too, garbage collection is a great thing, but not enough for PHP. It's a borrowed feature that does not play well with old fundamental decisions inherited from the original design. Garbage collection is not a magical solution for every problem, like many tried to argue about. Let's illustrate with another example.
</blockquote>
<p>
His example uses the <a href="http://reactphp.org/">React</a> PHP library (a non-blocking I/O platform) to handle a lot of incoming data to a port and report back some memory usage and limit settings. He explains a bit about what's happening and shares the results of the test, including the end result - a fatal error when the memory limit was hit. He still comes to the same conclusion, ultimately...PHP is just not the language to use for long-running processes that do any large amount of work. 
</p>
Link: http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued]]></description>
      <pubDate>Fri, 26 Apr 2013 09:15:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Enqueue Symfony's process components with PHP and ZeroMQ]]></title>
      <guid>http://www.phpdeveloper.org/news/19434</guid>
      <link>http://www.phpdeveloper.org/news/19434</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post today showing how he set up <a href="http://gonzalo123.com/2013/04/08/building-a-zeromq-enqueue-with-php/">queuing with ZeroMQ and Symfony components</a> and <a href="http://reactphp.org/">React</a>.
</p>
<blockquote>
Today I'd like to play with <a href="http://www.zeromq.org/">ZeroMQ</a>. ZeroMQ is a great tool to work with sockets. I will show you the problem that I want to solve: One web application needs to execute background processes but I need to execute those processes in order. Two users cannot execute one process at the same time. OK, if we face to this problem we can use Gearman. I've written various posts about Gearman (<a href="http://gonzalo123.com/2011/03/07/watermarks-in-our-images-with-php-and-gearman/">here</a> and <a href="http://gonzalo123.com/2010/11/01/database-connection-pooling-with-php-and-gearman/">here</a> for example). But today I want to play with ZeroMQ.
</blockquote>
<p>
He uses React and some ZeroMQ bindings and Symfony's <a href="https://github.com/symfony/Process">Process</a> component to make a simple client and server for working with the queue and processes. A screencast is included in the post showing them making the connection and adding the new process. The full code can be found <a href="https://github.com/gonzalo123/zmqlifo">on github</a> (or installable <a href="https://packagist.org/packages/gonzalo123/zmqlifo">via Composer</a>)
</p>
Link: http://gonzalo123.com/2013/04/08/building-a-zeromq-enqueue-with-php]]></description>
      <pubDate>Tue, 09 Apr 2013 11:11:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: A First Look at React]]></title>
      <guid>http://www.phpdeveloper.org/news/19365</guid>
      <link>http://www.phpdeveloper.org/news/19365</link>
      <description><![CDATA[<p>
On PHPMaster.com there's a new tutorial that <a href="http://phpmaster.com/a-first-look-at-react/">introduces you to React</a>, the PHP-based event-driven non-blocking socket tool that's similar to some of the functionality Node.js provides. The article is a very basic introduction but can help get your feet wet with the tool.
</p>
<blockquote>
For the past couple of years, <a href="http://nodejs.org/">Node.js</a> has been drawing increasing amounts of attention as a promising web technology. While it has some strengths, like being event driven, some people just want to stick to PHP. For over a year now, however, there has been a similar project for PHP named <a href="http://reactphp.org/">React</a>. React is mostly coded by <a href="https://igor.io/">Igor Wiedler</a>, who is also a prominent contributor to the <a href="https://github.com/fabpot/Silex">Silex framework</a>. While reading through the React examples, it really does look similar to Node.js.
</blockquote>
<p>
Included in the post are the instructions on how to get the latest version of React (via Composer) and the code to create a sample server that just writes out a string with a counter for the number of requests made. There's also an example of a "keystroke logger" for all data that's coming across the connection. The author (<i>Igor</i>) notes, however, that he wouldn't recommend using React in production, though, as its target is mostly those working with "cutting-edge technologies" rather than more stable applications.
</p>]]></description>
      <pubDate>Tue, 26 Mar 2013 10:01:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Iwan Luijks: E-mailing with PHP on Windows using Apache James]]></title>
      <guid>http://www.phpdeveloper.org/news/19280</guid>
      <link>http://www.phpdeveloper.org/news/19280</link>
      <description><![CDATA[<p>
<i>Iwan Luijks</i> has a recent post looking at how you can <a href="http://blog.iwanluijks.nl/#e-mailing-with-php-on-windows-using-apache-james">send email through PHP on Windows</a> via the <a href="http://james.apache.org/">Apache James</a> server.
</p>
<blockquote>
eveloping in PHP on Windows? Yep me too! Unfortunatly in opposite to developing on Linux, sending e-mail from PHP on Windows requires some more setup than just a bit of sendmail configuration. In this post I explain how to setup an Apache James Server and use it for e-mailing from PHP, all from and to your localhost.
</blockquote>
<p>
He walks you through the <a href="http://james.apache.org/download.cgi#Apache_James_2.3.2_is_the_stable_version">download</a> and installation and includes the changes you'll need to make to get it up and running correctly. He helps you test it's working correctly and how to get PHP set up and pointing to it for mail delivery. Finally, he has a line of PHP (using <a href="http://php.net/mail">mail</a>) to test the install and send a sample message.
</p>]]></description>
      <pubDate>Wed, 06 Mar 2013 12:02:48 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Andi Gutmans: Zend Server 6 is launched and available on the Amazon Web Services (AWS) Marketplace]]></title>
      <guid>http://www.phpdeveloper.org/news/19214</guid>
      <link>http://www.phpdeveloper.org/news/19214</link>
      <description><![CDATA[<p>
<i>Andi Gutmans</i> has a new post to his site about a recent update to the offerings on the Amazon Web Services (AWS) - it <a href="http://andigutmans.blogspot.com/2013/02/zend-server-6-is-launched-and-available.html">now offers Zend Server 6</a> as an installable option.
</p>
<blockquote>
Zend Server 6 is the ideal application platform for mobile and web applications, and this version brings a new level of enterprise capabilities. [...] Today, I'm also pleased to share that this newest version of Zend Server is now available on the <a href="https://aws.amazon.com/marketplace/pp/B00BF5F7ES/ref=sp_mpg_product_title?ie=UTF8&sr=0-4">Amazon Web Services Marketplace</a>. Now, for one combined fee with Amazon Web Services, you can run your applications on a fully supported PHP application platform with Zend Server 6 running on Red Hat Enterprise Linux or Ubuntu Linux.
</blockquote>
<p>
If you're interested in what Zend Server has to offer, check out <a href="http://www.zend.com/en/products/server">the product page</a> on the Zend website. Zend Server handles a lot of the base level things for you and can help you get up and running quickly. It includes things like detailed monitoring, error tracking, code tracing and a nice UI to for management and configuration of the server.
</p>]]></description>
      <pubDate>Thu, 21 Feb 2013 10:40:26 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Creating a PHP OAuth Server]]></title>
      <guid>http://www.phpdeveloper.org/news/18976</guid>
      <link>http://www.phpdeveloper.org/news/18976</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's <a href="http://phpmaster.com/creating-a-php-oauth-server/">a new tutorial posted</a> about creating your own OAuth server in PHP using the <a href="http://code.google.com/p/oauth-php/">oauth-php package</a> to do the "heavy lifting".
</p>
<blockquote>
If you've ever integrated with another API that requires security (such as Twitter), you've probably consumed an OAuth service. In this article, I'll explore what it takes to create your own three-legged OAuth server allowing you, for example, to create your own secure API which you can release publicly.
</blockquote>
<p>
They include a <a href="http://cdn.phpmaster.com/files/2012/12/diagram.png">visual representation</a> of the OAuth authentication flow (it's not the simplest thing) and the database structure/sample code you'll need to get the server up and listening. Also included is a registration form and how to generate a request token and give back an access token. There's also some sample code showing how to validate the request and it's access token to check for a correct (and allowed) request.
</p>]]></description>
      <pubDate>Tue, 01 Jan 2013 11:56:46 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Nikita Popov: Cooperative multitasking using coroutines (in PHP!) ]]></title>
      <guid>http://www.phpdeveloper.org/news/18941</guid>
      <link>http://www.phpdeveloper.org/news/18941</link>
      <description><![CDATA[<p>
<i>Nikita Popov</i> has a new post to his blog about a new feature that will be coming in PHP 5.5 and <a href="http://nikic.github.com/2012/12/22/Cooperative-multitasking-using-coroutines-in-PHP">how to use them</a>, coroutines and generators, in an example application.
</p>
<blockquote>
Coroutines on the other hand have received relatively little attention. The reason is that coroutines are both a lot more powerful and a lot harder to understand and explain. In this article I'd like to guide you through an implementation of a task scheduler using coroutines, so you can get a feeling for the stuff that they allow you to do. I'll start off with a few introductory sections. If you feel like you already got a good grasp of the basics behind generators and coroutines, then you can jump straight to the "Cooperative multitasking" section.
</blockquote>
<p>
He starts with a look at generators, a piece of functionality that will allow PHP to, for example, more easily create iterators "on the fly." He then moves on to coroutines, added functions that you have two-way communication with generators instead of just pulling data from them. With the basics out of the way, he gets into the "cooperative multitasking" and a sample socket-based server he implements using some of the concepts. 
</p>]]></description>
      <pubDate>Mon, 24 Dec 2012 09:46:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[thePHP.cc: Do No Enter!]]></title>
      <guid>http://www.phpdeveloper.org/news/18793</guid>
      <link>http://www.phpdeveloper.org/news/18793</link>
      <description><![CDATA[<p>
In a new post to the PHP.cc site today <i>Arne Blankerts</i> reminds us that not all security is about writing good code and handing data correctly - it's <a href="http://thephp.cc/viewpoints/blog/2012/11/do-not-enter">also about the systems they run on</a>.
</p>
<blockquote>
What seems to be so obvious for road traffic and its rules seems to be less obvious for many web developers. They tend to slack on defining (and monitoring) what is happening at the application level as well as the infrastructure level of their application. It is not enough to run a default install of your operating system of choice, add whatever services you need, and hope for the best. Considering the amount of money as well as damage to reputation, either directly due to fraud and abuse or indirectly by time lost to recover a hacked system or software, the "let's hope for the best" approach is of arguable quality. And we are not even considering general bugs here.
</blockquote>
<p>
He mentions configuring the server, OS and network to ensure a higher level of security, noting that no matter how much work is put into secure code, if the attacker can get to points on the system they shouldn't, your app is still vulnerable. 
</p>
<blockquote>
But how can you tell if someone is actually trying to break in? Pretty much exactly as the police does for road traffic: with speed checks and by patrolling. A properly configured firewall will show as well as inhibit any unauthorized communication within the network and all you need to do is monitor the vital signs of your infrastructure.
</blockquote>]]></description>
      <pubDate>Fri, 23 Nov 2012 10:37:44 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Pivory.com: From Ajax to WebSocket with PHP, a Quick Example]]></title>
      <guid>http://www.phpdeveloper.org/news/18429</guid>
      <link>http://www.phpdeveloper.org/news/18429</link>
      <description><![CDATA[<p>
On Pivory.com there's a new topic (tutorial) showing you a <a href="http://pivory.com/#topic/1409">simple example of using WebSockets</a> with the <a href="http://socketo.me/">Ratchet</a> PHP library, complete with sample code.
</p>
<blockquote>
WebSocket is the modern way for realtime two-way communications between server and browser. In the beginning we have Ajax calls [...] and with WS in picture the logic becomes [different]. [There] is a separate WS server, say listening on xxx.xxx.xxx.xxx:8080, and it can send messages to connected clients in realtime at any moment. The WS server can be in any language (such as node.js + socket.io) and on any machine or even in a cloud service. I use PHP (try <a href="http://socketo.me">http://socketo.me</a> for Ratchet) because I am lazy.
</blockquote>
<p>
The example shows a basic PHP Web Socket server running on a port with methods for "on connect", "on close", "on error" and "on message send". There's an example of the Javascript code to connect to this socket, showing how to convert it over from Ajax usage.
</p>]]></description>
      <pubDate>Fri, 31 Aug 2012 10:41:28 -0500</pubDate>
    </item>
  </channel>
</rss>
