On the GitHub Support forums Kastner has proposed an idea - making something similar to gethub gems but for PHP:
Just like ruby/gems, PHP has a packaging/distribution system called PEAR. I think that running a pear channel would help the PHP community with things like GPL extensions, as well as increasing participation in the community. Thoughts?
There's already thirteen comments on the post, all supportive of the idea including interest from the GitHub folks themselves.
In this new post to till's blog, he looks at a method for setting up PEAR on a Plesk system.
Now running any config interface is a blog entry by itself and when I say Plesk, I should also mention confixx and cpanel. And while I have a strong dislike for all them, let me focus on Plesk for now. This is not a copy'n'paste howto, so make sure you double-check all steps involved. With little knowledge, you should be able to to apply all instructions to any other control panel, all you need is SSH access to the server.
The process includes two different sections - why your PEAR installation may not be working and how to install the PEAR packages (on any system supporting a package manager). Command line calls and configuration options are also included.
DevShed has posted a new tutorial today looking at one of the more useful tools a developer can add into an application - logging.
If there is no logging mechanism, then if there's a goof-up in a production environment, you have absolutely no idea what went wrong. The only thing which a support developer can do in this case is to reproduce the issue at the developer end, which sometimes work and sometimes don't.
The look at the types of logging (trace logs, audit logs and user logging/history) and create a simple class that allows flexibility for file location, priority and timstamping. Their script contains a writelog method that does all the work (including pushing it through the PEAR logging class).
Matthew Turland has this new blog post looking at some benchmarks he's generated for a group of mainstream PHP HTTP clients:
One of the interesting bits of research that I've done is benchmarking various mainstream PHP HTTP clients. Of course, we all know that there are lies, damned lies, statistics, and benchmarks, so take these with a grain of salt.
He ran them on his Sony Viao on Ubuntu with a stock PHP5 package. The tested packages were the pecl_http extension, the streams http wrapper, curl integration into PHP 5, PEAR::HTTP Client class and the Zend_Http_Client component. He includes the code he used for both a basic request and for something slightly more complex (posting form data). He used the XDebug and KCachegrind combination to produce the results.
On the Developer.com website today, Jason Gilmore has a new tutorial covering a important feature of any based PHP install (unless disabled, of course) that is widely taken advantage of - sending emails.
Email plays a crucial role in website development, whether you'd like to confirm a new registrant's email address, recover a lost password, or provide prospective clients with a convenient means to contact you. [...] In this tutorial, I'll introduce you to several solutions for sending email using PHP, including PHP's native mail() function, PEAR's Mail package, and the Zend Framework.
He starts with some of the fundamentals of mail - the difference between POP3 and SMTP, Sendmail, etc - before moving on to an example of the mail function's usage. He does the same with the PEAR Mail package and the Zend_Mail component of the Zend Framework.
Sameer has posted a new tutorial to his blog recently, a look at a drop-in solution for pagination in your application - the PEAR Pager package.
Pagination is a frequent requirement in web development projects. Most PHP developers must have already implemented paging in one form or other in their projects. In this post we will see how to add pagination the easy way using PEAR's Pager class. Note that in all the posts I use PHP 5.x.x, so if you are still stuck at version 4.x.x, its already time to upgrade.
He includes a simple example (just the page links), how to install the Pager package and a larger example where the results are pulled from a database table and paginated correctly based on an offset ID. There's even some CSS thrown in to make it a bit more pleasing to the eye.
Christian Weiske set out on a project - no small thing - to convert the current PEAR documentation info over to the PhD DocBook rendering system. In a new post he talks about the conversion process and some of the technology involved.
The reason for PhD to exist was that the previously used DSSSL based system was slow: a full build (all formats and all languages) took 24 hours to complete. Further, the tools the system based on were old, rusty and nobody understood why they broke on some machines, but also why they worked on other ones. Having a php-based system for PHP ensures that there is always someone around who can fix it if it's broken. This wasn't the case with the old documentation build system.
The conversion was spurred on by the fact that the PEAR documentation stopped building and more and more people were finding it hard to build on their machines too. He walks through the steps he took - installing PhD, converting over the docs to the DocBook 5 format and the first builds with the new system.
Now that at the XML was shiny, too, it was time to actually use PhD on it. The numbers were amazing: While a build for one format and one language took around 40 minutes on my system (dual core Macbook with 2GHz and 2GiB RAM), building the same with PhD takes 45 seconds!
On Devollo.com the first part of a series looking at something every PHP developer (or any other for that matter) should include in their application - data filtering.
Filtering data. We all have to do it. Most, if not all of us, despise doing it. However, unbeknown to most are PHP's filter_* functions, that allow us to do all sorts of filtering and validation. Using PHP's filter_* functions, we can validate and sanitize data types, URLs, e-mail addresses, IP addresses, strip bad characters, and more, all with relative ease. This is part one of two, covering filter_var() and the different constants and flags that can be set.
This method, using the filter extension, takes a lot of the work out of making sure that user-submitted data is what it should be. They include examples of how to filter numeric types, URLs, email addresses and how to sanitize the data to be sure there's no cross-site scripting or SQL injections to be found. This is a great reference if you're looking to get started with the filter extension.
In a new tutorial from DevShed today, they take a look at some of the "networking" functions that PHP has to offer - basically anything that can make a network connection.
PHP has a great many tools for interacting with a network and also with the Internet. In this article we will look at some of those tools and functions to see how we can use them to make our scripts more useful in a network environment.
Helgi has posted about an update to the next alpha release of PEAR to remove support for certain versions of PHP:
For the next alpha release of PEAR that will happen in 2 - 4 weeks we'll have a min dep of PHP 4.4 and 5.1.6, so basically excluding 5.0.0 - 5.1.5 Now why am I going to do that?
This pushes more people up from the PHP 4.3.x series (to the 4.4.x that was the last PHP4 release) and up to a more recent PHP5 version for the future. Eventually, PHP4 support will be dropped all together, but for now there's a bit of a hold out.