<?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 20:08:08 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Tracking Upload Progress with PHP and JavaScript]]></title>
      <guid>http://www.phpdeveloper.org/news/17503</guid>
      <link>http://www.phpdeveloper.org/news/17503</link>
      <description><![CDATA[<p>
In a new tutorial today from PHPMaster.com, they show you how to <a href="http://phpmaster.com/tracking-upload-progress-with-php-and-javascript/">combine Javascript and a PHP feature</a> to track the progress of an upload to your web application.
</p>
<blockquote>
A problem that has plagued web developers for years is how to add real-time information to their applications, such as a progress bar for file uploads. [...] JavaScript can access a file's name, type, and even the width and height of a local image, but it wasn't until <a href="http://stackoverflow.com/q/4112575/322819">HTML5 that it could access a file's size</a>. [...] In this article I'll show you how [the session.upload_progress] feature can be used to create a simple upload progress bar without any external libraries or browser dependencies.
</blockquote>
<p>
The tutorial provides all the steps you'll need to get it working - defining the form with the extra required field, styling it and plugging the Javascript in to call a small script to get the progress of the upload. It returns the difference between the content-length of the file and the current size (as a percentage of 100).
</p>]]></description>
      <pubDate>Mon, 06 Feb 2012 13:58:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Artur Ejsmont's Blog: How to build mongodb pecl extension in 32bit for PHP 5.2 on OSX Snow Leaopard]]></title>
      <guid>http://www.phpdeveloper.org/news/17494</guid>
      <link>http://www.phpdeveloper.org/news/17494</link>
      <description><![CDATA[<p>
<i>Artur Ejsmont</i> has <a href="http://artur.ejsmont.org/blog/content/how-to-build-mongodb-pecl-extension-in-32bit-for-php-52-on-macosx-snow-leaopard">a recent post</a> to his blog showing how to get a MongoDB PECL extension to compile in a 32bit OSX environment (Snow Leopard).
</p>
<blockquote>
Here is a quick step by step guide on how to get mongodb and PHP5.2 mongo pecl extension going on your MacOSX in 32bit mode! NOTE: 32 bit mongodb binaries have 2GB address space limit so you wont be able to process too much on your laptop. You will still be able to code and connect to remote instances just fine.
</blockquote>
<p>
His process includes five steps - well, eight if you count the optional "install MongoDB" ones too - complete with the commands you'll need to get things compiled, ready for copy and paste. You can find the MongoDB PECL package <a href="http://pecl.php.net/package/mongo">here</a>.
</p>]]></description>
      <pubDate>Fri, 03 Feb 2012 10:35:11 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Koopmanshcap's Blog: Installing the Geoip PECL package for Zend Server on OSX]]></title>
      <guid>http://www.phpdeveloper.org/news/17385</guid>
      <link>http://www.phpdeveloper.org/news/17385</link>
      <description><![CDATA[<p>
In <a href="http://www.leftontheweb.com/message/Installing_the_Geoip_PECL_package_for_Zend_Server_on_OSX">this recent post</a> to his blog <i>Stefan Koopmanschap</i> shares some of the troubles (and a solution) when he was dealing with getting the Geoip PECL extension installed on his Zend Server setup in OSX.
</p>
<blockquote>
Today I needed to get a client application up and running on my local system. This application uses the Geoip PECL package, so I needed to get this up and running. This turned out to be slightly more difficult than just a PECL install, as you're missing some libraries by default, so here is my log of things to do to get it up and running.
</blockquote>
<p>
He gives the complete list of steps his followed including <a href="http://re2c.org/">downloading the source</a> and his way around this "System could not load this extension" issue. The trick was to recompile the source with the correct architecture. By default his extension was built with i386 instead of 64-bit but updating some of the CFLAGS settings (and a few other environment variables) got things compiling correctly. 
</p>]]></description>
      <pubDate>Thu, 12 Jan 2012 11:09:56 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Creating a chat bot with PHP and Dbus]]></title>
      <guid>http://www.phpdeveloper.org/news/17364</guid>
      <link>http://www.phpdeveloper.org/news/17364</link>
      <description><![CDATA[<p>
<i>Robert Basic</i> has continued his series looking at using Dbus in PHP with <a href="http://robertbasic.com/blog/creating-a-chat-bot-with-php-and-dbus/">this latest post</a> to his blog - using the foundation he's <a href="http://robertbasic.com/blog/communicating-with-pidgin-from-php-via-d-bus/">created</a> <a href="http://robertbasic.com/blog/listening-to-dbus-signals-with-php/">before</a> to make a chat bot that will listen and respond to commands on a Jabber network.
</p>
<blockquote>
Now that we know how to <a href="http://robertbasic.com/blog/communicating-with-pidgin-from-php-via-d-bus/">use DBus to communicate with Pidgin from PHP</a> and how to <a href="http://robertbasic.com/blog/listening-to-dbus-signals-with-php/">listen to DBus signals</a>, it's time to put it all together by creating a simple chat bot! Nothing fancy, just a simple script that runs somewhere on some server and, by using a Pidgin account, can respond to some basic queries we send it.
</blockquote>
<p>
His new code listens for an incoming message on the "PurpleInterface", grabs the name of the sender and calls a "PurpleConvImSend" method with the conversation object and the message to send. You can find the complete source for the project <a href="https://github.com/robertbasic/blog-examples/blob/master/dbus/chat.php">on his github account</a>.
</p>]]></description>
      <pubDate>Mon, 09 Jan 2012 11:10:52 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Listening to Dbus signals with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17301</guid>
      <link>http://www.phpdeveloper.org/news/17301</link>
      <description><![CDATA[<p>
<i>Robert Basic</i> has posted a follow up to his <a href="http://robertbasic.com/blog/communicating-with-pidgin-from-php-via-d-bus/">first post</a> about using DBase in PHP in <a href="http://robertbasic.com/blog/listening-to-dbus-signals-with-php/">this new post</a>. This new tutorial shows you how to listen to signals sent to the waiting PHP script.
</p>
<blockquote>
The good part is that not can we only call different methods against Pidgin's libpurple API, we can also listen to different signals on different events, that are sent via Dbus. [...] The PHP Dbus extension allows us to watch for one exact signal on an interface, or for all signals on an interface. Of course, we can add watches on multiple interfaces at once.
</blockquote>
<p>
In his example he shows how to set a listener on the session to watch for an incoming instant message from another source. Sample code is included showing how to set the listener on the interface and be able to tell when a message comes in (watching a $signal interface for an event). You can find more signal catching examples in <a href="https://github.com/robertbasic/blog-examples/tree/master/dbus">his github repository</a>.
</p>]]></description>
      <pubDate>Mon, 26 Dec 2011 11:23:41 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Communicating with Pidgin from PHP via D-Bus]]></title>
      <guid>http://www.phpdeveloper.org/news/17275</guid>
      <link>http://www.phpdeveloper.org/news/17275</link>
      <description><![CDATA[<p>
<i>Robert Basic</i> has put together a new tutorial on his blog showing how he <a href="http://robertbasic.com/blog/communicating-with-pidgin-from-php-via-d-bus/">connected PHP and Pidgin</a> (the popular chat client) with the help of the <a href="http://pecl.php.net/package/DBus">DBus extension</a>.
</p>
<blockquote>
Earlier this week I got an idea of trying to communicate with <a href="http://pidgin.im/">Pidgin</a>, a chat client, via the terminal. [...] Surely I wasn't the first one to come up with this idea and after a bit of a googling found out that Pidgin's libpurple has a nice API for that, <a href="http://developer.pidgin.im/wiki/DbusHowto">exposed via D-Bus</a>. I first planned to write some scripts for this in Python or C, but when I finally sat down over the weekend to hack on this, realized there is a <a href="http://pecl.php.net/package/DBus">PHP D-Bus extension</a>, thanks to <a href="http://derickrethans.nl/">Derick Rethans</a>! 
</blockquote>
<p>
He goes through the whole process you'll need to get it up and working on your system - installing the extension via PECL, creating a DBus proxy to the Pigdin interface and getting a list of the currently connected users. You can find the first versions of this code <a href="https://github.com/robertbasic/blog-examples/tree/master/dbus">in his account on github</a>.
</p>]]></description>
      <pubDate>Mon, 19 Dec 2011 09:10:23 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Better HTTP Request/Response in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17256</guid>
      <link>http://www.phpdeveloper.org/news/17256</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Chris Hartjes</i> looks at the idea of <a href="http://www.littlehart.net/atthekeyboard/2012/12/12/better-http-request-response-in-php/">better HTTP Request/Response functionality</a> in PHP, more than just the <a href="http://us3.php.net/manual/en/language.variables.superglobals.php">superglobal</a> handling and <a href="http://www.php.net/http">PECL HTTP extension</a> it has now.
</p>
<blockquote>
I think the fact that we have $_POST and $_GET lulls some of us into the false sense that we should have $_PUT and $_DELETE objects, since that would map to the commonly-desired set of HTTP verbs that REST likes to use. But what should be inside those things, or should we be moving towards a more Pythonesque solution where a Request object, as part of core or via a only-really-for-the-brave- PECL extension?
</blockquote>
<p>
He mentions opinions from other PHP community members (<a href="http://twitter.com/lxt">Laura Thompson</a> and <a href="http://twitter.com./auroraeosrose">Elizabeth Smith</a>) and a bit about what he (and I'm sure other developers) are looking for in a more full-featured request/response handling feature.
</p>]]></description>
      <pubDate>Wed, 14 Dec 2011 09:51:03 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: PHP Yaf (Yet Another Framework) Is Very Fast]]></title>
      <guid>http://www.phpdeveloper.org/news/17164</guid>
      <link>http://www.phpdeveloper.org/news/17164</link>
      <description><![CDATA[<p>
In <a href="http://css.dzone.com/articles/php-yaf-yet-another-framework">this new post</a> on DZone.com today <i>John Esposito</i> talks about an interesting PHP framework that has come to light lately - the <a href="http://us.php.net/yaf">Yet Another Framework</a>, an oddly named PHP extension that provides some of the basics to build a framework-based application.
</p>
<blockquote>
Why care about another PHP framework? especially one that's actually called <a href="http://us.php.net/yaf">Yet Another Framework</a>? Because Yaf isn't just a framework. It's a PHP extension (listed on PECL), so it's written in C -- so it's very, very fast. How fast? Here's a <a href="https://github.com/eryx/labs/tree/master/php-framework-benchmark/result-20110701">benchmark</a> (requests/sec).
</blockquote>
<p>
The only framework (of the list he compared) that came in faster was <a href="http://code.google.com/p/micromvc-php/">MicroMVC</a> and that's not as full-featured as the Yaf functionality is. Disregarding that, it has a huge requests/second difference between even the next on the list, <a href="http://codeigniter.com">CodeIgniter</a>. 
</p>]]></description>
      <pubDate>Wed, 23 Nov 2011 15:12:54 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Twig extension]]></title>
      <guid>http://www.phpdeveloper.org/news/17151</guid>
      <link>http://www.phpdeveloper.org/news/17151</link>
      <description><![CDATA[<p>
In a new post from <i>Derick Rethans</i> he talks about <a href="http://derickrethans.nl/twig-extension.html">an extension version</a> of Twig, the popular <a href="http://twig-project.com">templating engine</a> from the creators of the Symfony framework.
</p>
<blockquote>
A while ago, Fabien asked me to have a look at porting one of Twig's slowest methods, TwigTemplate::getAttribute(), into a PHP extension. It is a complex method that does a lot of different checks and look-ups. Fabien's benchmarks showed that this method was responsible for quite a large amount of time. On top of that, it didn't seem that it could be optimised any further as PHP code itself.
</blockquote>
<p>
He points to <a href="https://github.com/derickr/twig-ext">the twig-ext extension</a> that's a reworked version of the "getAttribute" method from the tool and the performance gain (about 15%) it gives. Compiled templates will automatically call this new method in the extension. This update has already been merged into <a href="http://github.com/fabpot/Twig">the main Twig repo</a>.
</p>]]></description>
      <pubDate>Mon, 21 Nov 2011 08:35:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Slawek Lukasiewicz's Blog: PHP application diagnostics - Memtrack]]></title>
      <guid>http://www.phpdeveloper.org/news/17102</guid>
      <link>http://www.phpdeveloper.org/news/17102</link>
      <description><![CDATA[<p>
<i>Slawek Lukasiewicz</i> has <a href="http://www.leftjoin.net/2011/11/php-application-diagnostics-memtrack/">posted about a handy tool</a> that can be used to track memory consumption and performance in your PHP application - <a href="http://php.net/manual/en/book.memtrack.php">memtrack</a>.
</p>
<blockquote>
Application profiling can help us determine bottlenecks and possible problems during development. But sometimes we also need to diagnose problems in production environment. Frequent performance problems are connected with functions and methods using too much memory.
</blockquote>
<p>
The tool allows you to set up thresholds for memory consumption and, if the scripts exceeds it, add warnings to your log files. He includes the simple instructions to install it (via <a href="http://pecl.php.net">PECL</a>) and enable it in your php.ini. Some sample code to create a memory overvload is included to test it out. <a href="http://www.php.net/manual/en/memtrack.ini.php">Configuration options</a> let you set the limits and define functions to ignore if you know for sure there's trouble spots.
</p>]]></description>
      <pubDate>Tue, 08 Nov 2011 12:08:37 -0600</pubDate>
    </item>
  </channel>
</rss>

