If part of your job involves debugging or monitoring PHP apps,
you'll most likely have used tail to check for
errors in a log file. While practical, it can become tedious to identify
certain types of errors or warnings. If, on average, you spend 15 minutes per
day searching for problems, those minutes add up to about 91 hours per
yeara€‰-a€‰time you could have spent doing more interesting work!
This article will look at implementing ptail, a PHP version
of tail -f. We'll introduce the
I resurrected another piece of software I did a few (too many) months ago in the "proof of concept" phase of Jackalope, a content repository browser.
I wrote that back then, when we were experimenting with the jackrabbit-davex-client library and integrated that into PHP with Zend's Java Bridge. I did it with our homegrown PHP framework Okapi and YUI (2.6, IIRC). Here's a screeenshot:
What you mainly can do is browse your repo and see all the nodes and properties and edit some of them.
The great thing...
On the PHP North West site today there's a new video posted of a session at the PHP North West 2010 conference - Robert Mortimer's talk "Let your toolchain set you free".A quick romp though installing a full php development tool chain. Starting at A for Apache and ending at X for X-debug including U for unit testing and S for source control.You can watch the video and check out the source he uses in the talk. For more great sessions, check out the latest news on the PHPNW site.
Over the weekend Stanislav Malyshev asked a question on the StackExchange.com Programmers section as an open request to all of those working with PHP - what features would you like to have in PHP?Since it's the holiday season now and everybody's making wishes, I wonder - which language features you would wish PHP would have added? I am interested in some practical suggestions/wishes for the language.By practical he meant something that's possible, something that doesn't make PHP "not PHP", a change that...
I'm spending this holiday season trying to plow through some of the books that have been stacking up lately. There are just too many good books out there. Today's book is by Vikram Viswani, a name regular readers will recognize instantly. Click on in and let's take a look at his latest work.
In this new post to his blog Bence Eros shares some of the frustrations and issues he's had when dealing with static methods and properties in his applications and how, with a bit of re-engineering, you might be able to have "life without static".The problem with static members in PHP is the poor initialisation capabilities. The initial value of a static property can only be a literal or a named constant. [...] The same problem exists for non-static properties too, but the constructor is a dedicated...
Midgard 10.12 was released last week as a developer preview of what is coming in the world of content repositories:
Ilia Alshanetsky has started to gather more and more information about PHP usage on the web as a whole (that was started here) and has been extended with some additional statistics he's done on the location of the domains he's collected.The first step of the process has been resolving all of these domains, which is now complete. The next step is fetching the server information, which began, but will take some time to finish. However, even from the domain revolving data there is a lot of useful data to be...
Rob Allen has another Zend Framework-themed post to his blog today looking at handling exceptions in front controllers a bit more correctly than they're currently treated.If you have a Zend Framework Front Controller plugin which throws an exception, then the action is still executed and then the error action is then called, so that the displayed output shows two actions rendered, with two layouts also rendered. This is almost certainly not what you want or what you expected.He points out the more...
Kevin Schroeder has released a series of blog posts based on a webinar he did for Zend about using the SimpleCloud API to work with cloud services on multiple platforms seamlessly.The Simple Cloud API brings cloud technologies to PHP and the PHPilosophy to the cloud, starting with common interfaces for three cloud application services: file Storage Services, document Storage Services, simple Queue Services. You can start writing scalable, highly available, and resilient cloud applications that are...
On the Content with Style blog today they take a look at some buggy functionality with parent:: they've found in the latest version of PHP, 5.3.3.So, this app I hadn't been looking at in a few months did not work at all. I traced the bug down to a method that itself called a parent method. The parent only contains __call and __callStatic methods, and for some reason __callStatic was called, although the class it was called from was an object instance.After using some sample code from the PHP manual, they...
Following up on a previous post about taking the Zend Certified Engineer exam (5.3 version), Lorna Mitchell has posted some details about how she prepared for (and passed) the test.In the last few weeks I've both passed the certificate myself and also taught Zend's certification training course as a classroom course at NTI Leeds. I thought I'd share my top tips for preparing for taking the ZCE - getting to the standard, last-minute preparations, and also some tips for surviving the day itself...
Recently I have been getting to grips with the ZCE since it was updated to take account of PHP 5.3. In the last few weeks I've both passed the certificate myself and also taught Zend's certification training course as a classroom course at NTI Leeds. I thought I'd share my top tips for preparing for taking the ZCE - getting to the standard, last-minute preparations, and also some tips for surviving the day itself (disclaimer: everyone sitting the ZCE signs a declaration not to disclose the contents of...
From yesterday's PHP Advent article:
PHP has been around nearly as long as there has been a Web to develop for, but it evolves constantly and is a modern programming language by almost any definition. Sure, it might not suit hipsters who only enjoy bands when they can say a€oyou probably have not heard of them; they only formed tomorrow,a€¯ but it is not your granddad's programming language. Sadly, web development often also involves SQL, and that is your granddad's programming language. SQL, and the...
Big data, data science, analytics. These are some of the hottest
buzzwords in tech right now. Five years ago, the boasting rights went to the
geek with the largest number of users: these days he with the biggest data
There are a number of approaches to dealing with vast quantities of data,
but one of the best known is
Hadoop is a toolkit for managing large data sets, based originally on the
Google whitepapers about MapReduce and the Google File System. For
the Mozilla crash...
I recently re-started the process or aggregating PHP usage data and first sample of small dataset (about 10 million domains) has been the subject of my PHP Advent article. Now, I've started the process of collecting the data on the full data set which comprises of 124 million domains that represent the entirety of .com, .net, .biz, .info, .us, .sk and .org TLDs.
The first step of the process has been resolving all of these domains, which is now complete. The next step is fetching the server information,...
For a long time I've held that __get and __set in PHP were not all that hot A - mostly because it's solely error handling. A There's no way to deal invoke __get or __set behaviour for properties that are defined on a class. A That's sort of a beef for another post (I'd started an RFC some time ago on trying to extend that behaviour to defined properties as well as undefined, but didn't finish it, life got in the way, and various other reasons - again, perhaps for another day).
For those who insist on...
I'm currently running a little database analysis to see how many of our users might be affected by Gawker's breach of security the other week. Since we use Zend Framework, Zend_Db is our weapon of choice.
Running the queries I noticed, that Zend_Db doesn't seem to support an IN-clause with a straight fetchAll().The IN-clause is only supported when I wrap my statement with Zend_Db_Select, which is something I rarely do. Part of the reason is that I still don't feel comfortable writing my SQL in a DSL...
Back when we first launched ResolutionFinder.org we of course already had many ideas for improvements. This is now the first big push to add these to the site. Of course since then we have even more ideas, but this is still a big jump forward. The main thing we added was the ability to not only search for clauses (aka sections within UN documents), but also documents themselves. Here I was hoping to be able to use the patches for FieldCollapsing for solr, but it turns out they are not yet ready for...
PHP has been around nearly as long as there has been a Web to develop
for, but it evolves constantly and is a modern programming language by
almost any definition. Sure, it might not suit hipsters who only enjoy
bands when they can say a€oyou probably have not heard of them; they
only formed tomorrow,a€¯ but it is not your granddad's programming
Sadly, web development often also involves SQL, and that is
your granddad's programming language. SQL, and the stored procedure
languages you are most...