<?xml version="1.0"?>
<?xml-stylesheet 
 href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rss version="0.91"><channel><title>Planet PHP</title><link>http://planet-php.net</link><description>People blogging about PHP</description><language>en</language><item><title>I'll be at ZendCon 2008 - Wez Furlong</title><link>http://feeds.feedburner.com/~r/EvilAsInDr/~3/378519651/ill-be-at-zendcon-2008</link><pubDate>Sat, 30 Aug 2008 00:10:57 +0000</pubDate><description><![CDATA[<p>
Busy times here mean that I'm leaving it a bit late to say this, but I'll be at ZendCon this year too.  I'll be giving the usual talk on PDO, but my main reason for attending this year is to sync up with other PHP folks and talk about where PHP is at and where it's going.
</p>

<p>
ZendCon has been consistently good, and I look forward to attending again this year... see you there?
</p>

<a href=http://zendcon.com><img src="http://zendcon.s3.amazonaws.com/ZendCon08_speaker_badge.gif" border="0" /></a><img src="http://feeds.feedburner.com/~r/EvilAsInDr/~4/378519651" height="1" width="1"/>]]></description></item><item><title>Speaking at PyWorks 2008 - Mike Naberezny</title><link>http://mikenaberezny.com/2008/08/29/speaking-at-pyworks-2008/</link><pubDate>Fri, 29 Aug 2008 20:54:47 +0000</pubDate><description><![CDATA[<p><a href="http://pyworks.mtacon.com/">PyWorks</a> is a new conference from the folks at <a href="http://pymag.phparch.com/">Python Magazine</a>.  It is being co-hosted with a PHP conference, <a href="http://phpworks.mtacon.com/">php|works</a>, and attendees of either conference have access to talks on both the Python and PHP tracks.  Being a user of both languages, I think this a great idea and I’m looking forward to this format.  I’ll be giving two talks at PyWorks 2008:</p>
<h4>Microcontroller Simulation in Python</h4>
<p>This talk will present <a href="http://mikenaberezny.com/2008/07/01/py65-6502-microprocessor-simulator/">Py65</a>, my open-source simulation of a small microcomputer system based on the MOS 6502. The 6502 is a very famous microprocessor that was used in early microcomputers like the Commodore 64, but its design has stood up for over 30 years.  Cores based on the 6502 are now widely used in embedded devices, with <a href="http://www.westerndesigncenter.com">WDC</a> estimating annual volumes in the hundreds of millions of units.</p>
<p>Using Python and software tools such as Py65, low-level software for embedded systems can be developed and tested much faster. This talk will discuss the design and implementation of Py65, how it and tools like it can help, and will also touch on other Python libraries that can assist with embedded development.</p>
<h4>URL Mapping with Routes</h4>
<p><a href="http://routes.groovie.org">Routes</a> is a Python package that provides a solution to the problem, “how do I map URLs to my code?” Its solution is an interesting one, and is actually a re-implementation of a feature from Ruby on Rails. Routes itself has also now been <a href="http://hagenbu.ch/blog/62">ported to PHP 5</a> as part of the Horde project. Routes is used by the Pylons web framework and other frameworks in Python, and is relatively easy to use as a standalone package.</p>
<p>The Routes method of URL dispatch is based around pattern matching rather than object publishing. For those new to Routes, we’ll have an introduction to the basic Routes concepts and how it works. We’ll also dive into the Routes internals and follow some URLs through their recognition phase, learning about how Routes does it job along the way. Web developers and framework implementers alike will gain a better understanding of Routes and how to use it effectively.</p>
]]></description></item><item><title>Customer Experiences with PHP &amp; Oracle 11g Connection Pooling - Christopher Jones</title><link>http://blogs.oracle.com/opal/2008/08/customer_experiences_with_php.html</link><pubDate>Fri, 29 Aug 2008 20:33:29 +0000</pubDate><description><![CDATA[
        There are a number of great PHP & Rails sessions at the Oracle OpenWorld conference next month in San Francisco. One session I'm keen on is "Building and Deploying Web-Scale Social Networking Applications, Using PHP and Oracle Database" This is...
        ]]></description></item><item><title>ZF+Dojo Webinar - Matthew Weier O'Phinney</title><link>http://weierophinney.net/matthew/archives/187-ZF+Dojo-Webinar.html</link><pubDate>Fri, 29 Aug 2008 20:13:06 +0000</pubDate><description><![CDATA[
    <p>
    I'm giving a <a href="http://www.zend.com/en/company/news/event/webinar-zend-framework-and-dojo-integration">webinar on Zend Framework and Dojo Integration</a> 
    this coming Wednesday, 3 Sept 2008. 
</p>

<p>
    I'm particularly excited about this webinar, as I've been developing a
    sample pastebin application to show off a number of features; the webinar
    will feature some screencasts showing the new code in action, and promises
    to be much more dynamic than my typical "bullet point and code"
    presentations.
</p>

<p>
    I'm also going to show some techniques to use when developing with ZF+Dojo,
    including how to create custom builds once you're ready to deploy your
    application (and why you want to do so).
</p>

<p>
    <a href="https://zend.webex.com/zend/onstage/g.php?t=a&d=572843054">Register
    today</a>!
</p>
 
    ]]></description></item><item><title>Scotland Holiday - Derick Rethans</title><link>http://derickrethans.nl/scotland_holiday.php</link><pubDate>Fri, 29 Aug 2008 19:58:00 +0000</pubDate><description><![CDATA[
<p>
Edinburgh, August 9th and 10th, 2008
		</p>

<p>
I had a good flight through Amsterdam to Edinburgh, the real nerves
started when my luggage did not appear on the baggage belt. Apparently I
had missed it and it had fallen off in the back, out of sight. After
being reunited with my bags slightly later and getting the car I made
the arduous trip to the "hotel".  The "hotel" was
the Heriot-Watt campus, which was neither sign-posted or easy to find.
After making a few circles through the neighbourhood, I managed to find
it. However, finding the campus wasn't the only issue -- 30 minutes
later I finally had found the reception in a pitch black night. Sleep
commenced very soon after that.
		</p>

<p>
I got up early in the morning for a light breakfast and unhappily
discovered that it was raining. Not something you should be surprised
about in Scotland. I took the bus into town to meet up with Lorna and
after a cup of tea Scott as well. Without any real plan we wandered
around the city and taking in the views. This quickly turned into
looking for food. While having some drinks over lunch we chatted a bit
more, and more walking occurred in the afternoon. We got tired, had some
more drinks and by that time Lorna had to leave for home again.
		</p>

<p>
Scott and I dropped of our gear at his room and went looking for a
comedy show to go to. The Edinburgh Fringe festival was happening, so
the biggest problem was to which of the 640 shows we wanted to go. We
settled for "Des Clarke - Desire" at the Pleasance Courtyard.
After a cup of tea in a café full of loonies, we left for the show. We
had a great time, although his accent was sometimes a bit hard to
understand for me. A cab brought me back to the "hotel".
		</p>

<p>
<img src="http://derickrethans.nl/images/content/edinburgh.jpg" align="right" alt=""/>After
sleeping in a little bit, I took the bus again to downtown Edinburgh. I
took a quick bite to give me strength to visit the Edinburgh castle. I
took the long route through Princess Gardens up the hill. The queue for
tickets took a little over hand an hour. The tour at the castle itself,
was interrupted by the occasional shower, but the weather had improved a
lot since the previous day.  The castle is a must see. I liked the
"prison of war" exhibitions best, and the crown jewels where
the anti-climax.
		</p>

<p>
After visiting the castle I was quite hungry and went to have a lunch of
stir fried scallops at the Mussels hut. With the new found energy I
climbed Caston hill. The last hours in Edinburgh I spend at the various
street theaters of the fringe. After a light dinner at "bar
One", consisting of swordfish and an apple/carrot salad I left back
by bus to the Heriot-Watt campus.
		</p>

<p>
Edinburgh to the Isle of Arran, August 11th, 2008
		</p>

<p>
I started the day with a simple though hearty breakfast at the newly
opened Mensa. From the hotel I travelled first slightly south to visit
Roslyn's chapel. Unfortunately the chapel is mostly hidden by a roof to
protect it from the rain. Inside photography was not allowed, so I
didn't manage to take any pictures. In the church I listened to a guide
explaining all the interesting art from the chapel. From pagan green
men, the apprentice pillar and the Hollywood circle, the church appeared
to house much more than I expected. From the church I left for Falkirk,
home of the Falkirk Wheel.
		</p>

<p>
The wheel replaces many locks between the Union and Forth and Clyde
canals, and is quite an engineering feat. For some time there was even
some blue sky which made watching the wheel turn more pleasant. I
continued my journey after a quick lunch towards Glasgow and to
Ardrossan where I would take the ferry to the Isle of Arran. I was a bit
early and wandered about the really windy harbour. They also tried to
fool me that my ferry would be two hours later, but that I didn't go
for. The trip of the Firth of Clyde was windy, bumpy and slight sunny.
		</p>

<p>
<img src="http://derickrethans.nl/images/content/falkirk.jpg" align="left" alt=""/>When I
got the Brodrick on the other side, I shopped for essential energy
suppliers for the upcoming walks around the island. I was staying at the
Catacol Bay hotel on the northern point of the island, where I had
breaded haddock for lunch. The wine that came with it "forced"
me to walk around a bit along the windy coast. The heavy rain that had
plummeted down when I arrived was gone. Before I went to bed I prepared
a bit for the hikes of the following day.
		</p>

<p>
Isle of Arran, August 12th, 2008
		</p>

<p>
<img src="http://derickrethans.nl/images/content/machrie.jpg" align="right" alt=""/>Hiking
on an empty stomach doesn't work, but a full Scottish breakfast might be
a bit too close to suicide. Way too much artery clogging goodness for
me. Of course, the rain had returned but that was not going to stop me
from a little hike around the "Cock of Arran". From my
"parking place" I spotted a few seals, but they were obviously
not </p><p><i>Truncated by Planet PHP, read more at <a href="http://derickrethans.nl/scotland_holiday.php">the original</a> (another 5952 bytes)</i></p>]]></description></item><item><title>PHP Opcodes - Zoe Slattery</title><link>http://zoomsplatter.blogspot.com/2008/08/php-opcodes.html</link><pubDate>Fri, 29 Aug 2008 14:07:01 +0000</pubDate><description><![CDATA[<p>For most of the last three months I have been keeping myself busy working on a project that's related to PHP and has involved looking at PHP performance.  </p>  <br /><p>It's been interesting and led me to try to understand a lot more about how the Zend engine works. I spent a lot of time reading some sections of the code, and using my favourite technique (yes, I'm sorry - it's printf()) to understand how things work.  </p> <br /><p>After one particularly frustrating day I asked a colleague (Andy Wharmby) about the issue I was looking at. Then a miracle happened - he'd not only looked at it but had documented it (and many other things) in a set of charts.</p> <br /><p>When I read the charts a lot of things I didn't understand got clearer - so, with Andy's permission - I'm making his work available to the PHP world in case other people find them as useful as I did. You can download them in Open Office format <a href="http://www.zapt.info/PHPOpcodes_Sep2008.odp">here</a>.<br /></p> <br /><p>Andy asked me to make it clear that he wrote the charts almost two years ago, so there may be bits that are out of date, or even just plain wrong. If you see things that need to be fixed please send me a mail (zoe@php.net) and I'll be happy to update the slides. Andy made extensive use of Sara Golemon's blog posts and tools written by <a href="http://pecl.php.net/package/parsekit">Sara</a> and <a href="http://pecl.php.net/package/vld">Derick Rethans</a>. Apart from that, like me, he used printf() and a debugger to look at the source for the engine.</p> <br /><p>I know that Gwynne is working on internals documentation for PHP, I am really looking forward to that. These charts, although very useful, are no substitute for a well written manual section!</p>]]></description></item><item><title>Zend Framework testing: emulating HTTP calls - Ibuildings Blog</title><link>http://www.ibuildings.com/blog/archives/1261-Zend-Framework-testing-emulating-HTTP-calls.html</link><pubDate>Fri, 29 Aug 2008 11:53:00 +0000</pubDate><description><![CDATA[
    Following last month's <a href="http://www.ibuildings.com/blog/archives/1181-Dependency-Injection-and-Zend-Framework-Controllers.html" target="_blank">article</a> by <a href="http://www.ibuildings.com/blog/authors/Ian-Barber" target="_blank">Ian</a>, here's some thoughts on how to test a Zend Framework application.<br />
<br />
One of the unit testing best practices suggests to <b>break dependencies</b>, so you can test each component separately.<br />
<br />
The first problem that arises when you want to test <b>controllers</b> might be having a tighter control over the <b>HTTP Request </b>and <b>Response</b> objects. Fortunately, ZF already has something that really makes your life easier, i.e. the <a href="http://weierophinney.net/matthew/archives/182-Testing-Zend-Framework-MVC-Applications.html">Zend_Test_PHPUnit_ControllerTestCase</a> class, which has stubs for the Request and Response <br />
objects, and you can easily check headers, return codes, routes, redirects, and even the view itself.<br />
<br />
 <br /><a href="http://www.ibuildings.com/blog/archives/1261-Zend-Framework-testing-emulating-HTTP-calls.html#extended">Continue reading "Zend Framework testing: emulating HTTP calls"</a>
    ]]></description></item><item><title>Some thoughts on green programming, PHP, Midgard and simplicity - Henri Bergius</title><link>http://feeds.feedburner.com/~r/bergie/midgard/~3/378036062/midcom-permalink-e80e368c75bf11ddbba457a6fb04df5cdf5c</link><pubDate>Fri, 29 Aug 2008 11:44:58 +0000</pubDate><description><![CDATA[<p>
<a href="http://en.wikipedia.org/wiki/Rasmus_Lerdorf">Rasmus Lerdorf's</a> excellent talk on <a href="http://talks.php.net/show/froscon08/">PHP and simplicity</a> in FrOSCon introduced me to concept of green programming. To quote the <a href="http://greenprogrammer.blogspot.com/2006/01/what-is-green-programming.html">Green Programming blog</a>:
</p>

<blockquote>
Just like we should aspire to use renewable energy sources to help the health of the planet, we should also use reusable software elements to create robust, healthy code for our customers. Eco-friendly practices might be thought of as applicable to software devlopment. Just as we are concerned with the various biota and climate of the planet, we should be concerned with the over-all health of the software eco-system.
</blockquote>

<p>
How does <a href="http://www.midgard-project.org/">Midgard</a> sit in with these ideas? Well, the current version of it does not. <a href="http://www.midgard-project.org/documentation/midcom">MidCOM 2</a> is a heavy, enterprise-oriented CMS framework that requires big machines, or even clusters to run.
</p>

<p>
But things are quite different in <a href="http://bergie.iki.fi/blog/midgard_2-more_than_just_php-more_than_just_cms.html">Midgard 2 land</a>. We have <a href="http://bergie.iki.fi/blog/some_plans_for_midcom_3.html">rewritten the MidCOM framework</a> from scratch, removing the need to have abstractions on top of abstractions to support the shift from <a href="http://www.midgard-project.org/documentation/reference/#9f42c2021f0b0efedacd0ae9d6801c5c">classic Midgard APIs</a> to the <a href="http://www.midgard-project.org/documentation/reference/#3855e6325f5459c1d4f3b9863bc7debe">new ones</a>, and from PHP4 to <a href="http://tr2.php.net/zend-engine-2.php">more object-oriented PHP versions</a>. We have also focused on simplicity and adaptability, to make MidCOM an easier environment <a href="http://bergie.iki.fi/blog/midcom_3_at_a_glance.html">to work with</a> for site developers.
</p>

<p>
While MidCOM3 is not due to be out before next March, <a href="http://teroheikkinen.iki.fi/">Tero Heikkinen</a>, an early adopter has been building some production sites with it already. And his experiences state that not only the performance is much better, but also it requires much less work from programmers.
</p>

<p>
I know <a href="http://www.sitepoint.com/blogs/2008/08/29/rasmus-lerdorf-php-frameworks-think-again/">Rasmus' argument is that frameworks are evil</a> by requiring developers to adopt to their own concepts, and by introducing unnecessary overhead. But we should look beyond mere server-level productivity, and take programmer productivity into account. A framework makes things much easier for agile teams, enabling people with different competences to work in their isolated environments. Programmers can work on the code, and designers on <a href="http://phptal.motion-twin.com/">the templates</a> for instance.
</p>

<p>
While this makes the actual development and deployment process more efficient, how much performance is lost due to the framework?
<br/><span style="font-size:14pt;"><strong>
<br/>Lies, damn lies and benchmarks
<br/></strong></span>
</p>

<p>
Like Rasmus, I used an <a href="http://pecl.php.net/package/APC">APC-cached</a> simple PHP "<em>hello world</em>" file as the baseline for my benchmarks. On my <a href="http://www.marco.org/277">dog slow MacBook Air</a>, the simple PHP file was able to serve <strong>32.91</strong> requests per second.
</p>

<p>
MidCOM3, when run on <a href="http://www.midgard-project.org/updates/view/1219823947.html">Midgard 8.09</a> with APC and <a href="http://www.danga.com/memcached/">memcached</a> was able to serve <strong>8.90</strong> request per second, or in other words performed at 27% of the plain PHP file. Not too good, but considered that much SQL is run to <a href="http://www.midgard-project.org/documentation/concepts-host_and_page/">serve a Midgard page</a>, there are good explanations at this.
</p>

<p>
But compared to <a href="http://drupal.org/">Drupal</a>, which I did not install but instead calculated <a href="http://talks.php.net/show/froscon08/32">the performance</a> based on the difference between my baseline (32.91 r/s) and Rasmus' (611.78 r/s), MidCOM3 was doing quite fine. Drupal would only be serving about <strong>2.5</strong> requests per second on my box. <a href="http://framework.zend.com/">Zend Framework</a>, again calculated from <a href="http://talks.php.net/show/froscon08/29">Rasmus' data</a> would provide <strong>6.5</strong> request per second.
</p>

<p>
And this is not all. <a href="http://blogs.nemein.com/people/piotras/">Piotr Pokora</a> has done a stellar work with <a href="http://bergie.iki.fi/blog/midgard_2-more_than_just_php-more_than_just_cms.html">Midgard2</a>, which <a href="http://bergie.iki.fi/blog/midgard_and_synchronized_releases.html">will come out in spring</a> numbered 9.03. With it, MidCOM's numbers were quite a lot be</p><p><i>Truncated by Planet PHP, read more at <a href="http://feeds.feedburner.com/~r/bergie/midgard/~3/378036062/midcom-permalink-e80e368c75bf11ddbba457a6fb04df5cdf5c">the original</a> (another 1959 bytes)</i></p>]]></description></item><item><title>ZendStudio/Ubuntu Reloaded - Florian Anderiasch</title><link>http://codeschmie.de/archives/246-ZendStudioUbuntu-Reloaded.html</link><pubDate>Fri, 29 Aug 2008 06:08:31 +0000</pubDate><description><![CDATA[
    Back when installing ZendStudio 5.5.0 on Ubuntu I sometimes had the following error:<br />
<blockquote>An internal LaunchAnywhere application error has occured and this application cannot proceed. (LAX)<br />
<br />
Stack Trace:<br />
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.<br />
        at java.util.Properties.loadConvert(Unknown Source)<br />
        at java.util.Properties.load(Unknown Source)<br />
        at com.zerog.common.java.util.PropertiesUtil.loadProperties(DashoA8113)<br />
        at com.zerog.lax.LAX.<init>(DashoA8113)<br />
        at com.zerog.lax.LAX.main(DashoA8113)</blockquote><br />
<br />
This is because the <tt>\u</tt> variable of bash (username in the prompt) is mistaken for an (illegal) \uXXXX unicode character.<br />
<br />
After searching back then I found out (and back then it wasn't #1 hit on a google search) that you just have to temporarily alter your <tt>.bashrc</tt>:<br />
<br />
<code><br />
(fa@don):(~) $ echo 'export PS1="# "' >> .bashrc<br />
(fa@don):(~) $ source ~/.bashrc<br />
</code><br />
then start the installer and after you're finished, removed the last line and <tt>source</tt> it again.<br />
<br />
For another problem, see <a href="http://codeschmie.de/archives/197-ZendStudioUbuntu.html">that posting</a>.  
    ]]></description></item><item><title>Book Review: Learning Facebook Application Development - Ken Guest</title><link>http://blogs.linux.ie/kenguest/2008/08/29/book-review-learning-facebook-application-development/</link><pubDate>Fri, 29 Aug 2008 00:33:28 +0000</pubDate><description><![CDATA[<p>
It’s been a while since I posted a review about a packt published book.<br />
I was sent a copy of “<a href="http://www.packtpub.com/learning-facebook-application-development/book">Learning Facebook Application Development</a>” by Hasin Hayder and Dr Mark Alexander Bain a while ago. The by-line description of the book is “A step-by-step tutorial for creating custom facebook applications using the Facebook platform and PHP”. It is precisely that.
</p>
<p>
Here’s my review of it:
</p>
<p>
The book was published prior to Facebook’s facelift but this doesn’t really impact on the usefulness of the book.<br />
An overview of FBML, FQL, FBJS (a restricted subset of JavaScript and enforced for security reasons) are given along with information on how to use the test consoles, publish to news feeds, some multimedia aspects of what can be done in Facebook applications and more.
</p>
<p>
Happily the book focuses on using PHP5 for developing Facebook Applications - while there are classes available for developing FB apps with PHP4 there really is no point in doing so; especially now that official support for PHP4 was withdrawn last month.<br />
MySQL appears to be the database system of choice for the examples and Linux/Unix oriented solutions for scheduling tasks to  occur regularly are given - some Windows screenshots feature in chapter one with regard to setting up the client libraries for local development but other than that everything else is unix-centric.
</p>
<p>
I found “Facebook Application Development” more useful than facebook’s own documentation with regard to the main aspects of developing a Facebook application - it is written well and easier to follow than the online documentation and while it is true to say that the Facebook Platform is evolving I am of the opinion that Heyder and Bain’s work will still be applicable for a long time.</p>
]]></description></item></channel></rss>
