News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Phil Sturgeon:
What is The League of Extraordinary Packages?
October 16, 2014 @ 10:48:29

In his latest post Phil Sturgeon talks about a project that's been running for a while, the The League of Extraordinary Packages and aims to clear up some recent misconceptions about the group and what they strive for in the projects they endorse.

This is the story of group of friends, who decided to write some code, but somehow confused and angered everyone with a keyboard. [...] Where should I release this code [I was super excited about releasing]? Should I release it with a vendor name of Sturgeon? That seemed rather egotistical. I could make something up, but what is the point of a single vendor with a single package? I wondered if any of my buddies were having this problem. [...] Being as hungover as I was, I thought long and hard, for about 5 seconds until something amazing happened in my brain... The PHP Super Best Friends Club! The guys loved it, and we started making plans immediately.

He goes on to talk about The League and some of the goals of the organization including the stated desire for quality code and a constant stream of work on the project (no abandoned or stale projects). He talks about how some of the rules for inclusion were created and some of the members of the various projects it includes. He then gets to the "recent misunderstanding" part of things with the clash of the League and the PHP-FIG (see here). He clears up some of the confusion in that thread by stating that:

  • League != PHPClasses
  • League != PEAR

He finishes off the post talking some about the leadership of the group (hint: it's an organization, not really run by a person or persons) and some of the work he's doing to ensure the future of the League and the packages it includes.

0 comments voice your opinion now!
league extraordinary packages phpclasses pear compare rules community

Link: https://philsturgeon.uk/blog/2014/10/what-is-the-league-of-extraordinary-packages

Amazon Web Services Blog:
End of Life of PEAR Channel
August 20, 2014 @ 11:14:18

If you're a user of the Amazon AWS Web Services SDK software and are using the PEAR channel for installing the tool, you'll need to check out this new post to the AWS blog about its retirement.

There's been a noticeable wave of popular PHP projects recently announcing that they will no longer support PEAR as an installation method. Because the AWS SDK for PHP provides a PEAR channel, we've been very interested in the discussion in the community on PEAR channel support. PEAR has been one of the many ways to install the AWS SDK for PHP since 2010. While it's served us well, better alternatives for installing PHP packages are now available (i.e., Composer) and literally all of the PEAR dependencies of the AWS SDK for PHP are no longer providing updates to their PEAR channels.

He goes through several of the major dependencies the AWS SDK has (like Phirum, PHPUnit and Guzzle) and how they've announced the retirement of their own PEAR channels. Updates to the AWS SDK PEAR channel will cease on September 15th, 2014 but will still be available for downloads of older versions of the library. He also links to the location of the latest Phar and Zip archives if you'd like to use those.

0 comments voice your opinion now!
aws sdk endoflife pear channel announcement

Link: http://blogs.aws.amazon.com/php/post/TxFFMBZ80DA1OJ/End-of-Life-of-PEAR-Channel

PEAR Blog:
PEAR 1.9.5 is out
July 14, 2014 @ 11:09:24

The PEAR blog has posted a new announcement about the latest release of the PEAR PHP package manager, version 1.9.5.

The PEAR installer version 1.9.5 has been released today. The new version - three years after the last stable 1.9.4 and 2 weeks after the preview - is a bugfix only release. 13 bugs have been fixed.

Fixes include things dealing with broken Windows pathing and a change to report the correct php.ini setting for the installed XDebug.

0 comments voice your opinion now!
pear package manager release bugfix

Link: http://blog.pear.php.net/2014/07/12/pear-1-9-5/

Hannes Magnusson:
I have a dream
May 26, 2014 @ 09:23:54

In his latest post Hannes Magnusson describes his "dream" about a future for PHP where things like upgrading and working with extensions would be simpler, faster and more manageable.

Today we will revolutionize PHP. We will make it easier to upgrade the things you care about. We will make it easier to not upgrade things you don't want to upgrade. We will make it easier to distribute your extensions. We will make it easier to release according to your own schedule. We will make it easier to add functionality. We will make it easier to work. Ok, today is a white lie here maybe... I haven't actually implemented this, but bare with me here for a second.

With the introduction and huge growth of Composer, the PEAR package manager is fading in popularity and is slowly being abandoned. Unfortunately, it's still the primary mechanism for deploying and installing PHP extensions (PECL packages). He talks about some of his recent experience reviving a package and issues he had around the use of the packaging manager. He proposes the creation of a new "pecl install" tool - a package manager dedicated to PHP extensions, decoupled from PEAR.

The manager would just install basic PHP then leave it up to you to pick which features you need from there. The idea is still in its early stages, but the idea has taken roots and plans are being worked through to see if this idea will work for the future of the language.

0 comments voice your opinion now!
pear pecl future language package manager extension

Link: http://bjori.blogspot.com/2014/05/i-have-dream.html

Matthias Noback:
Inject a repository instead of an entity manager
May 19, 2014 @ 11:04:30

Matthias Noback has made a recommendation in his latest post about using a repository rather than an entity manager in your classes to inject dependencies.

It appears that I didn't make myself clear while writing about entity managers and manager registries yesterday. People were quick to reply that instead you should inject entity repositories. However, I wasn't talking about entity repositories here. I was talking about classes that get an EntityManager injected because they want to call persist() or flush(). The point of my previous post was that in those cases you should inject the manager registry, because you don't know beforehand which entity manager manages the entities you are trying to persist. By injecting a manager registry you also make your code useful in contexts where another Doctrine persistence library is used.

He suggests that more classes actually need a repository and not an entity manager to work with necessary objects. He also points out how the use of an entity manager can sometimes violate the Law of Demeter. He includes some code showing a refactoring away from an entity manager and towards a repository. He also has an example of a custom repository class based on the domain logic object types. In addition he talks about repository interfaces, resetting closed entity managers and "criteria" objects.

0 comments voice your opinion now!
repository entity manager doctrine refactor example

Link: http://php-and-symfony.matthiasnoback.nl/2014/05/inject-a-repository-instead-of-an-entity-manager/

Fabien Potencier:
The rise of Composer and the fall of PEAR
May 05, 2014 @ 09:17:32

Fabien Potencier has a new post to his site today talking about a recent trend in the PHP community around dependency and package management, the rise of Composer and the fall of PEAR.

As a good package manager to let user easily install plugin/bundles/MODs was probably also a big concern for phpBB, I talked to Nils about this topic during this 2011 hackday in San Francisco. After sharing my thoughts about libzypp, "..., I [Nils] wrote the first lines of what should become Composer a few months later". [...] So, what about PEAR? PEAR served the PHP community for many years, and I think it's time now to make it die.

He goes on to talk about how he personally has used PEAR in the past and when he stopped work on Phirum, a simplified PEAR channel manager. Based on some logging results, he found that most dependencies on his channels were related to PHPUnit's needs. When Sebastian Bergmann announced the move of PHPUnit away from PEAR Fabien decided to make his own move to deprecate and eventually remove new releases from the PEAR sources.

0 comments voice your opinion now!
composer pear package manage deprecate

Link: http://fabien.potencier.org/article/72/the-rise-of-composer-and-the-fall-of-pear

Community News:
PHPUnit Announced End of Life on PEAR Installation Method
April 21, 2014 @ 10:29:53

There's a new addition to the GitHub wiki that's quite important for the PHPUnit users out there. Sebastian Bergmann has officially announced the end of life for the PEAR version of the installer for the popular PHPUnit tool.

Since PHPUnit 3.7, released in the fall of 2012, using the PEAR Installer was no longer the only installation method for PHPUnit. Today most users of PHPUnit prefer to use a PHP Archive (PHAR) of PHPUnit or Composer to download and install PHPUnit. Starting with PHPUnit 4.0 the PEAR package of PHPUnit was merely a distribution mechanism for the PHP Archive (PHAR) and many of PHPUnit's dependencies were no longer released as PEAR packages. Furthermore, the PEAR installation method has been removed from the documentation. We are taking the next step in retiring the PEAR installation method with today's release of PHPUnit 3.7.35 and PHPUnit 4.0.17.

Included in this end of life, they'll also be decommissioning pear.phpunit.de to happen no later than the end of 2014.

0 comments voice your opinion now!
pear phpunit install method composer phar download

Link: https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation-Method

Ross Tuck:
Persisting Value Objects in Doctrine
March 03, 2014 @ 10:11:29

Ross Tuck has submitted a new article he's posted about persisting value objects in the popular PHP database storage and object mapping library, Doctrine. Value objects are immutable objects that " follow value semantics rather than reference semantics".

I've been using more and more Value Objects in my applications over the last year, primarily with Doctrine ORM. Value Objects are an extremely powerful technique and I've been impressed with how much they can clean up a codebase. One of the main questions I've had when starting with Value Objects is how to persist them with Doctrine. This post attempts to create a reference for all the different persistence techniques I've seen so far.

You'll need to be familiar with Value Objects and Doctrine before starting (it's not an "intro to Doctrine" article). His example sets up an "IPRange" and an "IPAddress" that are stored in a "Server" instance. He talks about mapping the value object to the database and the getter/setter to do the work. He also touches on DBAL types, working with multiple columns in the entity and the "promised land" of embeddables. He finishes off the post looking at collections of entities and some of the other options to what he's shown (including serialization).

0 comments voice your opinion now!
doctrine valueobject value object database entity dbal embeddables

Link: http://rosstuck.com/persisting-value-objects-in-doctrine/

Doctrine Project:
Our HHVM Roadmap
December 24, 2013 @ 11:57:58

The Doctrine project has posted an update about the work being done in collaboration with and to help its performance with HHVM (the HipHop VM from Facebook) and talking about their future plans.

Facebook has been pushing HHVM alot lately, helping open source projects to get their test-suite running 100%. For Doctrine HHVM is particularly interesting, because of the performance gains that the complex PHP algorithms inside ORM would probably get. From my current feeling Doctrine will be the PHP open-source project getting the most gain from running on HHVM. However with the tests not yet passing on the ORM, we can only imagine how big that performance improvement will be.

One of their goals is to be able to run DBAL/ORM on HHVM with 100% passing tests. So far they've been working on Common project functionality and have three as fully supported under HHVM - Collections, Inflector and Lexer. Work is still being done on other parts of the codebase, with the ORM and DBAL being the lion's share of the job.

0 comments voice your opinion now!
doctrine project hhvm facebook orm dbal common

Link: http://www.doctrine-project.org/blog/our-hhvm-roadmap.html

Benjamin Eberlei:
Feature Flags and Doctrine Entities
December 06, 2013 @ 09:40:00

In a new post to his site Benjamin Eberlei takes a look at the idea of "feature flags" (settings to turn on and off major features) and how they can be used with Doctrine entities to handle sync issues between new properties and the database schema.

The problem of feature flags with Doctrine is easily explained: If you add properties for a new feature that is disabled in the Doctrine metadata, then you need to upgrade the database before deployment, even when the feature is not being rolled out for some days/weeks. Doctrine requires the database to look exactly like the metadata specifies it.

His solution was to use the "loadClassMetadata" event in the entity to dynamically append these new properties based on simple "if" checks of feature flags in the configuration object. Obviously using this is a bit of a hack until the new properties are in place, but once they are then the only change is removing this code.

0 comments voice your opinion now!
feature flag doctrine entities class metadata if check

Link: http://www.whitewashing.de/2013/12/05/feature_flags_and_doctrine_entities.html

Kristopher Wilson:
Decoupling the Framework
December 02, 2013 @ 12:19:36

Kristopher Wilson has a new post to his site talking about something that could be very difficult with an existing application (and a good starting place for a new one) - decoupling from the framework. He advocates that your application shouldn't be an extension of the framework, more so a user of it to make it potentially easy to replace.

We spend a lot of time discussing and analyzing the features and merits of several frameworks, trying very hard to make sure we find the perfect one to use for our project. Rightfully so: picking the wrong framework can lead to a slew of issues down the road in terms of maintenance and scalability. [...] We also spent a considerable amount of effort making sure that there is minimal amount of coupling within our code. Strong coupling leads to problems testing, adapting, refactoring and reusing code. What if we applied that same principal to dealing with whatever framework we're using?

He goes on to look at the "framework is not your application" concept and fleshes it out with examples of it applied to a few different topics: Controllers, Models and ORMs. He also shows how, through the use of something like Doctrine's EntityManager, you can easily abstract things out so the internals of the application can easily split the application and framework.

0 comments voice your opinion now!
decouple framework controller model orm doctrine entity

Link: http://kristopherwilson.com/2013/11/27/decoupling-the-framework/

Ben Ramsey:
The Fall of PEAR and the Rise of Composer
November 27, 2013 @ 09:17:35

Ben Ramsey has an interesting post to his site today looking at what he calls the Fall of PEAR and the rise of Composer when it comes to package management in the PHP community.

PEAR's biggest selling-point -the curation of packages by a governed community - was also its biggest problem. There was no choice, and things moved slowly. If a package stagnated in development, I couldn't find another actively supported one to solve the same need. In theory, the maintenance of the package could be taken over by someone else, but this didn't always happen, and contributing patches was not clear or easy.

Ben talks about how, despite the PEAR development's best efforts, the proposed new package manager (Pyrus and PEAR2) couldn't keep up. Then, from a discussion had at a conference, the idea of a standards group was formed, the PHP-FIG, and the first standard soon followed, PSR-0 for autoloading. With this in hand and becoming widely adopted, a new tool was created to make it easier to share and install packages with this new standard - Composer.

Composer is what PEAR should have been. Through Packagist, Composer is the democratization of PHP userland libraries. Many libraries in the repository implement similar functionality, but through a show of popularity, the community self-selects the packages that are of the best quality. [...] In just a few short years, Composer has revitalized the PHP community and changed the way we do development.
0 comments voice your opinion now!
fall pear rise composer psr0 phpfig package management

Link: http://benramsey.com/blog/2013/11/the-fall-of-pear-and-the-rise-of-composer/

Rob Allen:
Setting up PHP & MySQL on OS X Mavericks
November 04, 2013 @ 09:52:25

For those that have made the switch to OSX Mavericks and are wondering how to get PHP and MySQL into a working state, Rob Allen has posted a quick guide to getting it all set up.

With OS X 10.9 Mavericks, Apple chose to ship PHP 5.4.17. This is how to set it up from a clean install of Mavericks. Note: If you don't want to use the built-in PHP or want to use version 5.5, then these are [other] alternatives: a binary package from Liip, Zend Server and a Homebrew install.

He provides all the commands you'll need to get things up and running including checking file/directory permissions, installing MySQL and using the command line to work with Apache (no more "Web Sharing"). He also includes the configuration changes to be made to the php.ini including how to enable Xdebug. There's lots of other good things included in the guide as well like setting up Composer, PHPUnit and how to compile a few handy extensions.

0 comments voice your opinion now!
osx mavericks mysql install configure apache extension pear pecl phpunit

Link: http://akrabat.com/computing/setting-up-php-mysql-on-os-x-mavericks/

David Adams:
Is ORM abstraction a pipe dream?
October 23, 2013 @ 09:59:21

David Adams has published a recent post that wonders if ORM abstraction is a "pipe dream" when it comes to abstraction. ORM stands for "object relational mapper" and is commonly used as a layer between the application and a dta source to work with the data as objects, not directly with it. He instead investigates replacing the ORM layer with multiple instances of repository pattern-structured code to abstract thing even more.

I was recently introduced to the repository pattern, a type of abstraction and organizational technique. The idea being, create a repository for each of your models to retrieve and persist to and from. A supposed benefit of the repository pattern is the ability to abstract your ORM and create different implementations for Eloquent, Doctrine, Propel, etc. This abstraction intrigued me. I set off to put this idea into practice and see what it took. Here are my findings.

He looks into how Doctrine handles its entities and tries to mimic some of the logic, including the calls to "save" and "flush". He also looks at how to handle a few other common ORM-ish topics like relationships, validation and observers. Unfortunately, he hit a wall with his solution and wasn't able to figure out a good Repository-based solution.

0 comments voice your opinion now!
repository designpattern proofofconcept orm object mapper doctrine entity

Link: http://programmingarehard.com/2013/10/21/is-orm-abstraction-a-pipe-dream.html

Benjamin Eberlei:
Doctrine and SOLID
February 05, 2013 @ 11:09:33

Benjamin Eberlei has a new post to his site today answering a question he sometimes gets about using Doctrine2 in a SOLID context (more on SOLID development here) as it seems difficult to follow the Single Responsibility Principle with how the tool is used.

These problems are related to the inability to share behavioral code through aggregation and the complexity of state transformations. Combining both, your average entity with 5-15 fields can end up with hundrets or thousands lines of code. The solutions to both problems boil down to minimizing duplication and maximizing clarity.

He looks at two different kinds of objects Doctrine uses in its setup, the value objects and method objects, and "maximize clarity" on them by dividing them up into more functional-related objects, passed into each other via method injection.

0 comments voice your opinion now!
doctrine value method objects clarity solid development principles


Gonzalo Ayuso:
Handling several DBALs in Symfony2 through the Dependency Injection with PHP
January 16, 2013 @ 10:47:32

Gonzalo Ayuso has a second post in his series looking at using the Symfony2 dependency injection container with Doctrine functionality. In his previous post he talked about sharing PDO connections via the DIC. In this latest one it's focused on the sharing of DBALs from Doctrine.

OK. We can handle PDOs connections inside a Symfony2 application, but what happens if we prefer DBAL. As we know DBAL is built over PDO and adds a set of "extra" features to our database connection. It's something like PDO with steroids.

He includes the (PHP) configuration to set up the DBAL and the YAML definition to set it up in the DIC's configuration. As an update to the post, he also points out a bundle for Symfony2 that lets Doctrine do this natively - check out this documentation on github.

0 comments voice your opinion now!
dependency injection dic symfony2 doctrine dbal tutorial


Michael Nitschinger:
Caching Doctrine Entities with Couchbase
January 08, 2013 @ 10:19:07

Michael Nitschinger has a new post to his site today showing how you can cache the entities you've created with Doctrine using Couchbase as a simple caching tool.

As part of our ongoing efforts to make Couchbase more integrated with frameworks and libraries, we added caching support for the Doctrine ORM. [...] Caching can either be used standalone (through the API provided by doctrine/common) or integrated with the ORM functionality. We'll look at both variants through simple examples, a good documentation can also be found here. Note that at the time of writing, the CouchbaseCache is not mentioned as a caching driver because the documentation still needs to be updated.

He walks you through the steps to get everything you need installed, both through Composer and the Couchbase extension so your PHP installation will support it. He includes sample code that sets up the cache and shows how to check it to see if a key exists. With this base in place, he expands it out to working with the Doctrine ORM. He shows how to create a sample "Person" entity, inject it into the entity manager and perform a query with the Result Cache to locate the object.

0 comments voice your opinion now!
doctrine entity cache orm couchbase tutorial


PHPMaster.com:
Sending Email with Swift Mailer
December 04, 2012 @ 11:34:54

On PHPMaster.com today there's a new tutorial showing you how to use Swift Mailer, a popular (and well-established) mailing tool.

Sending emails programmatically is a common task that programmers must deal with often. Although you can use PHP's native functions, they can be too low-level, especially when you want to attach one or more files to your message. If you don't want to use the native functions, or if you want to send mail using an object-oriented approach, then this is the article for you. I'll introduce you to Swift Mailer, a powerful component-based library that let's you send emails easily. Started in 2005, Swift Mailer is a library that provides several classes that allow you to send emails from within your PHP scripts or web applications.

Included in the post are a basic example of sending a plain-text email, working with attachments and including a template into the body of the message (with spots to fill text in).

0 comments voice your opinion now!
swiftmailer introduction tutorial email pear


Jake Bell:
PHP Annotations Are a Horrible Idea
October 18, 2012 @ 09:45:56

In his latest post Jake Bell talks about why he thinks annotations in PHP are a bad idea (not the concept of them, but how developers are currently using them. He's in favor of officil support though).

Both the Symfony 2 and Doctrine 2 libraries and components make liberal use of what have come to be called annotations - special code comments, usually prefixed with an @ that are actually interpreted by the application and affect its functionality. [...] This trend needs to die.

He points out that the use of code comments like this isn't a good practice and applications should never have to rely on them for functionality. He mentions issues with syntax/language functionality (can't use "php -l" on them, can't var_dump an annotation) and that it makes it more difficult to read and interpret the code. He includes an example from Ruby of an alternative and a possible solution in PHP involving a static "mapping" variable.

0 comments voice your opinion now!
annotations code comments opinion doctrine symfony


Rob Allen:
Setting up PHP & MySQL on OS X 10.8 Mountain Lion
August 30, 2012 @ 09:09:12

Rob Allen has posted some notes to his site helping you get PHP set up on OSX Lion (10.8) successfully.

With OS X 10.8, Apple continues to ship PHP 5.3 with Xdebug, PEAR, GD and PDO_MYSQL. This is how to set it up from a clean install of 10.8.

He's broken it up into a few sections including the MySQL setup, Apache configuration , updating the main php.ini and setting up PHPUnit ("and friends") for your testing. He also includes setup instructions for the mcrypt and the PECL OAuth extensions.

0 comments voice your opinion now!
setup osx lion mysql apache mcrypt oauth pecl pear xdebug phpunit


Jeune Asuncion:
ZF1.11 + Doctrine 2 + Symfony DI Integration
August 22, 2012 @ 11:09:21

In this new post to his site Jeune Asuncion shows how he integrated several technologies to make for a robust system - Zend Framework (1.11), Doctrine 2 and the Symfony dependency injection system.

Last week, I blogged about looking for a new application framework to use and more importantly the key things that I would want in one. After reading about the Zend framework, Symfony and Laravel and finding myself hesitant to use any one, I thought to myself why not get the best of each framework? So that's what I did.

He shows a bit of the code to get them to all play nicely together using the Zend autoloader to register the other namespaces and creating a Symfony DI container inside of the ZF Bootstrap and providing it as a resource. You can find more of the source involved in the integration on his github account.

0 comments voice your opinion now!
zendframework doctrine symfony di container integration autoload


Till Klampaeckel:
Continuous Integration Automated database setup with Doctrine on Travis-CI
August 14, 2012 @ 10:55:57

Till Klampaeckel has a new post to his site showing how you can use the external continuous integration system Travis-CI to handle automated database testing for your PHP app using Doctrine.

Testing is important - most people understand that by now. A lot of people write tests for their open source code already, but in-house testing is still hard. [...] While I prefer to run my database tests against a SQLite in memory database, there are these edge cases, where I work with multiple database or I write a direct query (and by-pass the ORM-magic). In these cases I need to have that database server available in my test environment! The following blog posts explains how to solve these things with Travis-CI. I will walk you through the setup on Travis-CI's business service. But most of this applies to their open source offering as well.

He's broken it up into a few different steps - the setup and configuration of the ".travis.yml" file, adding in a "composer.json" file with the needed dependencies and the recommendation of a "phpunit.xml" in your project's root. He shows how to use Doctrine's "SchemaTool" utility to generate his schema off of the comments on his entities (instead of checking in SQL). This setup them gives him access to Doctrine's EntityManager object in his tests and he can go from there. If you're thinking about doing something similar, check Travis' list of supported databases before you do anything, just to be sure.

0 comments voice your opinion now!
database testing autmation travisci continuous integration tutorial doctrine


Lorna Mitchell:
Installing PEAR Packages Offline
July 30, 2012 @ 12:09:41

Since you can't always be online when you need to install new libraries you'll need for your PHP work, Lorna Mitchell has posted a quick guide to downloading and installing PEAR packages when you're offline.

As with most tools that work really well, I know very little about PEAR. I mean, I use it all the time, and I love it for getting all the extensions installed that I need for the work I do. [...] However I'm now in a situation where I might need to install PEAR packages with a connection that may or may not be working, and I'm not sure exactly which packages I might need, so I wanted to know whether I could use PEAR as my packaging tool even when I wasn't able to reach the usual channels. And guess what? I can!

The install is a pretty simple two-step process - just download the package(s) you'll need for your development and point the PEAR installer (you'll need this installed first, obviously) at the archive file. It's smart enough to take care of the rest.

0 comments voice your opinion now!
pear package install offline installer tutorial


Matthew Weier O'Phinney's Blog:
On Visibility in OOP
June 29, 2012 @ 09:52:03

Matthew Weier O'Phinney has a new post to his blog today looking at visibility in OOP in PHP - less about the features the language offers and more about the theory of their use.

I'm a big proponent of object oriented programming. OOP done right helps ease code maintenance and enables code re-use. Starting in PHP, OOP enthusiasts got a whole bunch of new tools, and new tools keep coming into the language for us with each minor release. One feature that has had a huge impact on frameworks and libraries has been available since the earliest PHP 5 versions: visibility.

He covers a bit of the syntax and features of public, private and protected and mentions a keyword not often seen in PHP applications - final. The reason all of this came up was work on annotation support in Zend Framework 2 and some difficulty in integrating it with Doctrine support. The "final" status of the class was part of the problem, and after a a lot of copy & pasting he decided on a different tactic - using its public API to try to work around the problem.

In sum: because the class in question was marked final and had private members, I found myself forced to think critically about what I wanted to accomplish, and then thoroughly understand the public API to see how I might accomplish that task without the ability to extend.
0 comments voice your opinion now!
visibility oop final annotation doctrine


Jeremy Cook's Blog:
Normalising DateTimes with Doctrine Events
June 27, 2012 @ 12:44:03

Jeremy Cook has written up a new post showing you a method for normalizing the date and time information in your application (DateTime) with the help of Doctrine's own event listeners.

The solution we hit on was to leverage Doctrine's system of event listeners to help us do the work. Doctrine allows you to register listeners with the entity manager that are called whenever certain events occur. We created an event listener that is triggered on the onFlush event.

Code is included for the event listener they created - a simple "onFlush" event that grabs the current entities from the manager, sets the date/time property to allow it to be changed (via Reflection) and updating it with the new cleaned format.

0 comments voice your opinion now!
normalize datetime doctrine event onflush tutorial


Stuart Herbert's Blog:
Getting PEAR Working On Windows 7
May 10, 2012 @ 10:43:49

Stuart Herbert has a new post today showing how to get the well-established PEAR package management system working on Windows 7 so you can easily call "pear install" on whatever your needs might be.

So that I don't forget how to do this next time around. Worked for me, your mileage may vary. First step is to get a working install of PHP. [...] At this point, you should be able to open up a Command Prompt, and type 'php -v', and see the response 'PHP v5.4.latest …' appear as expected. Now for PEAR itself.

He gives step-by-step instructions on how to get PEAR up and running - downloading and configuring it with the correct Windows-based paths and using the PEAR_ENV.reg file to update your registry.

0 comments voice your opinion now!
pear windows7 install tutorial registry


GotoTech.com:
Developer Diary Taming Doctrine's 2000 Flushes
May 02, 2012 @ 10:19:35

In this new post to the GotoTech.com blog Eric Burns talks about a way he's "tamed Doctrine's 2000 flushes" with a wrapper around the EntityManager to make controlling the database flushes simpler.

For my project I decided to use the Doctrine 2 ORM to manage my data layer. We also use this at work, so the biggest reason I chose this was to be able to learn more about Doctrine to help me in my job. But this decision also makes sense for my project because my entity relationships will likely be fairly straightforward for the most part and using an ORM will allow me to make a lot of progress very quickly without (I hope) causing me lots of trouble later on.

His handy wrapper (Data Manager) makes it simpler to perform the flush and still take transactions into consideration. His simple class includes "flush", "commit" and "startTransaction" methods that don't actually perform the flush until the commit is called.

0 comments voice your opinion now!
doctrine flush database wrapper transaction


Liip Blog:
Table Inheritance with Doctrine
March 28, 2012 @ 09:30:09

On the Liip blog there's a recent post looking at table inheritance with Doctrine, the popular PHP ORM tool. In the post, Daniel Barsotti talks about a database model that needed some updating due to their searching needs.

Our first idea, and it was not that bad, Drupal does just the same, was to have a database table with the common fields, a field containing the type of item (it's either an event or a blog post) and a data field where we serialized the corresponding PHP object. This approach was ok until we had to filter or search LabLog items based on fields that were contained in the serialized data.

To resolve the issue they turned to multiple table inheritance, relating the LabLogItem to both a BlogPost and Event. They also show how it could be modeled with a single table, but opt for the multiple method. Included in the post is the Doctrine-based code showing how to create the parent entity for the LabLogItem and the two child entities for the blog post and event. There's also a brief snippet showing how to use them with the EntityManager.

0 comments voice your opinion now!
table inheritance doctrine orm tutorial multiple


DZone.com:
PHP objects in MongoDB with Doctrine
March 21, 2012 @ 10:03:59

On DZone.com today Giorgio Sironi has a new post showing how you can use Doctrine with MongoDB to work with Document objects from the database.

In the PHP world, probably the Doctrine ODM for MongoDB is the most successful. This followes to the opularity of Mongo, which is a transitional product between SQL and NoSQL, still based on some relational concepts like queries. [...] The case for an ODM over a plain Mongo connection object is easy to make: you will still be able to use objects with proper encapsulation (like private fields and associations) and behavior (many methods) instead of extracting just a JSON package from your database.

He briefly mentions that the PECL extension for Mongo needs to be installed prior to trying out any of the examples. His first example shows how to create a DocumentManager (similar to the normal EntityManager for those familiar with Doctrine). He also shows an integration with the ORM and shares some of the findings he's made when it comes to versioning the resources (hint: annotations are your friend).

0 comments voice your opinion now!
mongodb doctrine object orm tutorial versioning


Phil Sturgeon's Blog:
Packages The Way Forward for PHP
March 07, 2012 @ 08:29:57

In this new post to his blog Phil Sturgeon talks about what he (and apparently several others) think is the "way forward for PHP" to make it a better language and ecosystem - packages.

What is a package? A package is a piece of reusable code that can be dropped into any application and be used without any tinkering to add functionality to that code. [...] Most package systems also allow for something called dependencies. [...] This is how most modern programming languages work, but to make a generalisation: PHP developers hate packages. Why? Well while other languages have great systems like CPAN for Perl, Gems for Ruby, PIP, PHP has had a terrible history with package management going back years.

He talks about one of the main current packaging systems, PEAR, and how, despite its attempts, it just hasn't seen the adoption the package management of other languages has. Phil makes a recommendation that is slowly becoming more and more popular in the PHP community - building "unframeworks". These sets of reusable components (similar to the ideas behind Aura, Symfony and Zend Framework 2) are designed to be dropped in and used without the dependencies of the frameworks they live in. He points to the Composer/Packagist dynamic duo as a way through all of the current packaging issues - a simple way to make any project an installable package just by adding a configuration file.

0 comments voice your opinion now!
packages composer packagist pear community support unframework


Jeremy Cook's Blog:
Making PHPUnit, Doctrine & MySQL Play Nicely
March 02, 2012 @ 12:05:48

Jeremy Cook has put together a new post showing how he got PUPUnit, Doctrine and MySQL to "play nicely" together when he was writing up some of his tests in a current application.

One of the pain points for me though has been in getting Doctrine setup with PHPUnit for testing. One of the main Doctrine contributors, Benjamin Beberlei, has written a package called DoctrineExtensions which amongst other things adds a class called DoctrineExtensionsPHPUnitOrmTestCase which extends PHPUnit's DbUnit database test case class. This all works well in principle but hits a major snag in reality: MySQL doesn't allow InnoDb tables with foreign keys to be truncated. PHUnit's database extension truncates the database tables before each test run and inserts a fresh set of data to work with.

To work around this issue Jeremy by porting over a method posted by Mike Lively over to Doctrine as a custom "MySQLTruncate" class (code included in the post). He also includes some sample code showing it in use - a basic ORM test case that calls the truncate method when its set up.

0 comments voice your opinion now!
phpunit doctrine orm unittest mysql truncate


Till Klampaeckel's Blog:
Deploying PHP applications PEAR and composer resources for chef
February 27, 2012 @ 13:17:57

In a new post to his site Till Klampaeckel shows how to use PEAR and composer resources (two popular PHP package management tools) from inside of a chef deployment script.

This is something experimental I have been working on for our chef deployments. So the objective was/is to find a sane way to install PEAR packages and install dependencies with composer.

He shows how to set up the configuration script to discover a new PEAR channel, make the chef script not "fail hard" if a command returns a failed response code (as PEAR will do if the channel is already discovered). The "ignore_failure" configuration directive comes in handy for this. He also shows how to implement a LWRP in chef for both a PEAR and Composer resource.

You can find the code for this and other cookbook examples on his github account.

0 comments voice your opinion now!
deploy application chef pear composer lwrp resource custom package dependency


Sameer Borate's Blog:
Building a adjacency matrix of a graph
February 17, 2012 @ 09:19:12

Building on the graphing tutorial in his last post Sameer continues on looking at graphs in PHP with this new post showing how to create an "agency matrix" of a currently built graph.

Building a graph is not enough; we also need the ability to search through it. To make it easier to build search algorithms, it is useful if we can represent the graph and its connections in a different way; adjacency matrix being one such representation. An adjacency matrix is a means of representing which vertices (or nodes) of a graph are adjacent to which other vertices.

He includes some sample code to extract the data from a graph (built with the PEAR Structures_Graph package) and create a basic "table" of information about each nodes' connections.

0 comments voice your opinion now!
agency matrix tutorial graph structuregraph pear


Sameer Borate's Blog:
Building a Graph data structure in PHP
February 15, 2012 @ 09:35:15

In the latest post to his blog Sameer Borate takes a look at using the Structures_Graph package from PEAR to create data structures in PHP with linked nodes for directed and undirected graphs.

The Pear Structures_Graph package allows creating and manipulating graph data structures. It allows building of either directed or undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing as well as for characteristic extraction from the graph topology.

After sharing the one-line install, he shows how to create some instances of the package's Nodes and how to connect them to a graph and link them to other nodes. He includes a few examples - a simpler one with multiple nodes joined in a directed graph, another showing how to associate data with a node and how to query the graph for node connections and testing to see if the graph is acyclic.

0 comments voice your opinion now!
graph node structure structuregraph pear package tutorial


Marcelo Gornstein's Blog:
Writing PHP applications with Doctrine2 as ORM and Ding as DI container
January 31, 2012 @ 08:59:18

In a recent post Marcelo Gornstein takes a look at using dependency injection with Doctrine2 using his Ding container.

This article will show how we can develop software in php with a nifty design and architecture, and very much like other languages like java, using an ORM and an AOP, DI, Events container. I will assume you've read (or at least took a quick look) at this article that explains the tree layout used throughout the code, and that you have some basic knowledge of Doctrine2 and used it before on your own.

He starts with the result - an easy to use, self-contained (and decoupled) system for accessing the Doctrine2 instance. It's event-driven and uses Aspect-oriented programming to mange interactions between components (or as he calls them "beans"). Code is included for the entire process for a logger, the User entity, entity manager, user repository and transactional aspect. You can find the complete source for his example on his github account.

0 comments voice your opinion now!
dependency injection di tutorial doctrine ding orm aspectoriented


Mike Wallner's Blog:
Dropping server load with HTTP caching
January 27, 2012 @ 09:43:04

Mike Wallner has shared a quick and easy HTTP caching technique in a new post to his blog today. The key is in using the PEAR HTTP_Header package.

Ever watched youself browsing e.g. a web forum? Noticed that you viewed the same page several times? Well, this means extraordinary and useless load for your server if there's no caching mechanism implemented in the web application. Even if there is some file or db cache you can still improve performance with implementing some http cache.

With a few simple lines of code using HTTP_Header, you can tell your scripts how long to set the "expires" header to on your requests. This increment (in seconds) is relayed to the browser to tell it when to next fetch the page and not reload from cache.

0 comments voice your opinion now!
http cache pear package httpheader tutorial


Mike Purcell's Blog:
Use PHPUnit without PEAR
January 26, 2012 @ 09:48:00

Mike Purcell has a new post to his blog showing a method he's followed to be able to use the popular PHPUnit unit testing software without having to go through the PEAR installer to get there.

PHPUnit is a great tool to protect us developers from introducing new defects when adding new features or re-factoring code. However there is one HUGE downside to PHPUnit; it must be installed using PEAR. Personally, I don't like 'auto-installers', I'd prefer to know what exactly is happening behind the scenes with regards to which libraries are required and how they are being called. [...] After breaking down the PHPUnit source code, I realized it could be installed without going through PEAR, and without too much headache.

He walks you through the directories you'll need to set up (test/vendor), the commands you'll need to get the latest version and unpack it, changes to set up some symlinks and updating the PHPUnit source to modify the autoloader, bootstrap and phpunit executable.

0 comments voice your opinion now!
pear phpunit without installer autoinstall package management


PEAR Blog:
What would you do with 5 million lines of code?
January 24, 2012 @ 12:18:07

On the PEAR blog today there's an update about the migration over to github that 5 million lines of code has already made:

Since October 2011, 5 million lines of the PEAR codebase has shifted to github. Hand in hand with this shift has been the tireless work of Daniel C - someone who brazenly said "I will fix the failing packages!" in the tail end of last year.

As a result of his efforts a list has been created of known good packages to use with PHP 5.4. Other results include:

  • All test infrastructure upgrading to PHP 5.4 release candidates
  • All database driven test suites executing properly, catching a variety of simple bugs
  • Hitting a point of "near zero" patches to be applied to unmaintained packages
  • Increasingly, the PEAR QA team is delivering PHP 5.3+ friendly forks of existing packages
0 comments voice your opinion now!
pear migrate github package library update


Ade Slade's Blog:
Integrating Zend Framework 1 and Pimple
January 18, 2012 @ 13:11:56

In this new post to his blog Ade Slade shows how to integrate the Pimple lightweight dependency injection container with a Zend Framework application.

This post will describe a way to integrate Zend Framework 1 and Pimple. A complete working version of the code is available on github. Thankfully, Zend Framework 2 features its own Dependency Injection Container. Happy days. Still, if you're not prepared to wait, you may find this useful.

He shows how to add a resource plugin into the Pimple container - an entity manager that's part of Doctrine. He creates his controller, pulling the manager from the Pimple container and includes a unit test for the controller too (using PHPUnit, but he also suggests Mockery).

0 comments voice your opinion now!
zendframework pimple dependencyinjection container tutorial doctrine entitymanager


NetTuts.com:
Zend Framework from Scratch - Models and Integrating Doctrine ORM
January 13, 2012 @ 10:58:00

NetTuts.com has posted a second tutorial in their series focusing on the Zend Framework today. In this latest article they focus on integrating the powerful Doctrine ORM with a Zend Framework application.

Ready to take your PHP skills to the next level? In this new "From Scratch" series, we'll focus exclusively on Zend Framework, a full-stack PHP framework created by Zend Technologies. This second tutorial on our series is entitled "Models and Integrating Doctrine ORM".

They continue on from their previous tutorial to talk about what models are (with an example involving "bankers"). They also show how to use the Zend Framework "zf" command line tool to configure your database settings, set up the tables and download/bootstrap the Doctrine code. The include the code to create some simple models and how to use them to create and update records in your database. You can grab all of the sample code for their examples from The Next Social's github repository.

0 comments voice your opinion now!
zendframework doctrine model integration tutorial


PEAR Blog:
Welcome to new contributors
December 19, 2011 @ 10:06:55

On the PEAR Group blog there's a new post welcoming all new contributors to the project and pointing out that the PEAR account on Github has officially passed the 200 repository mark in the move from SVN to Git.

PEAR is about providing the PHP community with reusable, effective components - this has been our mission since day 1. If there is anything we can do to make that goal happen, to assist you as an individual or company, I would strongly encourage you to let us know - we're here to help.

They mention the work of two individuals that have done good work on a specific package, meldra and Gemorroj - perfect examples of how the move to Github has made it simpler to implement changes that have been "waiting in the wings" on the XML_Feed_Parser and Image_Barcode2 packages.

If you've had changes you've wanted to make to a PEAR package in the past but haven't ever gotten them submitted, there's not a better time than now.

0 comments voice your opinion now!
contribution pear package github svn


Engine Yard:
The Future of PHP PEAR and Pyrus Webcast Recording
November 23, 2011 @ 18:05:10

If you missed out on the Future of PEAR/Pyrus webcast event put on by Engine Yard, you're in luck - they've posted a recording of the event.

In this panel discussion, we tackle topics including the direction PEAR and Pyrus will be going in the next few years, obstacles that may be on the horizon, and more.

PEAR is the package library of standardized packages for a variety of common development tasks. Pyrus is a new package manager to make installing and maintaining PEAR packages simpler. Engine Yard's next webcast will cover the Lithium framework with core contributors Nate Abele, Garrett Woodworth, and John Anderson on December 1st.

0 comments voice your opinion now!
recording pear pyrus package management panel discussion podcast


php|architect:
Geolocation Easier Than It Looks
November 08, 2011 @ 08:03:21

On the php|architect site Jeremy Kendall has a new article looking at geolocation in PHP and how, despite some comments in the past about its difficulty, some more recent tools make it relatively simple.

Have you ever wanted to add location-aware content to your web applications? Would you believe me if I told you it was dead easy, and you could be up and running in about 10 minutes? The first thing you want to do is use someone else's work. Geolocation is a solved problem; there's no need to roll your own. I went searching for free Geolocation APIs and found two I wanted to try: MaxMind's GeoLite API and Quova.

He briefly introduces each data source - GeoLite as a downloadable database and Quova as an API. Sample code is included for using the data from both of these services to find a location based on an IP address. He does include one caveat though - be careful about accuracy, they usually only promise things to be within 25 miles of the spot you're actually looking for.

0 comments voice your opinion now!
gelocation ip geolite quova tutorial pear package


Community News:
EngineYard Hosts "Future of PHP" Live Panel - "PEAR & Pyrus"
November 07, 2011 @ 13:09:35

EngineYard, a company that recently merged with the PHP platform as a service provider Orchestra.io, has a new live panel podcast about the Future of PHP, specifically involving PEAR and Pyrus.

If you are a PHP developer using PEAR and Pyrus, we invite you to join us this week as we explore the future of PEAR and Pyrus. We'll be discussing issues such as where PEAR/Pyrus will be going in the next few years, what obstacles may be on the horizon, and how they're going to get where they're going.

The live panel, hosted by Elizabeth Naramore, will include experts from the two projects: David Coallier (President), Helgi Þormar Þorbjörnsson, Brett Bieber, and Till Klampäckel. There's still time to sign up to attend - the show happens on November 17th. To put your name in to be a part of the event, fill in the info here and you'll be sent more information about attending.

0 comments voice your opinion now!
podcast live panel pear pyrus futureofphp engineyard


PEAR Blog:
PEAR Development on Github
November 07, 2011 @ 12:36:57

On the PEAR blog today it's been pointed out that many PEAR packages are moving to github as their standard place for development and repositories under the pear and pear2 accounts are available for anyone wanting to make the move.

While the existing PEAR packages will continue to use the pear.php.net distribution and bug tracking capabilities; it's never been easier to contribute to a PEAR package - simply fork; add your changes and send us a pull request. If your preferred packages aren't yet on github, please feel free to drop us a line on the pear-dev mailing list.

Here's more about the process to get the repository set up and how to migrate your package's current code from SVN over to github. The transition's pretty painless and can make the social development and improvement of your package a lot simpler.

0 comments voice your opinion now!
pear development github svn migrate pear2 development


PHPBuilder.com:
An Early Look at Zend Framework 2.0
November 01, 2011 @ 11:40:52

On PHPBuilder.com Jason Gilmore has posted a first peek at Zend Framework 2, an upcoming reworking of the popular framework with PHP 5.3-centric features.

Version 2.0 seeks to improve upon the current release in a number of ways, focusing on making it easier to get started using the framework, improving performance, and fully embracing the latest PHP language enhancements made available to version 5.3. [...] Although the official release won't be out for several more months, it never hurts to take an early look at what the future holds for a technology used by countless PHP developers around the globe. In this article I'll present a meandering introduction to the key version 2.0 features that I find particularly compelling.

He starts with a brief tutorial on getting the latest version of ZF2 from the git repository and creating basic project. The changes in the framework have fallen into a "rewrite only where it makes sense" mentality and changes have really only been made transparently to the backend or as new features/components like module management and Doctrine 2 integration. He also points out a few resources you can use to keep up to date on the latest from the framework including the changelog, mailing list and the ZF2 blog.

0 comments voice your opinion now!
zf2 zendframework2 early look introduction project module doctrine


PEAR Blog:
Newly stable packages in PEAR
October 31, 2011 @ 10:40:03

The PEAR blog has a recommendation for those that might not have updated their package udage in a while - there's been major changes in many packages, but two in particular.

We've had 60 releases since July. While most are often minor improvements or bug fixes; a number of packages really stand out. Net_DNS2, and HTTP_Request2. Each of these packages represents the second edition of their respective APIs; each having been honed over time to a point of stability.

Net_DNS2 gives you the ability to communicate and resolve host names/domain names inside of a PHP application. HTTP_Request2 gives you a simple way to perform HTTP requests.

0 comments voice your opinion now!
pear package update netdns2 httprequest2 ugrade


Ken Guest's Blog:
A new Openstreetmap API framework for PHP
October 24, 2011 @ 08:16:29

Ken Guest has a new post today talking about a PEAR package he's been developing, Services_Openstreetmap, to interact with the OpenStreetMap service to make it simpler to work with OSM data, adding new locations and working with users.

So over the last while, I've been working on a PHP package imaginatively named Services_Openstreetmap, for interacting with the openstreetmap API. I initially needed it so I could search for certain POIs and tabulate the results; it's now also capable of adding data to the openstreetmap database - nodes and other elements can be created, updated and so on. It will even access the details of the user that is being used to modify that data, which is one difference between it and the other single purpose OSM frameworks.

He's submitted it to PEAR for official inclusion. Until then, you can download the package from github. The OpenStreetMap project is a community-driven mapping tool that allows users to provide new map information or make updates in an effort to keep things more up to date.

0 comments voice your opinion now!
servicesopenstream pear package openstreetmap api github


PHPMaster.com:
Integrating Amazon S3 using PEAR
October 17, 2011 @ 08:34:01

On PHPMaster.com today there's a new tutorial showing you how to integrate Amazon's S3 service with your application via the Services_Amazon_S3 PEAR package.

In the process of reviewing documentation for Orchestra.io, I found that it doesn't allow file uploads. Instead, it's recommended that Amazon S3 be used for file hosting. If you aren't familiar with it, S3 is an online storage web service that is part of Amazon Web Services (AWS). It provides access to fairly cheap storage through a variety of web service interfaces. This article will demonstrate how to sign up for an Amazon S3 account and use PEAR's Services_Amazon_S3 package to interact with S3 in your own application.

They walk you through the whole process - getting signed up at the AWS site, creating credentials, installing the Services_Amazon_S3 package (via the PEAR installer) and using it in some sample scripts.

1 comment voice your opinion now!
pear package amazon s3 tutorial integration


Stuart Herbert's Blog:
Installing Phix on Various OSes (OSX, Debian, Ubuntu, Fedora)
October 03, 2011 @ 10:02:58

Stuart Herbert has put together a series of posts detailing how to get the Phix component creation and management tool installed on various operating systems.

Phix makes it extremely easy to create and maintain your own PEAR-installer compatible components for reuse in your PHP applications. Installation takes just seconds, and it's both open-source and framework-agnostic!

The OS guides help you get it installed for:

For more information about Phix (including helpful "getting started" details) check out the project's website.

0 comments voice your opinion now!
phix install component package manage pear operatingsystem guide


PHPBuilder.com:
Incorporate Weather Data into Your PHP Web Apps
September 28, 2011 @ 13:44:29

On PHPBuilder.com today there's a new tutorial helping you integrate weather data into your site with the help of the Services_Weather PEAR package.

Regardless of whether you consider the weather to be an obsession or nuisance, there are plenty of opportunities to incorporate weather-related data into your Web application. The Services_Weather PEAR Package offers what is perhaps the easiest way to begin retrieving weather-related data.

Included in the post are the commands you'll need to get the package installed (via the PEAR installer) and sample code to set up the connection - in this case to Weather.com - to fetch the results for a search location. The "search" method will return the best guesses for your input and give you the unique code to use for fetching other values, like the current forecast.

0 comments voice your opinion now!
weather data tutorial pear package servicesweather


Bertrand Mansion's Blog:
Twitter Bootstrap and the QuickForm2 Callback Renderer
September 26, 2011 @ 12:23:41

In a new post Bertrand Mansion shows how he combined the versatility of the PEAR QuickForm2 package and the Bootstrap project from Twitter to quickly make a form using the project's styling (CSS).

I don't know about you, but for me building HTML Forms and styling HTML Forms are maybe the most boring things in web development. It's repetitive and takes a lot of time to do things correctly. That's why tools like Twitter's Bootstrap and PEAR's HTML_QuickForm2 can help with this part of our job. Wouldn't it be nice to have QuickForm2 generate a markup compatible with Bootstrap CSS, so that you could get a nice looking form without to much efforts? Well, that's what I plan to do here.

He starts by creating a simple QuickForm2 form with no renderers attached (no pre-defined styles) and a custom render callback that wraps the items in "div" tags with the correct styles. There's also a custom renderer included for grouping items with additional styling attached.

0 comments voice your opinion now!
twitter bootstrap pear quickform2 callback style render css


Juozas Kaziukenas' Blog:
Dependencies management in PHP projects
September 12, 2011 @ 10:39:14

In his latest post to his Web Species blog Juozas Kaziukenas looks at dependency management in PHP applications and offers a few suggestions of how you can make them easier to track.

Rarely a project lives by itself, especially in the days of frameworks. Furthermore, there are a lot of great open source libraries you might want to use to save time. But all of this raises a new problem - how could we manage all those dependencies. Here are some thoughts on this problem and how you might want to solve it; without shooting yourself in a foot.

He mentions svn:externals and git's submodule as options in version control systems, PEAR for package management, Apache Maven and the deps file in the Symfony framework.

0 comments voice your opinion now!
dependency management application pear versioncontrol symfony


Stuart Herbert's Blog:
PHP Components Shipping Web Pages With Your Components
August 16, 2011 @ 13:13:06

Stuart Herbert's latest post in his "PHP Components" series looks at an optional but handy thing you can include in your component's package - web pages (be they a manual or other kind of information). This new post talks about where they should lie in the component's package structure.

I'm now going under the bonnet of our components, and looking at the different file roles that the PEAR installer expects to find when we distribute our component as a PEAR-compatible package. It isn't very often that a component needs to ship web pages too, but should the need arise, here's how to do it.

He starts by defining what a "web page" could be (HTML, Javascript, CSS, etc) and gives the place in the hierarchy they should fit. When you use the PEAR client to install the package, these files are placed in the "www" folder of your PEAR installation.

0 comments voice your opinion now!
component webpage structure tutorial pear


DZone.com:
Hardening PHP SQL injection - Complete walkthrough
August 12, 2011 @ 09:20:13

On DZone.com today there's a new post from Krzysztof Kotowicz sharing a presentation of his about protecting your application from SQL injection.

The materials teach how to use prepared statements, how to escape and write secure stored procedures. Many PHP projects are covered - PDO, Propel, Doctrine, Zend Framework and MDB2. Multiple gotchas and caveats are included. I discuss why escaping is usually the wrong choice, which practices to avoid or follow and how stored procedures sometimes offer no protection at all.

The presentation (as posted to Slideshare) starts with some of the basics - what SQL injection is and an example of how it could be used to bypass security. He covers how to use prepared statements in each of the technologies (with code snippets), methods for escaping data and how to create stored procedures that are protected from the same threats.

0 comments voice your opinion now!
harden application sqlinjection pdo doctrine zendframework mdb2 presentation


Bertrand Mansion's Blog:
PHP with Itnl and Gettext on OSX Lion
August 09, 2011 @ 11:40:11

Bertrand Mansion has a recent post to his blog looking at repairing missing functionality in the latest OS X update (Lion) with the intl extension and gettext (not installed by default).

Mac OSX Lion ships with PHP 5.3.6. [...] These are all very good solutions, but since I prefer to travel light and the version in Lion already comes with a lot of useful extensions, I preferred to go with it.

He shows how to update the default Lion PHP install to include some of the things he needed for his development including:

  • setting up the php.ini file
  • installing PEAR/PECL
  • installing the intl extension
  • and a hack to get gettext working (renaming a base function)
0 comments voice your opinion now!
gettext lion itnl extension osx install pecl pear


Leaseweb Labs Blog:
Tuning Zend framework and Doctrine
July 26, 2011 @ 12:35:03

On the Leaseweb Labs blog there's a recent post looking and some of the things you can do to optimize Zend Framework and Doctrine when used together for database access.

In principle, the combination of Zend Framework with Doctrine is not too difficult. But first let's talk about the preparations. According to the author of Zend Framework, the default file structure of project can be a bit more optimal.

They start by describing this optimized file structure (moving the models out of the modules and into the library) and what you'll need to change in Doctrine's configuration to make this work. The post also includes examples of what the larger config should look like when the changes are made. They show how to extend the default Doctrine CLI tool to make a custom "sandbox" instance and show some tuning you can do on the Zend Framework side so it can optimally work with the new models.

0 comments voice your opinion now!
tuning zendframework doctrine tutorial model structure


Pim Elshoff's Blog:
Setting up a kickass development environment on Windows
July 26, 2011 @ 11:04:39

Pim Elshoff has a recent post to his blog looking at a "kickass development environment" he's gotten working on Windows that includes PEAR, some type of version control (git or svn - take your pick), Ant for builds and Jenkins for continuous integration.

Recently I have become quite interested in quality assurance. Not that many things are going wrong for me, but I'd really like to be more certain about the quality of my work. I've used some tools to help me achieve just that. In less than two hours you can set up your workspace and have the living daylights automated out of you!

He provides a full guide to getting the full stack set up including the command-line calls you'll need to make, creating a new build file for Ant and setting up the PHP tools (like Phpmd, DocBlox and Pdepend). In the end, you should see something similar to this setup in your Jenkins build.

0 comments voice your opinion now!
development environment build pear apache versioncontrol tutorial


Rob Allen's Blog:
Setting up PHP & MySQL on OS X 10.7 Lion
July 25, 2011 @ 12:12:51

Rob Allen has posted his own guide to getting PHP 5.3 set up on OS X 10.7 Lion, the just-released update for Apple's operating system. It comes with a bundled set of PHP-related tools but you might want to set them up your own way. This is where the guide comes in.

With OS X 10.7, Apple continues to ship PHP 5.3 with PEAR, GD and PDO_MYSQL out of the box. This is how to set it up from a clean install of 10.7.

He goes through each of the pieces of software and talks about where to download the latest from and what configuration steps are needed:

  • MySQL
  • Apache
  • the php.ini
  • Xdebug
  • PEAR
  • PHPUnit (and friends)
  • PECL OAuth
  • mcrypt
0 comments voice your opinion now!
lion osx setup environment mysql apache xdebug pear phpunit oauth mcrypt


Christian Weiske's Blog:
Installing PHP extensions for phpfarm
July 25, 2011 @ 08:15:15

Christian Weiske has a new post to his blog today on how to get PHP extensions installed for phpfarm, the tool that lets you switch between multiple PHP versions on the same machine.

When using several PHP installations with phpfarm, installing PHP extensions is not always easy - mostly because Pyrus is very strict about package files - and many of the packages in PECL unfortunately have invalid non-validating package.xmls.

The installation follows most of the normal process with one exception - you use the phpfarm phpize and point the configure to use the phpfarm ini configuration file then enable it as usual.

0 comments voice your opinion now!
extension phpfarm multiple pear pyrus phpize configure


Jigal Sanders' Blog:
A first look at Doctrine 2.1
July 22, 2011 @ 10:33:08

In a new post to his blog Jigal Sanders shares some of his experience in working with Doctrine 2.1 in a Zend Framework-based (1.11.9) application for his database interface needs.

I hadn't been using Doctrine for a while and decided to pick it up two weeks ago, as we wanted to see if we can implement it for our CMS at our office. So I setup a clean installation of the zend framework (1.11.9) and tried tried to implement Doctrine. The main goal was to see if we can reverse engineer existing databases and then start doing some queries.

There were three things he found in the process that caused a few issues:

  • A confusing set of terms and features that weren't explained well enough to know their use
  • Getting things like autoloaders working with the Zend Framework to make things work well together
  • A potential bug with the "name" property on an object and some automatic namespacing Doctrine tries to do
There are already a lot of resources available on the Internet. I have looked at various configurations, like for example the 'bisna' project from Guilhere Blanco. But I keep saying that it's really difficult and has a steep learning curve. Doctrine 1.2 was really simple. Doctrine 2.x is a lot more difficult to get into.
1 comment voice your opinion now!
doctrine zendframework problems orm experience


Tom Jowitt's Blog:
Streamlined PHP Development - Part I
July 18, 2011 @ 12:54:19

As the first part of a series, Tom Jowitt has posted this introduction to setting up a brand new development environment with some of the basic tools any PHP developer should need.

I dunno about anyone else but my development environment is usually in some form of barely-controlled chaos. It's one command away from collapse with folders full of test software, symlinks that lead to long-forgotten libraries and ancient VCS repos that only a mother could love, all held together with sticky-tape shell scripts. [...] This series of posts will look at the tools available to PHP developers who want to be liberated from the mundane and the frustrating tasks that plague our lives.

He doesn't describe the installation of the basic platform - Apache, PHP and MySQL on Ubuntu - but jumps right into the details of the settings. He shows how to:

  • configure the VirtualHosts in Apache,
  • installing and updating PEAR,
  • Install/configure XDebug,
  • Set up PHPUnit,
  • and install git for version control

In the next post he'll show how to set up Phing for building/testing out the code.

1 comment voice your opinion now!
development tutorial install configure environment xdebug phpunit git pear


PEAR Blog:
PEAR in July 2011
July 11, 2011 @ 08:51:28

On the PEAR blog there's a new post talking about some of the things coming up in July that you might want to take note of.

There's nothing quite like having your blogging system go MIA for a while to give your community an overwhelming impression that no one is home. Thankfully; despite the radio silence between updates there's quite a lot to talk about!

The updates include mentions of several new PEPr proposals for packages related to Mercurial support, Twitter and holiday date validation. There's also a mention of the large amount of PEAR channels that are popping up and the future of PEAR in PHP 5.3+ with Pyrus.

0 comments voice your opinion now!
pear update channel pepr proposal community htmlquickform2


DZone.com:
The era of Object-Document Mapping
July 08, 2011 @ 11:45:46

On the PHP on Windows section of DZone.com today Giorgio Sironi has posted about a different sort of object mapping than is usually thought of with databases - object-document mapping.

The Data Mapper pattern is a mechanism for persistence where the application model and the data source have no dependencies between each other. [...] But everytime we talk about the Data Mapper pattern, we assume there is a relational database on the other side of the persistence boundary. We always save objects; we always map them to MySQL or Postgres tables; but it's not mandatory.

He talks about two projects, MongoDb_ODM and CouchDb_ODM, that the Doctrine project is working on to help make working with document-driven databases as simple as the usual ORMs. He includes a brief code snippet showing how the feature will work (hint: a namespace of Document instead of Entity). He lists some of the features - including the usual ORM capabilities, support for collections, cascade of persistence - and where you can get the latest code for it (from github and PEAR

0 comments voice your opinion now!
object document mapping doctrine mongodb couchdb


Symfony Blog:
Symfony2 PEAR Channel
June 27, 2011 @ 14:16:20

Fabien Potencier has a new post to the Symfony blog today - an announcement about the setup of a PEAR channel to make it easier to grab the various Symfony components individually.

One of the strengths of Symfony2 lies in its components; they define the building blocks of the framework and they can be used as standalone libraries. [...] The Symfony2 components have been available on Git for quite some time now, and as of today, I'm really excited to announce that they are also installable via the brand new Symfony2 PEAR channel, powered by Pirum of course.

Packages included in the list installable on the PEAR channel include:

0 comments voice your opinion now!
symfony2 pear channel components libraries


Padraic Brady's Blog:
How Would You Engineer A PEAR2/Pyrus Distribution Architecture?
June 21, 2011 @ 09:12:42

Padraic Brady has a new post to his blog asking you, the reader, for your suggestions on how to architect a distribution system for the PEAR2/Pyrus components.

With the idea of PEAR2 and Pyrus, I had hoped to see a renewal - the advancement of a PEAR architecture for the 21st Century. Instead, and this is just my opinion, PEAR2/Pyrus were a relatively simple iteration on a very old theme. [...] If the PEAR ecosystem has a failing, it is one of staggered evolution. Over time it has picked up additional features tacked on top of a base model.

He breaks up his thoughts on the future of PEAR2/Pyrus distribution into a few different topics - the issues he sees surrounding packaging (like static packaging definitions), suggestions for a dynamic channel aggregation system and overall usage of the PEAR system.

0 comments voice your opinion now!
feedback engineer pear2 pear pyrus architecture opinion


Test.ical.ly Blog:
PHP 5.4 with traits, Doctrine 2.2 and then Symfony3?
June 20, 2011 @ 12:07:36

On the Test.ical.ly blog there's a new post looking ahead to the next release of PHP, 5.4, and what it could mean for some of the popular tools out there - specifically Symfony and Doctrine.

It shouldn't be long until the first alpha version of PHP 5.4 will be released and with it there will be a lot of new features such as array dereferencing and traits to name but a few. What does that mean to the roadmaps of Doctrine and Symfony?

He mentions the experiments that are proposed on the Doctrine project that could be one of the major driving forces behind Doctrine 3. He points out that, as long as Symfony stays non-PHP 5.4-only, users will still have the choice of Doctrine 2 or 3. There are two issues he points out, though, that could cause problems for both projects - the choices Symfony makes in things like its quickstart guide and the DoctrinBundle vs Doctrine3Bundle situation that could come up.

0 comments voice your opinion now!
doctrine version symfony traits update


Sebastian Bergmann's Blog:
Towards Better Code Coverage Metrics in the PHP World
June 20, 2011 @ 08:10:57

Sebastian Bergmann has a new post to his blog talking about some of the future plans for better code coverage metrics for PHP applications (not just the statistics that we have now as generated from PHPUnit runs combined with Code_Coverage PEAR package and Xdebug).

Xdebug currently only supports what is usually referred to as Line Coverage. This software metric measures whether each executable line was executed. Based on the line coverage information provided by Xdebug, PHP_CodeCoverage also calculates the Function / Method Coverage software metric that measures whether each function or method has been invoked.

The various kinds of coverage they're planning the in future include statement coverage, branch coverage (boolean evaluation), call coverage, path coverage with an alternative of linear code sequence and jump coverage (LCSAJ).

0 comments voice your opinion now!
codecoverage metrics analyze code xdebug phpunit phpcodecoverage pear


PHPBuilder.com:
PEAR HTML_Table Displaying Tabular Data in PHP
June 02, 2011 @ 08:44:46

On PHPBuilder.com today Jason Gilmore has posted a tutorial showing you how to use the PEAR HTML_Table component to quickly and easily display tabular information on your site.

Because the task [of building tables] is so commonplace, personally I prefer to treat it like stamping out a widget, and rely on a drop in solution. While several such standardized solutions are available, I generally prefer to use HTML_Table, a great PEAR package which makes tabular data presentation a breeze. In this tutorial I'll walk you through several of HTML_Table's key features, additionally showing you how to integrate CSS and jQuery to create an eye-appealing and interactive tabular layout in no-time flat.

He helps you through the install (using the PEAR installer) and starts you down the right path with some sample code creating a table based off some example data from an array. He shows how to add headers, put in some CSS for styling them and for making the rows highlight on mouseover. He finishes it with the jQuery bit that uses the tablesorter feature to dynamically allow sorting of the table based on the values in each column.

0 comments voice your opinion now!
pear htmltable tutorial tabular data jquery css


Ryan Mauger's Blog:
Using Twig with Zend Framework
May 05, 2011 @ 08:28:18

Ryan Mauger has written up a new post about an integration he's done using the Twig templating engine (from be Symfony community) with his Zend Framework application to make view handling simpler.

Mostly I thought [what Twig offered] were silly things that were not really needed unless you had a team of designers to work with, however, during my exploration, a couple of things occurred to me that I had not considered about templating systems before. One being the enforced separation of concerns they provide; you simply cannot do anything from inside them which you shouldn't be, keeping your presentation very very clean. The second, being that they're not all as terrible as Smarty.

He helps you get Twig installed (via PEAR chnnel) and includes the code for an application resource and the changes you'll need to make to your application.ini to get things working. He uses a base controller setup, so he shows how to introduce a "twig()" method into that to help with rendering. Finally, there's a sample class included that includes two actions, both using this "twig()" method to pas the output data through the twig interpreter and out to the view.

1 comment voice your opinion now!
twig templating tutorial zendframework example pear


Symfony Blog:
Symfony2 Getting easier
April 29, 2011 @ 10:09:17

On the Symfony blog there's a new post about how Symfony2 is "getting easier" thanks to some recent changes with improved error handling and simpler configuration options.

With the release of the first beta approaching fast, our main focus has switched from adding new features to polishing existing ones. [...] Recently, Ryan and I have spent our time tweaking error messages, simplifying the code and the configuration, adding more documentation, and making things more consistent throughout the framework. The goal is to ease the learning curve and make things that people will need on a day to day basis simpler.

The changes they've made include three updates - better Twig error messaging, better configuration error messaging and some helpful changes to the Doctrine configuration to allow for auto-mapping of connections when the traditional one-database setup is used.

0 comments voice your opinion now!
symfony2 framework simile errormessage configuration doctrine


Stuart Herbert's Blog:
Last Call For Requirements For A PEAR Channel Aggregator
April 27, 2011 @ 09:10:51

If you're still interested in contributing your ideas and feature requests for a PEAR channel aggregator, Stuart Herbert wants to know (last call before the development starts).

There's already been a sizeable response so far, but if you haven't had your say yet, please head on over and leave a comment soon. I'll write up a summary of the suggested requirements on Monday.

The idea behind the aggregator is to provide a single place for developers to look (besides the PEAR site, of course) for PEAR packages they might find useful. The key here is that the aggregator would be bringing together the independent channels out there and making them simpler to find. Feature suggestions so far include: showing where the library lives (like github or bitbucket), creating a proxy channel for a "single install" location and customized lists of a user's "in use" and "tracked" packages.

0 comments voice your opinion now!
pear channel aggregator project lastcall feedback


Padraic Brady's Blog:
Wishing For A PEAR Channel Aggregator? Yes, Please!
April 13, 2011 @ 12:56:23

In his latest post Padraic Brady talks about an effort that's been put out there (by Stuart Herbert) to come up with a PEAR channel aggregator - something he fully supports.

Since we seem to like blaming the PEAR Group, and getting that ball kicked back to us, it's time we did something useful. We've spent too much time ignoring PEAR as we grew apart from it with our frameworks, standalone libraries and custom plugin architectures. We're making life harder for ourselves in doing so. Stuart Herbert has posted a short article to gather requirements for a Pear Channel Aggregator. I strongly suggest that interested PHP programmers drop by and add a comment with some suggestions/feedback.

Stuart's suggestion has already gathered some good comments and suggestions from all around the community including some mentions of efforts from the Symfony project to do something similar.

0 comments voice your opinion now!
pear channel aggregator project


PHPBuilder.com:
Using the PEAR Pager Package to Paginate MySQL Results
April 13, 2011 @ 10:35:40

On PHPBuilder.com today there's a new tutorial about using the PEAR Pager package to paginate through results from a MySQL query. The package makes it easy to pass in a data set and handle the pagination requests and interface.

Fortunately a great solution [for paginating data] is at your disposal which has been created expressly for this purchase. The PEAR Pager package will not only handle all of the gory tracking details for you, but it can also create a linked navigation list which you can embed into the page as a navigational aide for the user. In this article I'll show you how to use Pager to easily paginate your database results in a structured and coherent way.

He walks you through installing the packaged (thankfully easy with the PEAR installer) and how to use it on a simple array dataset of college names. From there he moves into the database realm, creating a simple table that stores the same information and pulling the results out and into the Pager functionality.

0 comments voice your opinion now!
mysql paginate pear pager package tutorial


Till Klampaeckel's Blog:
A roundhouse kick, or the state of PHP
April 13, 2011 @ 08:23:03

Inspired by some of the recent discussions in the PHP community about the future of the language and the software that uses it, Till Klampaeckel has posted some of his own thoughts on the matter.

Last week the usual round of PEAR-bashing on Twitter took place, then this morning Marco Tabini asked if PHP (core) was running out of scratches to itch. He also suggests he got this idea from Cal Evan's blog post about Drupal forking PHP.

Till talks about a few different points others have made in their comments and tries to clear a few things up - the state of PECL, Drupal and PHP (and forking), PEAR and how some of this infighting might be doing more harm than good for the community.

0 comments voice your opinion now!
community opinion pear pecl drupal


Marco Tabini's Blog:
Is PHP running out of itches to scratch?
April 12, 2011 @ 12:02:31

In a new post to his blog Marco Tabini poses an interesting question - is PHP running out of itches to scratch in the evolution of the language?

think it's fair to say that the pace at which PHP core is being developed has slowed down considerably over the past couple of years, while the development of many projects based on it, like programming and application frameworks, has sped up and continues to grow at a fast pace. But this doesn't mean that we're running out of steam. The PHP ecosystem is simply refocusing outside of core, where it has a lot more freedom of action.

He suggests two reasons as to why this slowdown might be happening - first that there's not a sense of strong leadership in the core development group (a feature of the project done on purpose) and the change to move new library support out to PECL and PEAR instead of directly into the core of the language.

The risk facing us, as I see it, is not that Drupal, or WordPress, or whoever may decide to fork PHP or abandon it altogether. Rather, the problem is that there is no real way for these projects to provide upstream positive feedback to PHP core.
0 comments voice your opinion now!
opinion pecl pear core library development project leadership


Stuart Herbert's Blog:
Dealing With PEAR Dependency Quirks
March 28, 2011 @ 11:09:56

Stuart Herbert has a new post to his blog today that shares some helpful hints about dependency quirks that can come with using PEAR packages and the PEAR installer.

To save myself a bit of effort, I thought it would make sense to make my API client reuse PEAR's existing HTTP_Request2 component. No sense in re-inventing the wheel, I thought. But that's where my troubles began. [...] There are a few quirks in the way that the PEAR installer handles version numbers, and you need to know how to deal with them if you're going to re-use PEAR project components in your own apps.

He shows how a dependency can be set up for the HTTP_Request2 package as a part of the update to his project. He talks about changes to the project's package.xml file and the trick with version numbering to get the latest. In this case, the latest is a non-stable alpha/beta component and the package.xml file needs some special handling to cooperate there (version, stability, release, api and min/max).

0 comments voice your opinion now!
pear dependency quirk tutorial httprequest2 package beta version


Dan Scott's Blog:
Creating a MARC record from scratch in PHP using File_MARC
March 04, 2011 @ 08:40:08

Dan Scott has posted an example of how to create a MARC record (machine-readable cataloging, more details here) from scratch with the help of the File_MARC PEAR package.

In the past couple of days, two people have written me email essentially saying: "Dan, this File_MARC library sounds great - but I can't figure out how to create a record from scratch with it! Can you please help me? Yes, when you're dealing with MARC, you'll quickly get all weepy and get help from anyone you can.

His example code is pretty simple - load the PEAR package into the script, create the record object and start adding fields to it. He shows various output methods ("pretty print", writing the raw data to a file, etc.) and the output to various other data structures like JSON and XML.

0 comments voice your opinion now!
marc record create filemarc pear package tutorial


Ken Guest's Blog:
Date_Holidays Frenzy - and a little update
February 28, 2011 @ 10:06:25

Ken Guest has a recent post talking about some recent updates that have been made surrounding the PEAR support for finding holiday dates in various parts of the world.

In the space of just under a month Date_Holidays_Croatia and Date_Holidays_Australia were released - many thanks to the guys who did the actual hard work to be fair as all I did was package them up and release them!

You can find more of these Date packages on the PEAR site that could help you and your application get things a bit more localized. He also reminds you that, if you'd like to help out and pick up support for some of the older, unmaintained packages, you can follow this guide and get started easily.

0 comments voice your opinion now!
dateholiday pear package croatia australia


Till Klampaeckel's Blog:
Contributing to PEAR Taking over packages
February 22, 2011 @ 14:45:53

Till Klampaeckel has posted a few suggestions for you if you'd like the take the reigns of a PEAR package when it's not maintained.

One of the more frequent questions I see on the mailing lists and IRC is, "How do I take over a package?". Very often people start to use a PEAR package and then at some point encounter either a bug or they miss a certain feature. The package's state however is inactive or flat unmaintained.

He recommends a few different courses of action - first asking if there's a way to help out, then stepping it up and pushing the fixes in yourself and, finally, deciding if you really do want to maintain the package (and show it by contributing).

0 comments voice your opinion now!
pear contribute package manage opinion


Mike Willbanks's Blog:
Building and Maintaining a PEAR Server with Pirum
February 10, 2011 @ 10:57:12

In a new post to his blog Mike Willbanks shows you how to build and maintain a PEAR server with Phirum.

Pirum is a simple PEAR channel server manager that was built by Fabien Potencier. The Pirum project allows you to easily setup a PEAR channel and publish your own packages quickly. This quick blog post / article will get you going with it in no time.

He shows you how to install Phirum (ironicly from a PEAR channel) and how to create the XML to define the PEAR service. Running Phirum will generate a few other files based off the XML configuration and adding in a package is as simple as a "phirum add" call. He also mentions adding support for cloning packages with the help of his updated fork on github.

0 comments voice your opinion now!
pear server tutorial phrium configure setup


ZendCasts.com:
Unit Testing Doctrine 2 Entities
February 07, 2011 @ 11:11:20

New on the ZendCasts.com site there's a screencast showing you how to unit test Doctrine 2 entities.

His example came from a webinar recently presented by Zend to integrate unit testing with the help of the Symfony console. He shows how to set up a configuration (sans yaml) in your Zend Framework application's setup and a bootstrap to get them all working together.

This screencast is about 45 minutes long and, if you'd like more information on unit testing with the Zend Framework, check out the side bar for looks at testing with Zend_Form and action helpers.

0 comments voice your opinion now!
unittest doctrine2 doctrine zendframework screencast


Zend Developer Zone:
Using the Stack Exchange API with PHP (part 2)
January 21, 2011 @ 11:12:22

The Zend Developer Zone has posted the second part of a series from Vikram Vaswani about using the Stack Exchange API to pull questions and comments users have posted to the site. In this second part of the series he shows how to get more information about those users and their activities.

The thing to remember about questions, answers and comments, though, is that they don't exist in a vacuum. They're created by users, and it's the users that make the site tick. That's why the Stack Exchange API includes a large number of methods designed to let developers access user profiles and timelines, and unearth the relationships between users and their posts. This article will focus primarily on this dimension of the Stack Exchange API, illustrating how to search for users, obtain user profiles and timelines, and retrieve information on a user's questions, answers, comments, badges and tags.

You'll need to get the StackPHP PEAR package to follow along with the code examples (it does some of the hard work for you). He shows how to:

  • Grab a list of users ordered by reputation
  • Search for usernames matching a string
  • Get badge information (in general and for a user)
  • Finding a user's activity timeline

Near the end he also includes an example of using the Zend_Paginator component of the Zend Framework to filter down the results to a more manageable size.

0 comments voice your opinion now!
stackoverflow api tutorial pear stackphp


Chris Hartjes' Blog:
Smarter DB Migrations using Zend Framework and Doctrine 1.2
January 20, 2011 @ 10:11:39

Chris Hartjes, after finally figuring out an issue with database migrations with Doctrine on a Zend Framework application, has posted about the process to his blog today. As he notes:

This posting is a lesson on the value of actually looking at the source code of a third-party library when you are trying to figure something out...

His problem wasn't with the features of Doctrine and how easy it made to automate things in his environments (continuous integration). His issue was that Doctrine wanted to run all of the migrations every time it was executed. Upon closer inspection, he found the key - a migration_version table in his database that held current migration information. He includes a simple Zend Framework-based script he's now using get the latest value from that table and execute only the migrations after that. The migrations are executed in order - he recommends using a timestamp or formatted date on the filename to set the order.

0 comments voice your opinion now!
zendframework migration doctrine tutorial version


Ibuildings techPortal:
Database Version Control
January 11, 2011 @ 12:42:08

On the Ibuildings techPortal today Harrie Verveer has a new post looking at database version control - one of the more difficult topics for development groups - and some of the technology that can be used to help make it a bit simpler.

Database version control is something that most developers have to deal with regularly, yet only a few have actually thought about what solution might be best for them. Most people have a solution that sort of works for them, but when you ask them about the subject they are pretty convinced that there must be some better way to manage database changes, they're just not entirely sure what that solution is - but the silver bullet must be out there somewhere, right?

He starts where most developers start - their own custom script. It usually will take in a series of patch files and apply them one by one. In this case a "patch level" is stored somewhere (file/database) and is checked when the deployment is done. He points out a few issues with this method including patch naming issues and branching. Taking a step up the technology tree, he looks at other solutions like Phing+DBDeploy, Liquibase, and Doctrine migrations to try to help you find your project's "silver bullet".

0 comments voice your opinion now!
database version control custom phing liquibase doctrine migration


Mike Lively's Blog:
Pear Channel set up for Phake
December 31, 2010 @ 13:30:42

Mike Lively has a new post about a PEAR channel he's set up for his Phake mocking tool on his digitalsandwich.com domain.

For those that may not have caught my first post on the subject, Phake is a mock framework that I announced a couple of days ago in Introducing Phake Mocking Framework. It was recommended in the comments that I get it on a pear channel somewhere, which is something I have wanted to do but hadn't had a reason to do until this week. Well, now there is an official Digital Sandwich Pear Channel that is hosting Phake.

Discover the channel with the PEAR installer and run the install with the path provided. He notes that the release is alpha because of the lack of documentation but, despite this, the API is stable. Also, you'll need to be using PHP 5.2+ to use the tool.

0 comments voice your opinion now!
phake mock testing framework unittest pear channel


Zend Developer Zone:
Using the Stack Exchange API with PHP (part 1)
December 30, 2010 @ 13:04:02

On the Zend Developer Zone today the first part of a series from Vikram Vaswani has been posted. This new set of articles will look at how to use the Stack Exchange API from your PHP applications.

The thing about Stack Overflow, though, is that it has a geeky secret of its own. Like many Web 2.0 applications, it exposes its data to the public via the Stack Exchange Web service API, making it possible to develop customized applications that run on top of the base service. This API allows access to a number of important functions, including searching for questions, retrieving answers and comments, accessing user profiles, and working with tags and badges. It's also pretty easy to integrate this API into a PHP application - and this two-part article will show you how!

In part one he introduces you to some of the conventions and tips you'll need to know when reading through the article. He shows how to get and parse a sample response (with json_decode). He also uses the proposed StackPHP PEAR package to make requests for general question information, specific details, tags, comments and search results.

0 comments voice your opinion now!
stackexchange api tutorial stackphp pear package json


Flyn San's Blog:
Better Doctrine 2 Module for Kohana 3
December 28, 2010 @ 12:21:41

Flyn San has a new post to his blog today about a better Doctrine 2 module he's created for use with Kohana framework-based applications.

Since releasing my original Doctrine 2 module for Kohana 3 (found here), I've done a bit of reshuffling of folders and added some additional features from my old Doctrine 1.2 module. Due to the extent of modifications, I decided to put up a new post with some added information on how to use the new module. For the impatient ones out there, here's the download link: Doctrine 2 Module for Kohana 3

He spends the rest of the post explaining the structure of the module, how to get it installed and working and some sample schema files (for Product and Serial tables in yaml) you can import and test with.

1 comment voice your opinion now!
doctrine module kohana framework doctrine2


Robert Basic's Blog:
A real gem - PHP_CompatInfo
December 28, 2010 @ 09:34:40

In this new post to his blog Robert Basic takes a look at what he calls a "real gem" in defining the requirements of his application - PHP_CompatInfo.

Last night I was pondering how nice would it be to have a tool of some sort, that would simply spit out what version of PHP does my app require. Something like: here are my .php files, what PHP version and/or extensions do I need for it? First I thought about jumping right in and writing it myself, but hey, this kind of a tool sounds way to useful not to be written already! After a bit of a googling there it was: PHP_CompatInfo. A nice PEAR package that can tell me everything I want about my code and even a bit more.

He includes a code snippet showing it in action. It's a basic example that defines the driver type to use, options and the directory to parse through (using parseDir() naturally). Other output formats are available too like CSV and HTML.

0 comments voice your opinion now!
phpcompatinfo pear package compatibility requirement


Sameer Borate' Blog:
Creating SQL schemas with Doctrine DBAL
December 22, 2010 @ 14:25:53

On his blog today Sameer Borate has a new post looking at using Doctrine DBAL to make schemas rather than having to make them by hand each time (can be very useful for reloads with fixtures).

A tedious task during web development is that of database schema creation. A schema containing a few tables comprising of a small set of rows is quick, while that containing dozens of tables and large numbers of columns is a tedious process. I usually resort to a small php script with some regular expression tossed in to automatically create a schema from a text file definition. But that is a little buggy as I've to manually add the indexes and other small things. Now that Doctrine has released a DBAL library, this will provide a nice ability to automatically create sql schemas.

He introduces the DBAL abstraction layer and includes a basic script to create a schema for a MySQL database, manually adding the columns and setting up things like primary keys and foreign key constraints. He also includes the SQL statements that it will generate and execute on your Doctrine-based connection.

1 comment voice your opinion now!
sql schema doctrine generate dbal mysql


Mayflower Blog:
PHP_CodeBrowser goes stable
December 15, 2010 @ 10:54:22

According to this new post on the Mayflower blog, the PHP_CodeBrowser PEAR package has finally reached a stable state.

We already wrote about CodeBrowser 0.9 in August and after fixing a few minor bugs the Mayflower Open Source Labs Team is very happy to present PHP_CodeBrowser 1.0.0.

The PHP_CodeBrowser package allows quality assurance tools (like PHPUnit) to create enhanced output including syntax highlighting and colored error sections. It comes with some basic template, CSS, Javascript and image files as well as a plugin system to allow for custom handling of certain error types. You can install it from the pear.phpunit.de PEAR channel or you can check out the source on github.

0 comments voice your opinion now!
phpcodebrowser syntax highlight stable qualityassurance pear package


PHPBuilder.com:
Create a PHP-based Twitter Client with the PEAR Services_Twitter Package
December 09, 2010 @ 14:57:16

On PHPBuilder.com there's a new tutorial from Jason Gilmore about how to create a PHP-based witter client with the help of the Services_Twitter package from the PEAR repository.

Entirely reinventing the wheel seems foolhardy, and so I wanted to base the project on a solid foundation, including a quality PHP-based Twitter library. That library turned out to be PEAR's Services_Twitter package. In this article I'll introduce you to this powerful package, which although still in beta already offers all of the features you'll need whether you want to build your own Twitter client or simply add Twitter-specific functionality to an existing application.

He includes instructions on how to install the package, register the application as a service and connect it via OAuth. There's also a full code listing included showing how to make the authentication from the PHP app and how to grab the latest tweets from a user.

0 comments voice your opinion now!
pear servicestwitter package client twitter tutorial


Jani Hartikainen's Blog:
How to create Doctrine 1-style Soft-Delete in Doctrine 2
December 06, 2010 @ 13:02:08

Jani Hartikainen has posted his technique for making the Doctrine version 1 style "soft delete" in your Doctrine 2 powered application.

Doctrine 1 has the concept of behaviors which you could add to your models. One of these was the soft-delete behavior, which allowed you to "delete" records without really deleting them. Doctrine 2 does not have behaviors due to various reasons. However, I needed a way to have a model which worked like soft-delete. Let's see one approach to creating such behavior in Doctrine 2.

He introduces the idea of a "soft delete" - essentially a flag that gets set to let the rest of the application think that row is essentially deleted. He shows you how to create the similar functionality via a repository that filters the data for you. He includes code to help you along, defining the find/findOneBy/findBy and the example repository that lets you set an "is deleted" property on the object.

0 comments voice your opinion now!
doctrine soft delete repository filter


Developer.com:
10 Powerful PEAR Packages
December 02, 2010 @ 09:06:27

On Developer.com there's a new article with what they think are the top ten PEAR packages that every developer should know and use in their applications.

PHP developers also have another community-driven treasure trove at their disposal, one which is host to almost 600 high-quality libraries yet never seems to garner the attention it deserves. I'm referring to the PHP Extension and Application Repository, better known as PEAR, and in this article I'll try to shine the spotlight just a bit brighter on this fantastic community resource by highlighting 10 useful PEAR libraries (better known as packages) that have become an indispensable part of my programming toolkit.

Included in their list of "Top Ten" are things like:

0 comments voice your opinion now!
pear package topten useful


Ruslan Yakushev's Blog:
How to install PHP PEAR and phploc on Windows
November 25, 2010 @ 12:38:12

Ruslan Yakushev has a recent post about installing the PEAR tools and installing an example package, phploc.

PEAR (short for PHP Extension and Application Repository) is a framework and distribution system for reusable PHP components. In includes many useful tools and components that can be easily downloaded and installed by using PEAR package manager. This post describes how to install and configure PEAR package manager and then how to use it to install a PEAR package. An example PEAR package used in this post is phploc, which is a tool for measuring the size of PHP projects.

He recommends installing PHP via the Web Platform Installer and use the PHP 5.3 VC9 non-thread-safe package with the PHP Manager. All of the commands needed are included as well as some of the sample output that results. Once you get PEAR installed, then they show how to discover the PEAR channel and "pear install" the right packages for phploc (including the dependencies it might need).

0 comments voice your opinion now!
phploc windows pear install tutorial wpi


Henri Bergius' Blog:
PHP Finally getting an ecosystem?
November 24, 2010 @ 09:56:04

In this new post to his blog Henri Bergius takes a step back and wonders if PHP is finally getting an ecosystem of its own (and not leaning of those of PHP-based projects.

One of my main concerns with PHP has been the lack of ecosystem. Almost all libraries and tools are written with a specific framework in mind, creating separate ecosystems around Drupal, Zend Framework, Midgard and others instead of an ecosystem benefiting all users of the language. There have been efforts at this, like PEAR before, but they have mostly stagnated.

These thoughts were spurred on by a post about the changes happening with eZ components (into Zeta Components) and how they can help reinforce the strength of the language rather than the efforts of one specific project's ecosystem.

0 comments voice your opinion now!
ecosystem ezcomponents zetacomponents pear


Ruslan Yakushev's Blog:
PHP 5.3 and PEAR available in WebMatrix Beta 3
November 11, 2010 @ 12:55:10

Ruslan Yakushev has a new post about a major update to the latest beta release of the Microsoft WebMatrix tool - the update of the PHP version to support 5.3 and the inclusion of PEAR.

WebMatrix Beta 3 release has been announced recently. This release includes many new cool features that are described in release announcement and in the Web Deploy team blog. In addition to all those improvements, WebMatrix Beta 3 has much better support for PHP.

The updates make it possible to use 5.3 (prior versions only supported 5.2.x), an update to allow PHP to be enabled on a new empty site and the inclusion of PEAR whenever PHP is installed. He includes a few screenshots and instructions to help guide you through the process of getting 5.3 set up. PEAR is automatically installed when you install this latest PHP update.

0 comments voice your opinion now!
webmatrix microsoft update pear version


Jose de Silva's Blog:
Speeding up your application with Cache_Lite
November 04, 2010 @ 13:53:49

In a new post to his blog Jose de Silva takes a look at how using the Cache_Lite PEAR package can help to speed up your application by reducing overhead caused by data fetching.

Cache_Lite is one of the fast, light and reliable cache system for PHP. It's an extremely easy and small learning curve system to work with. This post will try to make you a light introduction to PHP Cache_Lite.

He starts from the beginning - installing the package through the PEAR installer and setting up a basic configuration for a new Cache_Lite object in a script. Using this object you can test for the existence of a cached value or set a new one. The configuration allows you to define the "time to live" before the records expire.

0 comments voice your opinion now!
tutorial cachelite pear package


DZone.com:
From Doctrine 1 to Doctrine 2
November 04, 2010 @ 12:48:21

On DZone.com today there's a new article from Giorgio Sironi about making the switch from Doctrine 1 to Doctrine 2 and some of what might be involved.

Doctrine 2 is an implementation of the Data Mapper pattern, and does not force your model classes to extend an Active Record, nor to contain details about the relational model like foreign keys. [...] Note that you will have to run your application of PHP 5.3 for Doctrine 2 to work, mainly because of the use of namespaces in it.

He talks about some of the other differences including maintaining PHP classes and the metadata in them rather than just a YAML schema to map to your database. There's also a difference in how to interact directly with the Doctrine engine. Direct access has been replaced with a dependency injection approach.

0 comments voice your opinion now!
doctrine orm database migrate version


Amit Singh's Blog:
Installing PEAR and PHPUnit on WAMP and Windows 7
November 03, 2010 @ 12:03:47

Amit Singh has a recent post to his blog with step-by-step instructions on how to get PEAR, PHPUnit and a WAMP installed and working on Windows 7.

In the project that i am currently working on, we decided to use PHPUnit for doing our unit testing, and i found that it was not a straight forward thing to install that I had thought it would be. I had to start by installing Pear, and as soon as i type 'go-pear' in command prompt and pressed enter key I got my first error. So here are the steps needed to install PEAR and PHPUnit error free on WAMP.

Since the steps to install the WAMP server are pretty easy, he focuses on the other two technologies. He breaks up the install into the steps for PEAR and then the steps for installing and configuring PHPUnit. Obviously you'll need to change some paths for your system, but it's a pretty simple process and you should be up and running in no time.

0 comments voice your opinion now!
pear phpunit wamp windows7 install tutorial


Zend Developer Zone:
Using the Digg API with PHP and PEAR
November 03, 2010 @ 08:42:26

On the Zend Developer Zone there's a recent article about using APIs, specifically on how to use the Digg API with the Services_Digg2 PEAR package.

A few weeks ago, a client asked me to add a feed of interesting news stories to his Web application. Naturally, my thoughts turned immediately to Digg, which invariably has something interesting to read and which also offers a Web service API [...] A little Googling, and I found the PEAR Services_Digg2 class, which exposes a neat little PHP interface to the Digg API. As you might imagine, with all these tools to hand, it didn't take long to quickly integrate a feed of Digg stories into the application.

He walks you through the installation of the package (a one command step) and a secondary package you'll need due to Digg's authentication, HTTP_OAuth. He includes a request and response example (returned in JSON) as well as several code examples for sample requests, searching, working with comments on posts, post comments, "digg" stories and follow other users.

0 comments voice your opinion now!
digg api pear package servicesdigg2 tutorial


PHPBuilder.com:
Enforcing Coding Standards with PHP_CodeSniffer
October 22, 2010 @ 08:40:59

Developing applications has become simpler and simpler these days and the multitude of IDEs out there can help you keep all of your files organized and linked together so you know everything is in its place. There's one thing that only a handful out there can do, though - enforce coding standards. Thankfully, there's a tool that can help you keep your code following down the right path and PHPBuilder.com has a new tutorial about using it - PHP_CodeSniffer.

Although defined according to formal grammar and syntax, programming languages -- like their spoken counterparts -- often leave their users with a great deal of leeway for creative expression. [...] It can even be singularly counterproductive if you do not maintain stylistic consistency across projects, as you'll need to continuously re-acclimate to differing syntactical variations.

The PHP_CodeSniffer tool runs your code through a validation process and checks its structure against a coding standard (like the PEAR standard) and ensure it's formatted correctly. The tutorial shows you how to use the "phpcs" executable to test PHP, Javascript and CSSS files (using the Squiz standard).

0 comments voice your opinion now!
coding standard phpcodesniffer sniffer pear squiz


Sebastian Bergmann's Blog:
PHPUnit 3.5 Upgrading Woes
October 22, 2010 @ 07:42:23

If you've been having issues upgrading to the latest version of PHPUnit (v3.5), Sebastian Bergmann might have the answer to your problems that's related to the PEAR installer and this bug.

The new dependencies of the PHPUnit package, such as PHPUnit_MockObject for instance, are installed first. The PHPUnit package itself is installed last. And herein lies the problem: PHPUnit_MockObject installs the new version of MockObject/Generator.php before the PHPUnit package is upgraded. This upgrade deletes the MockObject/Generator.php file as it previously belonged to the PHPUnit package.

He includes two complete file listings showing the difference in the structure before and after the upgrade. The PEAR installer is at fault due to a misunderstanding it has about where the MockObject/Generator.php file belongs. The only way to fix this, currently, is to force install the new subpackages instead of just an update - DbUnit, PHPUnit_MockObject and PHPUnit_Selenium. Instructions and a resulting files tree are included so you can insure your install is correct.

0 comments voice your opinion now!
phpunit upgrade pear installer mockobject


ServerGrove Blog:
Enforcing unique key constrains with Doctrine ODM for MongoDB & Symfony 2
October 21, 2010 @ 11:58:22

New on the ServerGrove blog today is a quick post talking about how you can enforce key constraints on a MongoDb with Doctrine in Symfony.

Of course you can define unique indexes to prevent duplicate values and there are a couple of different syntax options to do so, which are clearly defined in the official documentation. But defining and creating the indexes is not enough. You must specify when you want to enforce the constrain, this is due to the fact that the PHP driver needs to tell MongoDB to throw an error when a duplicate key is found.

The fix is as simple as adding a "safe" option to the "flush()" call on your database object. If you give it a value of "true", the ORM is smart enough to handle things on its own.

0 comments voice your opinion now!
mongodb enforce symfony constraint unique doctrine


UncleCode.com:
Install PHPUnit Manually without Pear for a Single Project
October 12, 2010 @ 12:39:40

From the UncleCode.com blog there's a recent post showing you how to install PHPUnit manually without PEAR if you either don't have the access or just want to install it yourself.

This tutorial is an easy start to test your PHP source code which is build using classes i.e. OOP's with/without wamp/xamp doesn't really matter. The key to PHPUnit installation is set correct include path of your PHPUnit directory and extend correct phpUnit class in test case file.

They give you a quick eight step process that'll have you up and running in no time (including the download of the latest PHPUnit version). He shows how to set the paths in a sample unit test file to point to the right location for PHPUnit based on the root directory of your application. The runner can then find the correct files and classes when you run your tests.

1 comment voice your opinion now!
install phpunit manual custom tutorial pear adhoc


ServerGrove Blog:
Creating indexes for your Doctrine ODM documents with Symfony 2
October 08, 2010 @ 08:24:41

On the ServerGrove blog there's a new post showing you how to create indexes for your Doctrine ODM documents in a Symfony 2 application.

Creating indexes in NoSQL / Document-based databases is quite different compared to traditional relational databases. Since the former are schema-less (there is no table creation), indexes do not get created when the collection or the document is created or inserted. Here is a quick tip that will create all the indexes defined in your documents when using Symfony 2 and Doctrine ODM for MongoDB. Indexes are a great way to speed up your queries, in fact, it is a crime not to include them in your documents.

Adding the index is as easy as putting a new annotation on the property in its document class (for @Index) and run a bit of code in Symfony to build it out. The two lines you'll need to execute are included in the post.

7 comments voice your opinion now!
symfony document orm doctrine index tutorial


Nurul Ferdous' Blog:
Here is my 2 cents on Doctrine (ORM)
October 04, 2010 @ 11:20:31

Nurul Ferdous has posted his "two cents" on Doctrine - his thoughts on the good and bad things about the popular ORM tool.

What is Doctrine? Doctrine is a popular ORM for PHP which works with RDBMS via PHP objects. This is built inspired by Hibernate from JAVA. This acts as an abstraction layer between PHP and RDBMS.

In his list of good things about Doctrine are things like its hiding of business logic, automatic CRUD, automatic modification of DQL queries, migrations and unit testing interfaces. On his "bad list" are things like not being able to use foreign keys as an identifier, heavy emphasis on an "id" column, not all data types are in DBAL and the SQL constructs missing in DQL. He also includes a scenario where he definitely not use Doctrine - a specific example from a project he just worked on that pushed the limits of the tool.

0 comments voice your opinion now!
doctrine opinion good bad example project


Daniel Cousineau's Blog:
Doctrine 1.2 MSSQL Alternative LIMIT/Paging
September 17, 2010 @ 11:34:03

Daniel Cousineau has a new post to his blog today looking at an alternative that can be used for pagination in your MSSQL queries than the trick with TOP and reversing the ORDER BY in Doctrine.

As ugly as this technique is, it works. The problem is it requires an extreme amount of intelligence or an extreme amount of simplicity in the query in order for an automated system like Doctrine to be usable. The biggest caveat with this technique is good goddamned luck paging your query if it doesn't have an ORDER BY. And sometimes queries that are complex enough break the modified Zend_Db code. There exists an easier MSSQL paging technique. Using features first available in SQL Server 2005, with only 1 subquery you can mimic MySQL's LIMIT clause with ease.

He includes the query that will make it happen (the SQL for it) and then the implementation as an adapter you can use to get it to cooperate in your Doctrine queries.

0 comments voice your opinion now!
mssql doctrine limit paging adapter


Gonzalo Ayuso's Blog:
Building an ORM with PHP
September 13, 2010 @ 12:44:14

In this new post to his blog Gonzalo Ayuso looks at building an ORM (don't worry, he recommends something like Doctrine first) as an exercise to understand how they're constructed and how one could fit his goals.

What's the motivation for me to build this ORM? The answer is a bit ambiguous. I like SQL. It allows us to speak with the database in a very easy way. [...] So the idea I figured out was to create a set of classes based on my tables, in a similar way than traditional ORMs to help me to autocomplete the fields and table names.

He creates a simple example with a "test" table with three columns with a mapped class (in the "Orm" namespace) that will allow IDEs to follow down the path to fetch the data from the "id", "field1" and "field3" columns. The complete code listing for his example is at the end of the post - PHP 5.3 friendly, of course. Some trigger and scaffolding examples are also included.

1 comment voice your opinion now!
orm tutorial example database doctrine autocomplete


Jonathan Wage's Blog:
Blending the Doctrine ORM and MongoDB ODM
August 26, 2010 @ 13:34:40

On his blog today Jonathan Wage has posted a tip on getting MongoDB connections and queries to work through the Doctrine ORM layer:

Since the start of the Doctrine MongoDB Object Document Mapper project people have asked how it can be integrated with the ORM. This blog post demonstrates how you can integrate the two transparently, maintaining a clean domain model. This example will have a Product that is stored in MongoDB and the Order stored in a MySQL database.

His code shows how to define the document and entity for the connection (a Product and Order) and creating an event subscriber to lazy load the product. He creates a sample Product and an Order for it and save them to the database. He also includes code to pull an order back out by its ID number and get an Order object back out (with Product data inside).

0 comments voice your opinion now!
doctrine orm mongodb document entity subscriber event tutorial


Matthew Weier O'Phinney's Blog:
Autoloading Benchmarks
August 18, 2010 @ 10:14:59

Matthew Weier O'Phinney has a new post to his blog (following this post on directory iteration for autoloading) with some of the benchmarks of different methods he tried for automatically loading the libraries his scripts needed on demand.

During the past week, I've been looking at different strategies for autoloading in Zend Framework. I've suspected for some time that our class loading strategy might be one source of performance degradation, and wanted to research some different approaches, and compare performance. In this post, I'll outline the approaches I've tried, the benchmarking strategy I applied, and the results of benchmarking each approach.

His testing included a baseline of the Zend Framework 1.x series loading, a naming/class standard following the PEAR standards and class mapping with file/class name pairs. He includes his benchmarking strategy and the scripts he used to run the tests (on github here). He ran them both with and without opcode caching to give a better overall performance view.

0 comments voice your opinion now!
autoload benchmark classmap spl pear psr0


PEAR Blog:
PEAR in August
August 16, 2010 @ 08:32:56

On the PEAR blog there's a new post updating you on some of the happenings with the PHP packaging tool recently.

We've been fairly quiet, launching pear2 and pyrus into the line up, welcoming new faces to the QA team, Jesus Espino, and getting ready to call an election for the new pear group.

They also mention several package releases (including updates to Net_DNS and Services_Twitter) and a call for contributions from anyone out there by working on deprecated code, unit tests or even just bug reports.

0 comments voice your opinion now!
pear package update status august


Solar Blog:
Switch to Pirum PEAR Server
July 12, 2010 @ 10:13:46

On the Solar framework blog today there's a quick new post about a change they've made to their distribution method:

I just switched the solarphp.com PEAR server over from the old Chiara_PEAR_ServerPirum, then plan and execute the conversion and server update. The presentation is not as slick as I'd like, but it's dead-stupid simple to set up, and I can tweak the CSS etc. later.

Pirum is a simpler alternative for a PEAR channel server manager that aims to make it simpler than some of the more complex options offered in the past. You can install Pirum from its PEAR server.

0 comments voice your opinion now!
pear server solar framework pirum


Kevin Schroeder's Blog:
Deployment Series
June 28, 2010 @ 08:22:19

If you're interested in the deployment of PHP applications, you'd do well to check out a series of articles Kevin Schroeder has posted to his blog talking about different methods for moving your site out when it's ready for the world to see.

His articles cover:

This last option, while a bit more difficult than some of the others, seems to becoming more and more popular as a self-contained, easy to deploy method that's very controllable.

0 comments voice your opinion now!
deployment package pear sourcecontrol rsync series


Developer.com:
Doctrine Object Relational Mapping for Your PHP Development
June 14, 2010 @ 10:22:06

New on Developer.com today there's a new article looking at one of the more powerful ORM tools available for PHP - Doctrine.

Because of the relational database's pivotal role in driving Web applications, a great deal of time and effort has been put into creating tools that not only simplify the task of mapping database tables to a programming language's object-oriented class structure, but also facilitate the management of your data and schemas over the project lifecycle. [...] The PHP community also has a powerful database integration tool at their disposal: a project known as Doctrine.

They help you get started with this powerful tool by showing you how to get it installed, create a sample schema and loading some fixtures (base data). There's also a quick snippet of code showing you how to grab information from a sample user table and display the name of the user.

0 comments voice your opinion now!
doctrine object relational map orm tutorial


Michael Kimsal's Blog:
Zend Framework starter kit - zfkit.com
June 10, 2010 @ 13:47:53

Michael Kimsal has put together a Zend Framework starter kit currently posted over on github here.

Feel free to fork it and send me pull requests. There's a load of things I'd like to do to/with it, including a default basic authentication and user mgt system, a basic forms generator, some menu stuff on the side, and some other small stuff. It's got Doctrine built-in, and ready to go with a sample book/author object set, although no sample *data* yet, nor any examples of how to use the code specifically. Maybe I'll add some of that soon.

The ZFKit brings helps you get started quickly by giving you an example of a site that combines Doctrine, PHPUnit and the Zend Framework into one "ready to go" bundle.

0 comments voice your opinion now!
zfkit zendframework doctrine quickstart phpunit


Developer.com:
Creating Complex, Secure Web Forms with PHP and HTML_QuickForm2
May 11, 2010 @ 11:05:51

New on Developer.com today there's a tutorial looking at creating complex, secure forms with the HTML_QuicForm2 PEAR package. This package will give you more control over the form, the validation it performs and the overall security it automatically handles.

For PHP developers, HTML_QuickForm2 PEAR package provides a programmatic interface for rigorously defining form controls, value requirements, and user notifications. Using HTML_QuickForm2 helps these developers create usable and secure Web forms without sacrificing visual appeal. This solution takes much of the guesswork out of secure forms development, allowing you to create robust forms with minimal time investment. In this article, I show you how to take advantage of HTML_QuickForm2 to streamline the creation and validation of complex HTML forms.

They help you get the package installed (if all goes well, it's just a call with the "pear" command-line tool) and how to create a simple form for accepting a user's name and email address. They modify it a bit to create another example - one that takes in a preferred format for the email that would be sent over to the user. They also work in the concept of required fields and how to show the error messages that might result from those being empty.

0 comments voice your opinion now!
complex htmlquickform2 pear tutorial form


Court Ewing's Blog:
The Best Models are Easy Models
May 10, 2010 @ 15:51:57

In a recent post to his blog Court Ewing talks about what he sees as one of the most important parts of any framework-based application - good, easy models that are simple to use and well structured.

By treating your models as nothing more than a place to dump your data, you are doing yourself and your application a severe disservice; your business logic is going to be scattered throughout the rest of your application, and you will have a progressively more difficult time as you try to maintain and build upon your existing system. Do not fall into the anemic model trap.

He gives examples of good models (based on how Doctrine 2 handles them) to work with the data for a sample blogging application. His main "Article" model pulls from an abstract one to help define some relationships and magic methods to handle class properties in a protected and private way, depending on the context. He finishes the post with an example of how to use these new model classes to interact with his blog data.

0 comments voice your opinion now!
model anemic tutorial easy doctrine


Anna Filina's Blog:
Doctrine Translation in leftJoin()
April 26, 2010 @ 11:39:33

In a recent post to his blog Anna Filina looks at internationalization in Doctrine and how Symfony auto-builds things to take care of it for you.

If you use Doctrine, then you probably know how lazy loading can hurt your performance. I carefully craft every query to everything that I need in one shot, but only what I need. One thing that evaded me at first was the i18n part. I am pleased with the way Doctrine + symfony magically creates all my models and database tables with i18n support.

She talks a bit about the internationalization (i18n) support is put into the schema.yml file and the bit of confusion she had over how to handle a left join using its structure. The key lies in the Translation relationships.

0 comments voice your opinion now!
doctrine translation left join i18n internationalization


echolibre Blog:
The Capsule CRM API and PHP
April 06, 2010 @ 09:05:12

On the echolibre blog David Coallier has written up a post talking about their CRM tool of choice, Capsule CRM, and some of the things they're doing to create an API interface to interact with it (including a proposed PEAR package).

we realized that we needed to integrate Capsule with some online services we have and so we built a PHP wrapper for their API to give developers the ability to place requests and use the web service as they wish using PHP. Services_Capsule is now being proposed to PEAR however you can already get the code from http://github.com/davidcoallier/Services_Capsule and start using it.

He also includes an example of how it can be used to create a new person, search the party information, update the user's information and add them to a pre-existing opportunity. There's not a lot of documentation for the package, so be ready to search through the source for some of the parameters and functionality.

3 comments voice your opinion now!
capsulecrm api pear package servicescapsule


PEAR Blog:
PEAR in March 2010
March 22, 2010 @ 10:07:09

On the PEAR blog there's a recent post looking at the month of March so far and some of the PEAR-related happenings that have already popped up.

After a quiet holiday season, the PEAR community has started rumbling again. [...] If this level of activity is anything to judge by, the future of PEAR looks bright for 2010!

Updates this month include a mention of the PEAR project on digg.com, the release of several new package versions for things like Facebook and the Mail package. They've also set up a continuous integration environment to help make the maintenance and testing of the code in the new releases simpler. There's also mentions of Phirum and PEARFarm and how they're lowering the barrier for PEAR installation everywhere.

0 comments voice your opinion now!
march pear community package channel installer


Michael Kimsal's Blog:
Zend Framework and Doctrine integration - autoloading of doctrine models
March 04, 2010 @ 08:30:11

Michael Kimsal has a new post today looking at using Doctrine models in a Zend Framework application and how to get them to autoload when you need them with the help of Zend's Zend_Loader_Autoloader.

I would have expected there to be some explicit reference to how to set this up, but the best I can find are general examples where the Doctrine models directories are appended to the include_path in a ZF index file. Shouldn't there be a way to explicitly have the Doctrine subsystem react to requests for models as well?

He works through the process he followed, including the possibilities of extending the Doctrine Core and accessing the $_modelsDirectory property, but didn't have much luck because of how Doctrine forces the autoloading. He asks for help and gets some good suggestions in the comments on where to look fro documentation and a possibility of skipping the Doctrine loader all together.

0 comments voice your opinion now!
zendframework doctrine orm autoload


ZendCasts.com:
Logging with Timestamps and Doctrine Event Listeners
February 18, 2010 @ 08:16:43

The ZendCasts.com site has recently posted a quick video covering logging and Doctrine event listeners in a Zend Framework application.

This short video is going to be the last in my 2009-2010 series on Doctrine 1.2. I'm wrapping it up with a little example of adding timestamps, logging and using Doctrine's event listener architecture.

The tutorial shows you how to pull in the features of Doctrine to make it easier to create a more complex logging system. He shows how to set up the schema file, add in controller functionality and backend models to make things all work together happily. You can get a copy of the project he's building from his subversion repository.

0 comments voice your opinion now!
timestamp logging doctrine database integration


Chris Hartjes' Blog:
Sorting Relationship Results In Doctrine 1.2
February 05, 2010 @ 10:51:32

Doctrine allows you to set up relationships to link data in various tables together. Unfortunately, those aren't always in the order they need to be in. In a new post to his blog Chris Hartjes shows you how to sort these relationship results just by adding a simple line to your request.

I started digging around via search engine. Took me about an hour to find the solution. First, it took me half the time to dive deep enough to find out WHERE I can define the default sort order. Surprisingly, it was in an area that made total sense but I could not find before.

You can see an example of it in the "hasMany" call in his code snippet - the addition of the "orderBy" option and the value showing the sorting order. Here's the StackOverflow page that gave him the answer he needed.

0 comments voice your opinion now!
relationship doctrine sort tutorial orderby


Till Klampaeckel's Blog:
Quo vadis PEAR?
January 29, 2010 @ 11:24:46

Till Klampaeckel has a recent post about PEAR versus PEAR Farm on his blog detailing what each is and how to use the PEAR Farm to get your software out there.

With the release of Pirum, I'm really excited to see two public PEAR channels that aim to make PEAR a standard to deploy and manage your applications and libraries. One is PEARhub and the other is PEAR Farm. I think I'm gonna stick with PEAR Farm for a while, so this blog entry focuses on things I noticed when I first played with it. [...] A lot of people mistake these new channels for the wrong thing. They think that this will eventually replace PEAR. I don't think it will - ever.

He shows how to get the PEAR Farm libraries installed (via the PEAR installer) and how to set up your project with the pearfarm command-line tool. He also offers a few "gotchas" and tips to help you with a few of the issues he saw along the way. You can get an idea of the end result by looking at Till's PEAR Farm page.

3 comments voice your opinion now!
pear pearfarm tutorial package


ZendCasts.com:
Logging in Users using Doctrine and Zend_Auth
January 27, 2010 @ 09:38:52

The next ZendCast in the user authentication with the Zend Framework's Zend_Auth has been posted to the ZendCasts.com site today. In this new screencast, they look at how to integrate it with Doctrine to automatically validate users against the information in your databases (following up on this first part of the series).

Here's the second part of my Doctrine / Zend_Auth example. In 15 minutes, we create a logout, login and protected area that's reliant on the ZC_Auth_Adapter adapter we created in last week's video. Notice how there's no code in the IndexController exposing the authentication implementation,

You can grab the code to follow along or build it as he goes. You'll need a copy of Doctrine up and working to keep up, though.

0 comments voice your opinion now!
zendframework zendauth tutorial screencast doctrine


ZendCasts.com:
Writing a Zend_Auth_Adapter with Doctrine
January 25, 2010 @ 09:54:32

New from the ZendCasts.com site today there's this new screencast looking at the integration of the Zend_Auth_Adapter component of the Zend Framework and the Doctrine ORM library to split out the authentication from the persistence layer.

I've been using Doctrine a lot in my own work, and recently found myself itching to have tighter integration between Zend and Doctrine when it comes to user logins. Luckily, Zend provides a very simple interface with regards to Zend_Auth. This way, it's easy to decouple your persistence layer (in my case Doctrine) from the authentication layer.

He also recommends checking out Palo Verede's look at the same topic. You can watch the screencast here and grab the code for it here.

0 comments voice your opinion now!
zendauth adapter doctrine authentication


Rdavid.net:
My Zend Framework Model Layer Part Service, Part ORM
January 21, 2010 @ 13:09:12

In a new post on the Rdavid.net blog there's some discussion about Zend Framework models, the best approach and a "Service Class" idea.

After some more thought and lots of research on the subject, I've come to a solid point where I actually have something to try out which seems semantic aside from the naming of the class (Service Class) '" but this is derived from what some people are talking about in ZF circles starting from Matthew Weier O'Phinney who was coining it as the "Gateway to the Domain" from early on, then later changing it to "Service Class".

He defines what his service class idea is - a layer between the database and each of the models that allows them to be agnostic about what kind of service they're using. He also breaks down some of the key points around his approach including the fact that the Model Service can create Forms and that the Model Service can use the Zend_Cache component directly for improving performance. Be sure to check out the comments for thought from other Zend Framework developers.

0 comments voice your opinion now!
service model layer orm doctrine


Rdavid.net:
Test Results on Memory Usage of Zend Framework and Doctrine with APC
January 18, 2010 @ 13:38:01

On Rdavid.net there's a post with the results from some tests run on hos much memory the Zend Framework and Doctrine used both with and without the APC caching.

I have decided to run with Doctrine as my Domain Model in Zend Framework projects. The thing is, if I'm going to commit to this, I need to know that applications I build in the future with the Zend Framework while using Doctrine as an integral part of the Model layer will not take performance hits from things like memory usage. With Doctrine doing a _lot_ of magic, I thought that this would be something that I wanted to see for myself. 4MB Memory to execute a simple Query?!?! Ffffff#$#!!!!

He includes the code for his testing procedure - creating a basic Doctrine object and running a "fetchOne" query and measuring the memory consumption with the memory_get_usage function. His results with the APC caching came out faster by about 60-70 percent.

0 comments voice your opinion now!
zendframework memory usage doctrine benchmark


Rob Morgan's Blog:
Howto Publish a Pear Package on Pearhub
January 18, 2010 @ 11:48:10

Rob Morgan has submtted a recent post from his blog that shows how to create and deploy a PEAR package for your application onto the new Pearhub repository.

You might be wondering what is Pearhub? From Pearhub.org - 'Pearhub is a pear channel and a pear package publishing platform. As a user, you can install packages. As a developer, you can publish packages'. You can read Troels Knak-Nielsen's introductory blog post here: http://www.sitepoint.com/blogs/2010/01/08/introducing-pearhub.

You'll need an OpenID, an account on github and know how to use git on your system to get everything packaged up and ready to go. You create your app locally, make a github repository for it and set up a pearhub account to point to it. With all of that set up, it's as easy as doing a channel-discover on the pearhub server and running the "pear install" on the package. The rest is done for you!

1 comment voice your opinion now!
tutorial publish pear pearhub package git


Benjamin Eberlei's Blog:
Application Lifecycle Management & Deployment with PEAR & PHAR (revisited)
January 18, 2010 @ 09:25:05

In a recent post to his blog Benjamin Eberlei looks at how PEAR and PHAR can affect the lifecycle of the development of your application following some of the feedback he got from a previous article on the same topic. In this revised version he talks about the open source project he's started, Pearanha, to bundle all of these ideas together.

First of all, yes the presented solution was somewhat complex, partly because it is still a proposed idea and definitely up for optimizations. However I am still very convinced of my approach, something I should discuss in more detail.

He mentions some of the downfalls that PHP applications have had up until now as far as ease of deployment and the maintaining of dependencies. Most of the suggested solutions aren't optimal, so a system using the PEAR installer would have to overcome some of them and keep it simple to use. Benjamin has taken the PEAR installer and laid his new Pearanha tool on top of it to help you create custom PEAR installer scripts.

0 comments voice your opinion now!
pear deployment pearanha installer


ZendCasts.com:
Deep Integration between Zend and Doctrine 1.2
January 15, 2010 @ 09:57:16

New on the ZendCasts.com site is this recent screencast about the best approach for integration of the popular Doctrine ORM and the Zend Framework.

his video is my humble approach of combining some of the learning brought about over the last few weeks on Zendcasts, as well as suggestions from Doctrine developers. The goal of this video is to show how you leverage the existing resource loading tools in Zend to have a model structure that reflects Zend's best practices.

The code is provided if you'd like to follow along with this (about) twenty-five minute presentation.

0 comments voice your opinion now!
doctrine zendframework tutorial screencast


SitePoint PHP Blog:
Introducing pearhub
January 08, 2010 @ 09:11:20

In this new post to the SitePoint PHP blog Troels Knak-Nielsen looking at a new PHP-centric service for creating a resource like the Ruby on Rails "gems" but for PHP software - pearhub.org.

I think services like these are an important reason why gems are so popular amongst Ruby developers, and I figured that PHP really needs something similar. So over the Christmas, I have been brewing on a service, which is now stable enough that I'll make it available to the community at large. pearhub.org provides a place where you can register a project, that is hosted on Github, Google code or similar (Currently only git and subversion is supported). The service will generate a PEAR package and put it on a PEAR channel.

PEAR channels have been difficult to set up in the past but the pearhub.org service makes it simple and you get the added benefit of being able to use the PEAR installer application to do installations and upgrades. You can find out more about the service on their FAQ.

0 comments voice your opinion now!
pearhub pear channel gem


Hannes Magnusson's Blog:
Unix manual pages for PHP functions
January 05, 2010 @ 11:06:06

Hannes Magnusson has a new post today about an interesting feature of the PHP documentation some might not have known existed - manual pages (man) for PHP functions/methods for unix systems.

For a while I had vim configured to run reflection when I hit "K", but after the PHP documentation team released unix manual pages for PHP I now get the manual page in all its glory; function description, parameter descriptions, return values, examples, notes, see also and everything you are used to see from the online manual. Its awesome.

These manual pages aren't installed by default, so you'll have to grab the download from the PEAR channel for the PHP documentation (doc.php.net/pman). If you're wanting to use it in VIM, you'll also need to change the keywordprg setting to "pman".

0 comments voice your opinion now!
unix manual page pear vim


Zend Developer Zone:
Paging and Sorting Data with Zend Framework, Doctrine and PEAR (part 2)
January 04, 2010 @ 11:52:33

The Zend Developer Zone has posted the second part of their look at pagination with the combination of the Zend Framework, Doctrine and PEAR and how the Zend_Paginator component compares to the PEAR and Doctrine alternatives.

In the previous segment of this article, I introduced you to the Zend_Paginator class, which provides a flexible API for paginating any data collection, whether it is expressed as an array or a database result set. [...] This article will explore two such alternatives, the PEAR Pager class and the Doctrine Pager class, and give you a crash course in how you can use them to quickly add paging and sorting features to your PHP application.

The article gives examples for both of the other methods - a simple pagination of database information with the PEAR pager component (and other packages that can make the results more effective) and the creation of a Doctrine instance where the results are handled via a series of built-in method calls.

1 comment voice your opinion now!
tutorial zendframework pear doctrine pagination sort


ZendCasts.com:
Doctrine Relations and Zend MVC
December 30, 2009 @ 10:29:43

New from the ZendCasts.com site there's a new screencast looking at the relations you can create between Doctrine and your Zend Framework applications.

This short podcast covers how you can easily build a form using Zend's MVC model via Zend_Controller and using Doctrine for persistence. You can download the source code or browse it online. Enjoy!

This screencast is part of a series they've been doing on Doctrine including Doctrine Relations and Data Fixtures and Writing Doctrine Unit Tests with Zend_Test.

0 comments voice your opinion now!
doctrine relations zendframework


Zend Developer Zone:
Object-relational mapping with Doctrine, Flash Builder, and PHP
December 22, 2009 @ 09:53:16

On the Zend Developer Zone there's a new tutorial on how to use the combination of Doctrine and more PHP to connect with Flash Builder to create a simple classified ad system.

This article shows how to set up Doctrine and use it in PHP code. Then, it exposes PHP services to Adobe Flash Platform applications using Zend_Amf. You'll then call the Doctrine-enabled services from a Flex client. Finally, I'll show you how to switch your database from MySQL to SQLite with four lines of code. And I won't write a single SQL statement.

He shows how to set up a full Apache/MySQL/PHP installation with Doctrine, Flash Builder Alpha and the latest edition of the Zend Framework. He shows how to set up the models, connect Flash Builder to the app via the Zend_Amf component and how to build the frontend for the app inside Flash Builder.

0 comments voice your opinion now!
orm doctrine flashbuilder tutorial classifieds


Benjamin Eberlei's Blog:
Trying a Two Step PEAR/PHAR approach to develop and deploy
December 21, 2009 @ 14:55:12

Benjamin Eberlei has a new post today about a deployment technique he's trying out - using PEAR and PHAR to create deployable packages.

With PHP 5.3 the PHAR extension is a pretty powerful concept for all your deployment needs, however it does not tell the complete story. [...] With Pirum being a simple PEAR channel server there is also momentum for projects to distribute their code via PEAR. However PEAR is mostly used in the server-wide configuration use-case, which is not very useful if you plan to distribute your complete application in one PHAR file.

He shows how to create a sample package from a Zend Framework application, set it up in a PEAR channel complete with the ability to run a "pear upgrade" to get the latest version of the package. He also includes a bit of sample code to work with the PHAR archive and load the libraries inside.

0 comments voice your opinion now!
pear phar deploy develop tutorial


PHPBuilder.com:
Build an MVC Framework with PHP
December 18, 2009 @ 07:50:52

On PHPBuilder.com today there's a new tutorial that walks you through the process of creating a simple MVC framework in PHP based on Smarty, PostgreSQL and the PEAR XML_Serializer package.

PHP now enables you to build robust, manageable, and beautiful enterprise web applications. The best way to do that is to divide the application into three components: model, view, and controller. In other words, you need to separate the presentation, the database, and the business logic from each other. The most common approach for achieving this design goal is to adhere to a strict Model-View-Controller (MVC) framework.

He uses the example of creating an application (a feed reader) to show how the parts of the MVC will fit together as a whole. You won't find any code examples in the article, just an explanation of how everything works together. You can, however, dowload the source and follow along.

0 comments voice your opinion now!
mvc framework tutorial smarty postgresql pear


Ken Guest's Blog:
A response to "Better Postal/Zip Code Validation Method for CakePHP 1.2"
December 17, 2009 @ 11:14:53

In response to a different post he read on a postal/zip code validation topic, Ken Guest has points out other resources that can be used to accomplish the same sort of thing and already exist.

I drew attention to two things. The first is that there are Validation packages in PEAR, including the main Validate class and all the Validate_xx subclasses such as Validate_US, Validate_CA and some 22 others). The second item I drew Jamie's attention to is that his validation code counts a zip code of "00000' as valid, when the USPS zip code look up tool correctly (and they should know!) identifies that code as invalid.

He wholeheartedly opposes the "Not Invented Here" syndrome that developers (with a hefty dose of framework developers included) seem to have.

1 comment voice your opinion now!
response zipcode postal validation pear lookup


Zend Developer Zone:
Paging and Sorting Data with Zend Framework, Doctrine and PEAR (part 1)
December 11, 2009 @ 09:43:29

On the Zend Developer Zone there's the first part of a series looking at pagination and sorting of data with the combination of the Zend Framework, Doctrine and PEAR.

When building database-backed applications, one of the important problems for a developer or user interface engineer involves making large data sets more manageable by, and therefore more useful to, application users. [...] Back in the good old days, adding pagination to a PHP application was mostly a manual task, involving offset calculations and custom query generation. In recent years, the task has become significantly simpler, mostly due to the presence of ready-made pagination components in most common frameworks.

His tutorial uses the Zend Framework, Doctrine and the Pager, MDB2 and Structures_Datagrid PEAR packages. He starts with a basic select and format kind of example to show a few lines per page. To improve it (for larger data sets) he shows how to use the Zend_Paginator to only grab the rows needed for the page. Finally, he adds in code to allow for column sorting, making it easy to reorganize the results how you'd like.

1 comment voice your opinion now!
zendframework pagination sorting doctrine pear tutorial


Symfony Blog:
Doctrine vs Propel
December 07, 2009 @ 14:42:43

Since the Symfony framework project has such tight integration with both the Propel and Doctrine ORM layers, they thought they'd share some statistics on the usage of both as mapped through the stats from their Jobeet tutorial.

As for any Open-Source community, it's not easy to find metrics that tell you what people use and how they use it. You can measure the number of tickets for a specific feature, count the number of people asking for help on Propel or Doctrine. But for the Propel vs Doctrine question, we have two more reliable metrics.

As is shown in this graph of the total Jobeet traffic in 2009, Doctrine is winning by a long shot. That's not to say that you can't still use Propel is that's what you and your application are using, this is just showing the overall popularity of each of the ORMs.

1 comment voice your opinion now!
doctrine propel usage statistics


WebReference.com:
Globalize your Web Applications PHP's Locale Package
December 07, 2009 @ 12:06:38

On WebReference.com there's a recent article looking at the PEAR internationalization (i18n) packages and how they can be used to internationalize your application.

For many of us, the realization of the extent of countries' interdependence was driven home by the recent global economic meltdown. So what does all this have to do with us Web developers? It's a resounding wake up call that we have to think of other nationalities when we develop our websites and applications. In most cases, developing a web app in English alienates much of the world's population and greatly reduces potential profits! With that in mind, this article is the kickoff for a series that discusses the ramifications of globalization on our websites and applications.

The look at some of the local identifiers (like LC_ALL, LC_TIME, LC_ADDRESS and LANG), how to access the values for them on the different OSes and how to use the I18N_Country and I18N_Language packages from the PEAR I18N package to handle some simple multi-language support.

0 comments voice your opinion now!
locale package golablize pear tutorial


Juozas Kaziukenas' Blog:
Zend Framework and Doctrine. Part 3
December 03, 2009 @ 10:54:23

Juozas Kaziukenas has posted the third part of his series looking at the powerful combination of Zend Framework and the Doctrine ORM layer.

During last two months I spent massive amount of time tweaking Doctrine ORM framework and making it to perform as fast as possible (as you might have noticed from my never ending tweets). This post is devoted to performance and efficiency, with practical tips & tricks how to reduce memory usage, make it work faster and save resources.

He's broken it up into two main parts with points underneath:

  • Speed including a look at hydrators, DQL and optimization
  • Memory usage and how you can optimize things that seem simple and some recommendations of tools you can use to resolve some of the trouble spots.
0 comments voice your opinion now!
zendframework doctrine memory speed


Fabien Potencier's Blog:
Pirum, the Simple PEAR Channel Server Manager
November 30, 2009 @ 08:17:16

Fabien Potencier has written up a post detailing a PEAR channel server manager he's developed, Pirum.

Pirum lets you setup PEAR channel servers in a matter of minutes. Pirum is best suited when you want to create small PEAR channels for a few packages written by a few developers. Pirum consists of just one file, a command line tool, written in PHP. There is no external dependencies, no not need for a database, no need to setup credentials, and nothing need to be installed or configured.

All you need to do to get the tool is download the pirum file and go. It includes features like per-channel HTML pages and Atmos feed release tracking along with several other standard PEAR channel features.

There's already been one project that's made the swtich - PHP_Depend.

1 comment voice your opinion now!
pirum pear channel server simple


Adam Jensen's Blog:
Using Zend_Acl with Doctrine record listeners
November 25, 2009 @ 11:53:29

Adam Jensen has written up a quick tutorial about using Doctrine record listeners to link a Zend_Acl component with your database.

In previous Zend Framework apps I've written, I often handled access control at the level of the controller action. Each action was represented in the ACL as a resource, and the ACL logic was applied by a custom plugin just prior to any action dispatch. [...] As a result of these concerns, I decided on a lower-level, model-centric approach for this blog: my models are my resources. Each model class implements Zend_Acl_Resource_Interface, and the ACL specifies "create," "read," "update" and "destroy" privileges for each class (more or less).

Checking for the permissions with a setup like this can be time consuming, though, so he found an ally in the record listeners Doctrine allows you to set. He combines a Doctrine_Record_Listener object with a Zend_Acl one in a preInsert method with a getCurrentRole to add the user handling all in one place.

0 comments voice your opinion now!
record listener doctrine zendacl zendframework


Juozas Kaziukenas' Blog:
Zend Framework and Doctrine. Part 2
November 18, 2009 @ 07:58:25

Juozas Kaziukenas has posted the second part of his series looking at the combination of the Zend Framework and Doctrine (part one is here). In the previous part he explained the technologies some. In this second part of the series he focuses more in getting Doctrine set up and working.

Today we start actual development with Doctrine and Zend Framework. Base of this post is my code which I have been using for quite a few projects and it worked really well.

He walks you through the steps to getting Doctrine set up - creating the database, downloading and unpacking the latest version of Doctrine, setting up your application.ini file and creating the models from the database. Add in a sample query and things should be working perfectly.

0 comments voice your opinion now!
zendframework doctrine tutorial install


Juozas Kaziukenas' Blog:
Zend Framework and Doctrine. Part 1
November 17, 2009 @ 08:19:18

Juozas Kaziukenas has started a new series of posts to his blog today with this first part of his look at combining the Doctrine ORM with Zend Framework applications.

It was quite common to use Zend_Db_Table as base models class, but it was simply not practical. When you start dealing with relations and hierarchical data types it starts to get really tricky, because simply Zend_Db_Table doesn't provide an extensive enough functionality. So half a year ago Zend Framework developers started to look for better solutions.

An alternative (and a very powerful one at that) was found in Doctrine - an object relational mapper tool that sits on a database layer. Doctrine 2 will even be the first ORM with seamless integration between the Zend Framework (and Symfony). He briefly touches on what some sample code might look like and the command to build out your model classes from predefined YAML files.

0 comments voice your opinion now!
zendframework doctrine tutorial


PEAR Blog:
Net_Traceroute and Net_Ping security advisory
November 16, 2009 @ 07:56:43

An advisory has been issued on the PEAR blog about two packages - Net_Traceroute and Net_Ping - that could expose your site to a security issue, a remote arbitrary command injection.

Net_Ping is an OS independent wrapper class for executing ping calls from PHP. Net_Traceroute is an OS independent wrapper class for executing traceroute calls from PHP. When input from forms are used directly, the attacker could pass variables that would allow him to execute remote arbitrary command injections.

You can use filtering as a workaround until your packages are updated on your server. You can upgrade to the latest packages here: Net_Ping, Net_Traceroute.

0 comments voice your opinion now!
pear package security vulnerability nettraceroute netping


Sameer Borate's Blog:
Easy manipulation of URLs
November 10, 2009 @ 12:48:49

On his codediesel.com blog today Sameer Borate has a quick post looking at URL manipulation with the help of the Net_URL2 PEAR package.

Whether you are dynamically creating urls or changing existing ones, manipulation of urls is a frequent coding requirement during development; doing the same on short urls is easy, but quickly becomes complex for urls which have larger query parameters.

He shows how to use the package to parse the current URL into its respective parts (host, port, path, etc) and how to automatically change certain parameters in the current URL and push the updated version back out the other side. There's also a bit there at the end on normalizing URLs.

0 comments voice your opinion now!
url manipulation pear neturl2 package


PEAR Blog:
Ubuntu Karmic Ships with PEAR-Affecting Issues
November 04, 2009 @ 09:47:43

The PEAR blog has pointed out some issues that the latest Ubuntu release (Karmic) can cause with a typical PEAR installation:

Be aware that the initial release of Ubuntu Karmic contains a bug that affects PHP and PEAR, whose fix came a tad too late to make the initial release. The bug is fixed, and will be included in upcoming updates from Ubuntu. [...] The bug causes some zlib functions to be unavailable to PHP, and the Archive_Tar code will silently fail due to this.

Until the update gets pushed out into the updated releases, you can use the "-Z" option on any package installs or upgrades you might do in your PEAR installation.

0 comments voice your opinion now!
pear ubuntu bug karmic


Daniel Cousineau's Blog:
Doctrine Migrations Proper
October 21, 2009 @ 09:57:11

Daniel Cousineau has posted a quick guide to migrating database information with Doctrine:

I was talking with someone [...] here at ZendCon and discovered that they were having trouble with migrations in Doctrine. Having gone through the same issues of Doctrine seemingly not being able to figure out your changes and generate migration classes, I thought I'd post the solution here for future reference.

It's four quick steps that'll get Doctrine to automatically generate the differences (deltas) and upgrade your models to reflect these changes.

0 comments voice your opinion now!
doctrine migration tip yaml


Symfony Blog:
Symfony and Doctrine 2
October 12, 2009 @ 11:49:01

On the Symfony blog there's a recent post showing how to integrate the framework with Doctrine 2 via the sfDoctrinePlugin:

Today I am happy to tell you that this version of sfDoctrinePlugin is now available and ready for you to use. This article will give you a little information about how you can get started using it today!

Installing and enabling the plugin is as easy as a svn checkout and changing a few settings in your project's configuration files. You can then define your database connection and schema information settings so that the rebuild ("symfony doctrine:build") will build out correctly. They include a simple example, a repository class, to let you be sure everything is up and working correctly. You can find more information about Doctrine 2 from its online manual.

0 comments voice your opinion now!
symfony framework doctrine tutorial


IBuildings techPortal:
Using PHP_CodeSniffer
October 12, 2009 @ 07:58:51

On the IBuildings techPortal site today there's a new article from Lorna Mitchell about the use of the PHP_CodeSniffer PEAR package to run formatting checks on your code.

PHP Code Sniffer (PHPCS) is a package for syntax checking, available from PEAR. It can check code against defined rules covering anything from whitespace through doc comments to variable naming conventions and beyond. In this article we'll look at getting started with PHPCS, using it to syntax check our files, and go further to look at how the rules are create and the standards defined.

She goes through the installation (a simple call with the pear installer) and a few examples of code and the matching output for a few of the syntax formats included with the tool. She also has a section on the structure of some of the rules and looks at the sniff for defining functions for the PEAR standard.

0 comments voice your opinion now!
pear phpcodesniffer tutorial syntax


Sameer Borate's Blog:
Detecting user agents in PHP
October 07, 2009 @ 08:21:22

In a new post to his blog today Sameer looks at a trick or two about detecting the type of browser/client a visitor is using to view your website - one method with the superglobal and another with a helpful PEAR package.

Every time you use your browser to access a website a User-Agent header is sent to the respective server. Detecting user agents on the server can be useful for many reasons: browser quirks, personalize content, preventing illegal access.

He talks about the get_browser function that's included in PHP but that requires a browscap.ini file to work. His other option is the Net_UserAgent_Detect PEAR package. It grabs the user agent and breaks it up into the browser type, operating system information and any Javascript-related headers that come along with it. There's also useful tests like "isIE()" and "isNetscape()" built into the package.

0 comments voice your opinion now!
detecting user agent pear


Till's Blog:
A case for PEAR and PHP4 (Or, why BC is important!)
September 23, 2009 @ 11:11:34

In this new post to his blog till argues his case for PEAR and why support for PHP4 is a good thing when it comes to making things "just work."

Every once in someone likes to argue that PEAR is all fugly PHP4 code and why you should not use it, and instead go and use another framework or component library. Most of those people also say that they looked at or used PEAR x years ago and then act all surprised when someone else disagrees.

He talks about some of the rules around the major/minor PEAR releases and backwards compatibility breaks which, thankfully, a lot of other projects seem to adhere to. He points out that some packages have been started for different PHP generations (Mail_Queue2 vs Mail_Queue) and a few reasons why the PHP4 EON doesn't automatically mean PEAR should follow suit.

0 comments voice your opinion now!
pear backwards compatibility php4


Brandon Savage's Blog:
The Slow Death of PHP 4
September 18, 2009 @ 10:35:03

In a new post to his blog today, Brandon Savage talks about the "fade time" for PHP4 and how, really, it's gone on long enough.

Sadly, developing for PHP 4 backwards compatibility is something that companies and individuals are still doing. Wordpress released a new Widget API in version 2.8 that relies on the old-style PHP 4 constructor. Apparently, for Wordpress and many other developers, wide adoption is more important than language improvements.

This all came about because he noticed the Log PEAR package still supported PHP4. He's been making updates, though, to bring it out of the shadows and into the light of PHP5-only support.

Still, I look forward to the day when PHP 4 finally does go away forever, leaving us with a much better code base and happier developers.
0 comments voice your opinion now!
death php4 pear


Sudheer Satyanarayana's Blog:
XML RPC Client Using PHP PEAR - A Real World Example Ping Technorati
September 07, 2009 @ 16:45:04

Sudheer Satyanarayana has this new post on his blog today talking about a simple way (via a PEAR package) to make an XML-RPC connection to ping technorati about updates to your blog.

In a previous blog post we discussed how to consume the Technorati ping web service using XML-RPC. The PEAR package XML_RPC2 provides convenient client and server objects. You can call the remote methods as if they were the methods of the client object. In this post, let us accomplish the same using a PEAR package XML_RPC2. We will write a client script to update Technorati when there is new post in your blog site.

You'll need to grab the XML_RPC2 PEAR package to make this all work, but once that's installed, you're a quick few lines of code away from a client to update Technorati with the ping information for your site.

0 comments voice your opinion now!
xmlrpc client pear tutorial


Sameer Borate's Blog:
Using barcodes in your web application
September 07, 2009 @ 15:06:50

On his Code Diesel blog Sameer takes a look at creating and using barcodes in your PHP applications:

Brought into the mainstream by supermarket checkout systems, bar codes have become a ubiquitous element in our daily lives. Rarely will one come across any product that doesn't have a barcode. The idea of a barcode originated in 1932 from the thesis of Wallace Flint at Harvard.

He touches on a two types of barcodes - standard UPC and the matrix codes (like ShotCode and Semacode) - before looking at how you can create them with the PEAR Image_Barcode package. It supports multiple code types including Code 39, EAN 13, INT 25 and PostNet. Output examples are included.

0 comments voice your opinion now!
barcode pear imagebarcode tutorial


Symfony Blog:
Subversion mirrors for Phing, Propel, and Doctrine
August 28, 2009 @ 11:38:32

Following some issues with the Phing and Propel subversion repositories for Symfony, Fabien Potencier has made a few changes to aid in their future stability.

The Phing and Propel Subversion repositories have suffered from long downtime periods quite often recently (last one was today). It is quite annoying as when it happens, you cannot easily update your symfony repositories, let alone the checkout of a symfony branch. To make things worse, the Doctrine repository also had some problems recently. A lot of symfony users are quite upset by the situation, myself being the first one.

The solution - create some mirrors to provide more than one source to fetch the latest checkouts from. Here's the list of the new resources: Phing mirror, Propel mirror, Doctrine mirror.

0 comments voice your opinion now!
subversion mirror propel phing doctrine


PEAR Blog:
Fixing "unsupported protocol"
August 28, 2009 @ 07:55:49

If you've had issues with an "unsupported protocol" message when working with the PEAR installation on your PHP instance, you should check out this quick post from the PEAR blog with a tip on how to fix it.

When trying to install something, you will get the error: pear.php.net is using a unsupported protocal '" This should never happen. install failed. This problem comes from corrupted channel files. Go into your PEAR php directory and backup .channels directory.

If you go into your PEAR installation and move the .channels directory out of the way then run an "update-channels" the issue should be corrected. Unfortunately, this also means you loose all channels you'd subscribed to, but does save you from having to reinstall PEAR completely.

0 comments voice your opinion now!
pear unsupported protocol error


Pablo Viquez's Blog:
Export Excel Spreadsheets using Zend Framework
August 25, 2009 @ 07:57:30

New on his blog today Pablo Viquez has this post looking at code that will let your Zend Framework applications export to Microsoft Excel spreadsheets (via the Spreadsheet Excel Writer PEAR component).

Last week, I had to allow the user to export a given report into an MS Excel file format. The application uses Zend Framework 1.9.1 and so far ZF does not support for "Office" formats, so after searching for a nice implementation, I found a PEAR module called Spreadsheet Excel Writter, which looked pretty good, it had very good documentation and the code was clean and well structured so I wanted I give it a shot.

He lays out the structure of the sample application and, using a context switch on the request, he creates a controller that responds to the "/report" by calling a special model/view combination that uses the PEAR package to push out the custom "report.xls" file.

0 comments voice your opinion now!
zendframework pear excel spreadsheet


Matthew Weier O'Phinney's Blog:
Autoloading Doctrine and Doctrine entities from Zend Framework
August 21, 2009 @ 08:47:35

Matthew Weier O'Phinney has a new post on something he's been asked about a lot - autoloading Doctrine into a Zend Framework application.

A number of people on the mailing list and twitter recently have asked how to autoload Doctrine using Zend Framework's autoloader, as well as how to autoload Doctrine models you've created. Having done a few projects using Doctrine recently, I can actually give an answer.

His short answer - "attach it to the Zend_Loader_Autoloader". For those needing the long answer, he goes through a simple example of creating the loader object, registering a new namespace and pushing in the Doctrine functionality as an autoloader. The bootstrap class can then be modified with an "_initDoctrine" method to pull in just what scripts your app might need.

0 comments voice your opinion now!
autoload doctrine zendframework orm


PEAR Blog:
The new Group has been elected!
August 11, 2009 @ 07:51:10

According to this new post on the PEAR blog, the new PEAR Group has been officially elected:

I am more than glad to announce the arrival, the announcement of the new PEAR Group for 2009 and 2010. With a few fresh faces in the Group, this year looks very promising with the mix of both new blood and experienced PEAR Group members.

Those selected include Chuck Burgess, Ken Guest, Christian Weiske and Brett Bieber. The PEAR Group helps to guide the PEAR project as a while and push out initiatives like the updated package manager - Pyrus.

0 comments voice your opinion now!
election result pear group


Giorgio Sironi's Blog:
Doctrine 2 now has lazy loading
August 07, 2009 @ 11:07:37

As is mentioned in this new post to Giorgio Sironi's blog, the latest version of Doctrine now includes lazy loading functionality.

Lazy loading is the capability of performing a expensive operation on demand, only when it reveals necessary from a client request. [...] In Doctrine 2 I made some architectural choices implementing the proxy approach, which substitute a subclassing object to every association which is not eager-loaded.

There's two main places you can see these differences - in the one/many to one associations dynamic proxies and collection interface.

0 comments voice your opinion now!
doctrine lazy load relationships


PEAR Blog:
The elections are still going!
August 03, 2009 @ 09:45:17

The PEAR blog has a quick note about this year's elections - specifically that they have been extended due to some communication issues.

As every year, the elections for the PEAR Group and PEAR President are happening. This year due to a few factors and messages lost in translation, we decided to extend the elections period by 10 days so more people would have time to vote! So remember to cast your vote at http://pear.php.net/election/ and you have until the the 5th of August 2009.

There's both group elections and an an election for president that all PEAR developers can vote on. Hurry! The deadline is Wednesday, August 15th!

0 comments voice your opinion now!
pear election group president


IBM developerWorks:
MVC with Agavi - Add forms and database support with Agavi and Doctrine
July 28, 2009 @ 07:51:01

The second part of the IBM developerWorks series looking at the Agavi PHP framework has been posted. In it Vikram Vaswani loks at adding forms and database support to his example via Doctrine.

While Agavi can certainly be used to serve up static content, it really shines when you use it for something more complex. And in this second part, you'll do just that - over the next few pages, you'll learn how to receive, validate, and process input from Web forms, as well as connect your Agavi application to a MySQL database.

He returns to his simple templated example site and shows how to use the command line agavi tool to create the routing and controller to handle the "contact us" requests. He includes form validation examples, how to use the population filter, and how to generate the Doctrine models to connect with the form directly.

0 comments voice your opinion now!
agavi form database doctrine tutorial


PEAR Blog:
Setting Up PEAR2 and PEAR Checkouts With SVN 1.5+
July 27, 2009 @ 11:15:12

The PEAR blog has posted some handy instructions for those out there that want to get PEAR and PEAR2 checkouts working from the new Subversion repository (recently moved from CVS).

Now that pear2 is in svn.php.net, it is possible to do commits with multiple packages using a feature of subversion called "sparse checkouts." [...] Here is the version I used to set up pear and pear2 in a way that will allow committing to both pear and pear2 packages in a single commit.

Rasmus Lerdorf has written about the same thing for the main PHP side of things. All the commands you'll need are there to get things set up and working more efficiently.

0 comments voice your opinion now!
subversion svn pear pear2


Cal Evans' Blog:
XAMPP, PHP 5.3, PEAR, and PHAR (what a mess)
July 13, 2009 @ 10:53:18

Cal Evans had an issue - it involved XAMPP, PHP 5.3, PEAR and phar:

If you are installing PHP 5.3 and when you run go-pear.bat you get this: phar "C:xamppphpPEARgo-pear.phar" does not have a signature.

The short method to getting it working correctly is to update your php.ini file with a few small changes to the require_hash setting. Cal goes through the long method he took to finally get to that point - decision on the platform (XAMPP), version of PHP to use and some googling around that lead him to this and this to help resolve his problem.

It turns out that, if that's on, for security purposes it can't be overridden. Since the default is on, I had to open up my php.ini, find it and set it to off. Once it's off, everything works just fine.
0 comments voice your opinion now!
requirehash phar pear xampp


PEAR Blog:
PHP 5.3 Windows and PEAR (go-pear.phar)
July 03, 2009 @ 16:20:23

The PEAR blog has a quick note for users of PHP 5.3 and Windows:

Some users have reported that the windows builds of PHP 5.3 are not able to open the shipped go-pear.phar file.

If this is your situation, you can use their workaround (run the distributed phar version) or grab the non-pharred version.

1 comment voice your opinion now!
windows php5 phar pear


Zend Developer Zone:
Accepting Credit Card Payments with OXID eShop CE and Authorize.Net
June 26, 2009 @ 16:48:14

The Zend Developer Zone has a new post from Vikram Vaswani about accepting credit card payments through Authorize.net in the OXID eShop CE (e-commerce platform).

Now, if you're planning to start an online store, it should be pretty clear that accepting electronic payments isn't an option - it's a necessity for you to compete effectively. And that's where this article comes in. Over the next couple of pages, I'll show you how to begin accepting credit card payments for your products using the open source OXID shopping cart and the Authorize.Net payment gateway...with, of course, a little bit of PHP to make things interesting!

The glue between the OXID install and Authorize.net is created with the PEAR HTTP_Request2 package. This combined with a little extra PHP code can be installed and used as a component directly inside the application. He gives full code and screenshots to help you get it up and running on your install.

0 comments voice your opinion now!
httprequest2 pear oxidshop authorizenet


The PEAR Blog:
pear.php.net moving on
June 16, 2009 @ 07:53:18

As is mentioned on the PEAR blog today, there's some new advancements that are being made to make submitting proposals simpler.

Thanks to the efforts of Daniel O'Connor, the PEAR website is getting nicer and better. Bug RSS feeds support Baetle now, the PEAR proposal system - PEPr - works again and many small improvements and fixes found their way on the site.

Baetle is a "bug and enhancement tracking language" project that describes the information in things like the BugZilla and Jira tracking applications.

0 comments voice your opinion now!
pepr proposal baetle pear


Community News:
Want to Work on Doctrine?
May 25, 2009 @ 13:45:31

Feel like getting involved with a PHP-based Open Source project, but don't know where to start you might consider getting involved with the Doctrine project - they're currently looking for a few good programmers.

Many of you probably know Jonathan, Guilherme and Roman as being the core developers of the Doctrine project over the past 2 years. While this constancy is a good thing it's also problematic. [...] So we are left wondering. What can we do differently to get more people involved? Given the amount of users and noise about Doctrine around the PHP scene, we find the absence of new contributors quite strange

The Doctrine project is looking for developers (on both the 1.x and 2.x release series) to either get involved of to help them out with suggestions on how to get others interested in working with the project. To get in contact with the team, you can just send an email to any one of the three: jonwage [at] gmail [dot] com (Jonathan), r.borschel [at] gmx [dot] net (Roman) or guilhermeblanco [at] gmail [dot] com (Guilherme).

0 comments voice your opinion now!
interest opensource doctrine


Jani Hartikainen's Blog:
Doctrine vs. Propel 2009 update
May 19, 2009 @ 11:55:40

Jani Hartikainen takes a look at two of the major PHP ORM libraries in this new post - Propel and Doctrine.

The best PHP ORM libraries, Doctrine and Propel. Last year I compared them to each other, and now it's time to get a fresh look at how they have advanced in about a year - Is Doctrine still the better of the two? This time, I'll also look at the features of each in more depth.

He goes through some of the features (basic and advanced), how easy they are to use and their connections to the database. His personal preference? Doctrine works better for his needs.

3 comments voice your opinion now!
orm compare propel doctrine


Content with Style:
Getting phpunit to work with MAMP
May 13, 2009 @ 07:54:15

On the Content with Style blog today Pascal Opitz has made a (very) quick post about how to get PHPUnit up nd running in your MAMP installation.

In order to run my unit tests, I needed to get phpunit running with MAMP. Thanks to the helpful post of Mark Kirby on this, I figured it out.

The key is in changing the interpreter path in one file and removing a bit of code from another to point to the new PHP binary's path. You'll also need to update your PEAR include path to add in the new pear.conf location.

1 comment voice your opinion now!
phpunit unittest mamp pear configuration update remove tutorial


Sameer Borate's Blog:
Search & replace in files using php
May 12, 2009 @ 09:30:47

On his blog today Sameer Borate has posted a quick tutorial on how to use a PEAR package to do search and replace on your files from inside of PHP.

Searching and replacing content in files is a common task all of us do regularly. [...] Search/replace is easier from a shell prompt or an editor, but what if you have to do the same programatically in php. File_SearchReplace is a pear package that helps you search/replace in files through a nice object oriented interface.

Installation is simple (via the "pear" command line tool) and using it is just as easy. He gives a few examples of how it can be used - everything from a simple find and replace out to a more complicated regular expression search to be replaced with a string.

0 comments voice your opinion now!
search find replace pear package filesearchreplace tutorial regularexpression


Zend Developer Zone:
Adding Multi-Language Support to Web Applications with PHP and PEAR
April 24, 2009 @ 14:48:15

On the Zend Developer Zone today a new tutorial has been posted about multi-language translation for your site with PHP and the Translation2 PEAR package.

If you're using PHP, adding multi-language support to a Web application is quite easy, especially since the PHP Extension and Application Repository (PEAR) includes some ready-made code to help you get started. And that's where this article comes in. Over the next few pages, I'll introduce you to PEAR's Translation2 package, and show you how you can use it to add multi-language support to your application.

You'll need to have everything up and running (including an install of the PEAR package) before getting started. The tutorial shows how to set up database tables and sample data to reference with a basic "Hello World" script as well as a few more complex examples involving user input and creating a cross-language menu for a sample site.

0 comments voice your opinion now!
pear tutorial translation2 package language switch


Zend Developer Zone:
Using the Twitter API with PHP and PEAR
April 15, 2009 @ 09:31:39

On the Zend Developer Zone a new article has been posted (by Vikram Vaswani) about how you can use the Services_Twitter PEAR package to connect your applications with Twitter.

Unless you've been living in a cave for the last few years, you know what Twitter is - a free online service that allows users to send out concise, real-time updates on what they're doing at any given moment.

[...] The really good stuff, though, is hidden behind the scenes. Like many Web 2.0 applications, Twitter exposes its innards to the public via a REST API, making it possible to develop customized applications that run on top of the base service. [...] This article focuses on one such library, the PEAR Services_Twitter library, which provides a full-featured API for interacting with the Twitter service through a PHP application.

Once the package is fetched (via the "pear" command on the command line) he shows how to make some example connections like grabbing the most recent status for a user, updating that status, grabbing recent posts from a user's timeline, finding followers/friends and much more. The package makes it so simple that any one of these examples isn't much more that seven or eight lines long.

0 comments voice your opinion now!
twitter api pear package service tutorial


Greg Beaver's Blog:
Code Coverage Reporting using PEAR, PEAR2, phar, and sqlite3
April 14, 2009 @ 12:08:08

Greg Beaver has a new post reporting on his latest efforts to improve the Pyrus PEAR installer and to make it a more strong, stable and robust end result.

One of the problems I found when designing the new code for PEAR 1.4.0 (back in the day) was that it was very difficult to determine whether changes would break things. The main problem revolves around the colossal size of the test suite. [...] This is a real problem when trying to develop with any kind of flow. If, after every change, one needs to sit through 35 minutes of tests, one will never develop anything of substance.

What he wanted was an application that could detect only the files modified and tests those with the results put into the code coverage report. To fill the need, he created test-modified.php to run just the phpt tests needed.

0 comments voice your opinion now!
codecoverage report phpt unittest pear phar sqlite custom


Sameer Borate's Blog:
Detecting duplicate code in PHP files
April 08, 2009 @ 11:16:17

On his blog today Sameer looks at a method for finding duplicate code in your applications with the help of PHPCPD.

Duplicated code in projects is a frequent thing and also the one ripe for factoring out in a new class or function. Cut/Paste coding is a common development practice among programmers, a lot of which can lead to code size increase and maintenance nightmares. PHPCPD (php copy paste detector) is a PEAR tool that makes it easier to detect duplicate code in php projects. Below is a short tutorial on the PHPCPD package.

You can either install the tool via a PEAR channel or directly from the github site. Once its downloaded and extracted you can immediately run it on the subdirectory of your choice. He also includes a more extended example - a search on a minimum of 5 lines of 70 tokens found to trip the filter in finding cloned functionality.

0 comments voice your opinion now!
phpcpd pear channel install tutorial copy paste detector


Christoph Dorn's Blog:
FirePHP for Zend Server
April 01, 2009 @ 10:21:08

Zend recently released one of their latest offerings to the PHP development community - Zend Server. Using the Community Edition of the platform, Christoph Dorn has integrated a popular debugging tool - FirePHP - into his local installation.

This PHP environment bundle is backed by Zend which means it will stay maintained and likely make it into many corporate environments. It also ships with Zend Framework and PEAR which means it has full native FirePHP support right from the start! [...] I am going to walk you through how you can get FirePHP setup for ZendServer with the help of some glue code. The glue is available from the FirePHP PEAR channel and will be maintained along with FirePHP going forward.

Before getting into the installation/configuration of FirePHP, he stops to talk a bit about PEAR and what it can do for you and your applications (and a few places it could improve). Following that, he gets to the good stuff and walks through the install of Zend Server, including the FirePHP PEAR package and doing a little debugging to ensure you're set up correctly.

0 comments voice your opinion now!
firephp zendserver zend pear package debug


Echolibre Blog:
PEAR Strikes again
March 24, 2009 @ 11:14:11

A little while back, this interview was posted to the echolibre blog where David Coallier got a chance to talk with Iarfhlaith Kelly (of webstrong) about their use of PEAR.

This web app has a huge potential (internationally) and is developed following a solid architecture. Being strong PEAR contributors we are of course happy to take a look at what helped the footprintapp.com team achieve such a great product. So I went ahead and asked a few questions to Iarfhlaith Kelly from webstrong.

They talk about time spent using the PEAR libraries, how its helped reduce coding and development time and what sort of packages webstrong makes use of (Auth_HTTP, XML_Parser, etc).

0 comments voice your opinion now!
pear interview webstrong library iarfhlaithkelly use package


Blue Parabola Blog:
Coding Standard Analysis using PHP_CodeSniffer
March 17, 2009 @ 07:57:47

Over on the Blue Parabola blog Matthew Turland recently posted a new tutorial on using the PHP_CodeSniffer PEAR package to check out how well your code adheres to the coding standard of your choice.

For the sake of consistency [on a client project], the development team had stuff with the coding standard used by the framework itself. However, evaluating the code manually is tedious and time-consuming. There's a solution to this type of problem: the PHP_CodeSniffer package from PEAR, which builds an infrastructure around tokenizers for PHP, CSS, and JavaScript and utilities to detect coding standard violations within code in any of those languages.

He includes an example token output (the codesniffer package is based on the Tokenizer) from a script and walks you through the initial setup of the package, how to create "sniffs" for the code you want to analyze and how to run them using the popular unit testing tool PHPUnit.

0 comments voice your opinion now!
phpcodesniffer sniff coding standard kohana analyze pear phpunit


David Coallier's Blog:
PHP GSoC 2009 is coming!
March 10, 2009 @ 09:33:22

Its about that time again and David Coallier has pointed it out - the Google Summer of Code is not far off and PHP will be right in the middle again!

Once again we are happy to announce that PHP will be taking part in the Google Summer of Code. Already with a list of more than interesting and intelligent ideas, we are looking to get more ideas. This of course means that PEAR Developers, PECL Developers and PHP(Core) Developers now have to cook some ideas up and submit them to the GSoC 2009 PHP Wiki so we can have more good ideas for students to apply to!

There's already a few things about this year's GSoC that have been posted - the page on the PHP.net wiki, a mailing list announcement on the PEAR dev list and, of course, the official GSoC page.

0 comments voice your opinion now!
google summerofcode gsoc09 pear pecl core developer wiki


Doctrine Blog:
Doctrine 1.0.8 and 1.1.0-RC2 Released
March 03, 2009 @ 10:24:36

Guilherme Blanco passed along a note about the latest releases from the Doctrine project, Doctrine 1.0.8 and 1.1.0-RC2:

Today I am happy to tell you that we have two new versions of Doctrine available for you to use. The first is the monthly maintenance release for Doctrine 1.0 and the second is another release candidate for the newest major version of Doctrine, 1.1. As always you can grab them from the downloads page.

Updates in these two versions include a few backported fixes from 1.1, updates to the Doctrine_Query::count() method for optimization, and several fixes in the Release Candidate in preparation for the next release. You can see the full Changelogs here: 1.0.8 and 1.1.0-RC2.

1 comment voice your opinion now!
doctrine release maintenance orm object relational mapper layer


Asvin Balloo's Blog:
10 useful PHP PEAR packages
March 02, 2009 @ 07:58:22

In a new post to his blog today Asvin Balloo has posted ten useful PEAR packages (just some out of a long list) that can help you with everything from database access to creating Excel spreadsheets.

His list of ten is made up of:

  • MDB2 (database access)
  • Text_CAPTCHA
  • Log
  • LiveUser
  • Translation2
  • Validate
  • Spreadsheet_Excel_Writer
  • Net_GeoIP
  • File_Archive
  • XML_Serializer

For most of them he also includes links to tutorials showing how to use them and with more info about them.

0 comments voice your opinion now!
pear package list useful database logging validate captcha


Kevin van Zonneveld's Blog:
7 Steps to better PEAR documentation
February 23, 2009 @ 11:11:55

Kevin van Zonneveld has posted seven steps that you can follow to help the documentation for your PEAR class come out better and be more useful in the end.

If you've written a PEAR package, it's probably a good idea to submit some end user documentation. Here's how to do it.

He explains what it is (XML in CVS, easily convertible with phpd) and how the process flows - save the current docs, add your own, build locally and submit to CVS. Here's his tips to help things go smoothly/turn out better:

  • Gather the prerequisites
  • Save current documentation
  • Try building the docs
  • Write your own XML docs
  • ReBuild peardoc
  • Commit your XML
  • (There is no seventh step - you're done!)
0 comments voice your opinion now!
better pear documentation steps xml cvs phpd build submit package


Juozas Kaziukenas' Blog:
Creating Excel documents on the fly
February 17, 2009 @ 12:55:45

Juozas Kaziukenas has a new blog post that looks at creating Excel documents on the fly with the Spreadsheet_Excel_Writer PEAR package.

In one of my projects, we need to send emails to our suppliers with new orders as Excel spreadsheets. We used to do it by hand, but when you have 10 suppliers and you make 200 products orders per week, after some time you are just tired of creating Excel spreadsheets, mailing them and so on. So, my task was to implement automatic spreadsheets creation with PHP.

His example creates a basic file with a set of "Items", some formatting and a set of code/title items to fill out each row. The end result can then be packaged up and sent out as a complete Excel XLS file.

0 comments voice your opinion now!
excel document create tutorial spreadsheelexcelwriter pear package spreadsheet


Greg Beaver's Blog:
Pyrus, PEAR2 and web code coverage report for phpt-based tests
February 17, 2009 @ 09:31:57

Greg Beaver has posted an update one some of the things he's been working on in the realm of his projects - Pyrus, PEAR2 and code coverage for phpt-based tests.

In any case, now that work on ext/phar has shifted primarily to maintenance mode, and namespaces are finally ancient history, I've shifted all of my coding energy to getting Pyrus, PEAR's next-generation installer, ready to ship.

Pyrus is the PEAR installer as rewritten for the next major PHP release (5.3) and uses a lot of the new features it offers (including full archive support, SQLite 3, combined configuration files and several new developer-centric additions). He also includes a sample bit of code that he worked up to run code coverage reports against the PEAR packages. He includes links to three different examples of the report's output.

0 comments voice your opinion now!
pyrus pear codecoverage unittest phpt test installer pear2


Chuck Burgess' Blog:
Configuring Builds for PEAR Packages in phpUnderControl
February 09, 2009 @ 12:06:01

Chuck Burgess has posted a guide for developers out there wanting to get their PEAR packages working with phpUnderControl for builds.

there were some things that I had to discover via trial-and-error with regard to the build files, though possibly they are covered in other pUC docs that I didn't check. The "Getting Started" build example is based on a project sandbox pulling code from a Subversion repository, whereas all my PEAR code comes from CVS.

He talks about his config.xml file (how it turned out that the basic one was all he really needed) and configuring the build.xml to run the tests from the correct location. He also mentions some future ideas like making the builds run the install/upgrade commands before running the tests.

0 comments voice your opinion now!
phpundercontrol pear package subversion cvs configxml buildxml


Zend Developer Zone:
Building AutoComplete Inputs with PHP, PEAR, Dojo and YUI
February 04, 2009 @ 15:29:25

The Zend Developer Zone has a new tutorial posted (from Vikram Vaswani) about adding in an auto-complete input field to your site. His example uses a PEAR class, Dojo and some components of the YUI libraries.

Fortunately, modern programming toolkits like Dojo provide ready-made widgets that have the necessary client-side functions for autocomplete. Add a little bit of server-side glue, in the form of a PHP script that talks to a database to generate valid suggestions, and enabling this functionality in a Web application now becomes a matter of hours, rather than days. In this article, I'll show you how to do this using three different libraries: PEAR HTML_QuickForm, YUI, and Dojo. Come on in, and find out more!

He shows how to combine Dojo, YUI and the HTML_QuickForm PEAR package to create a field that, based on what they enter into the input field, searches a database to find values in that table.

0 comments voice your opinion now!
autocomplete input field tutorial yui dojo pear htmlquickform


Zend Developer Zone:
Building AJAX Applications with PHP and HTML_AJAX
January 27, 2009 @ 11:19:28

In a recent post to the Zend Developer Zone Vikram Vaswani takes a look at using AJAX quickly and easily in your applications with the help of the HTML_AJAX PEAR package.

Well, PHP is commonly used on the server end of the connection, to handle AJAX requests and send back responses. But that isn't all it can do - with a little PEAR package called HTML_AJAX, you can use PHP to significantly simplify the work that goes into building and deploying an AJAX application. That's where this article comes in. Over the next few pages, I'm going to give you a quick run-down on the PEAR HTML_AJAX class, together with a few examples of how you can use it to AJAX-ify various Web applications.

He goes through the whole process - installing the package and five example scripts to show it in action:

  • Pulling from a simple database table of book and author information
  • Calculating simple interest
  • Creating a simple calendar
  • Evaluating an inputted number
  • Simple login validation
0 comments voice your opinion now!
ajax application htmlajax pear package tutorial


Jani Hartikainen's Blog:
Optimizing Zend Framework and Doctrine applications
January 27, 2009 @ 09:30:37

In a quick post Jani Hartikainen take a look at some optimization tricks you can do to help get the most out of your Zend Framework/Doctrine application.

I decided to try profiling my quiz application to see if I could speed it up. Not surprisingly, biggest performance penalties came from loading classes and Doctrine's ORM magic. [...] As you may have heard, optimizing without profiling first is a bad idea, as you may think something is slow when something completely different would be better to optimize.

some of his suggestions include:

  • Removing all require_once calls from the Zend Framework library
  • Change the include_once_override setting if you're using APC
  • Using the query cache in Doctrine
  • Using the Doctrine_Table find functions rather than the Doctrine_Query objects
0 comments voice your opinion now!
zendframework optimize profile xdebug doctrine


Symfony Blog:
The "Practical symfony" book is now also available for Doctrine
January 21, 2009 @ 11:14:51

The symfony blog has posted an update on the status of their "Practical symfony" book - the Doctrine version has officially been released!

Last week, we released the "Practical symfony" paper book (380 pages). The "Practical symfony" book is based on the Jobeet tutorial, and is the best book to read to get you started on symfony 1.2. It describes everything you need to know to develop professional web applications with the symfony framework.

As for the Propel edition, we have worked hard to update the Doctrine edition as fast as possible. The Doctrine version is now up to date and thanks to Jon work, you can even enjoy a tagged repository for each day of the tutorial.

The book works through the Jobeet tutorial series they posted at the end of 2008 to create a complete job posting website with the symfony framework.

0 comments voice your opinion now!
symfony framework jobeet tutorial propel doctrine book


Symfony Blog:
The "Practical symfony" book is now on sale
January 20, 2009 @ 12:07:08

On the Symfony blog today there's a new post from Fabien Potencier about a new book that's just been released and might be of interest to those wanting to get into the framework - Practical Symfony.

Two years after the publishing of "The Definitive Guide to symfony" book, I am happy to announce that the Jobeet tutorial is now available as a printed book: "Practical symfony". During the last two weeks, I have updated and enhanced the Jobeet tutorial based on the feedback from the community. I have also updated the screenshots to reflect the new Jobeet design. The "Practical symfony" book is the printed version of this tutorial and as such covers the symfony 1.2 version.

The Jobeet tutorial was their 2008 "advent" piece that created a job posting website from scratch with each day focusing on a different aspect of the application. There are two versions of the book (Propel and Doctrine) but for now, only the Propel version can be purchased over on lulu.com.

0 comments voice your opinion now!
practical symfony framework tutorial book propel doctrine


WebResourcesDepot.com:
19 Promising PHP Template Engines
January 16, 2009 @ 12:08:20

Looking for a good templating engine for your next PHP application? Be sure to check out this great list on the WebResourcesDepot site for a pretty comprehensive list.

PHP template engines are used widely to seperate the code & the layout. PHP makes a website easier to maintain/update & creates a better development environment by enabling developers & designers to work together easier. It sure has some drawbacks which is generally the performance (most libraries offer great solutions there) & need to learn a new syntax (not always).

Some of the engines included in the list are:

1 comment voice your opinion now!
template engine list smarty savant pear dwoo


Kevin van Zonneveld's Blog:
Create daemons in PHP
January 12, 2009 @ 08:47:31

In a new post to his blog Kevin van Zonneveld talks about making daemons, backend scripts that run independent of a web server.

Everyone knows PHP can be used to create websites. But it can also be used to create desktop applications and commandline tools. And now with a class called System_Daemon, you can even create daemons using nothing but PHP. And did I mention it was easy?

He starts with a definition ("a linux program that runs in the background") and why PHP makes a good language choice for creating them. His example uses the System_Daemon PEAR class to do most of the heavy lifting. To use it, you only need to include it at the top of the script and make two calls to the setOption and start methods to have the rest of the code all set to run as a daemon.

The example code sets up a daemon complete with support for command-line arguments and the ability to be run from init.d on the local system.

1 comment voice your opinion now!
tutorial daemon shell script systemdaemon pear package


Ralph Schinder's Blog:
The Semi-Official Zend Framework Pear Channel
January 08, 2009 @ 12:57:44

Ralph Schinder has posted about a new development in the world of Zend Framwork distribution - a PEAR channel.

For the past few months, the ZF team has been playing with the idea of releasing ZF from a PEAR channel. Over the past 2 years, we have seen a few channels distributing ZF that have pop up here and there.. so that lead us to believe there is an itch that needs scratching. The compelling reason against a PEAR channel is that, with ZF, there is nothing to "install". Just pop ZF in your include_path and off you go.

With the introduction of the next release (1.8) and the Zend_Tool component that comes with it, the framework is graduating from a "component library" into a more holistic framework with a more advanced distribution system. For those interested, he also includes the details of the channel (from pear.zfcampus.org) and the organizational plan of how the channel is laid out.

0 comments voice your opinion now!
pear channel zendframework official component library zendtool install distribute


Jani Hartikainen's Blog:
Decoupling models from the database Data Access Object pattern in PHP
January 05, 2009 @ 21:22:26

In this new post to his blog Jani Hartikainen looks at implementing the Data Access Object pattern in your PHP applications.

The advantage of this is that you can easily implement different methods to persist objects without having to rewrite parts of your code. I'm again going to use the programming language quiz game I wrote as an example. Since I initially wrote it to use Doctrine ORM directly, and both the old and new code are available, you can easily see how the code was improved.

He starts off with a look at the pattern itself (including a diagram of how an example would work with Doctrine) followed by the creation of the models for his Questions example. Add in the factory to create an instance and an exmaple of it in action and you're there.

0 comments voice your opinion now!
decouple model data access object designpattern tutorial doctrine


GitHub Support Forums:
PEAR channel (like github gems, but for PHP)
January 01, 2009 @ 21:40:13

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.

0 comments voice your opinion now!
pear channel github gems gpl extension package community


Till's Blog:
PEAR & Plesk
December 10, 2008 @ 09:34:15

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.

0 comments voice your opinion now!
pear plesk install troubleshoot package controlpanel ssh


DevShed:
Logging in PHP Applications
December 08, 2008 @ 13:52:10

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).

0 comments voice your opinion now!
log tutorial pear trace audit history priority timestamp location


Matthew Turland's Blog:
Benchmarking PHP HTTP Clients
November 24, 2008 @ 07:56:30

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.

0 comments voice your opinion now!
benchmark http client pecl pear zendframework streams curl


Symfony Blog:
New in symfony 1.2 Doctrine goodies
November 07, 2008 @ 12:33:15

The symfony blog has a new post spotlighting one of the new features of their 1.2 release - updates to its Doctrine functionality.

A lot of awesome stuff has been added recently to the next major symfony release, 1.2. Fabien has worked very hard to add without a doubt the most sophisticated features of any PHP framework that exists today. Not only are they nice features but he has implemented them in a OO way so that it is easy for me to implement the same features with another ORM, Doctrine. All this is done with very little work by me. So, give a big thanks to him if you enjoy this.

Included in the post is a real-world example showing how to use the symfony command line to build out an environment and create connections to the articles, categories and authors tables.

0 comments voice your opinion now!
doctrine symfony framework build feature example


Developer.com:
Sending Email with PHP
November 05, 2008 @ 07:58:47

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.

1 comment voice your opinion now!
send email mail pear zendmail zendframework tutorial


Sameer's Blog:
Simple Pagination in PHP tutorial
October 30, 2008 @ 10:29:02

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.

2 comments voice your opinion now!
pagination pear package pager install tutorial css


ProDevTips.com:
PHP Doctrine - adding automatic, simple CRUD
October 28, 2008 @ 11:14:27

The ProDevTips site continues their look at using Doctrine in PHP with this latest article in the series that adds in a simple, automatic CRUD system to the application.

I just found myself wishing for automatic CRUD, for quick and simple administrative tasks, as it turned out a very easy thing to add.

They create a model for their Company table and a new controller to handle the admin requests. Throw in some fetching functions, a bit of form handling and a bit of Smarty login and you have a simple admin form that automatically creates itself based on the columns in the table.

25 comments voice your opinion now!
doctrine crud simple tutorial controller model smarty


Jani Hartikainen's Blog:
ModelForm developments
October 20, 2008 @ 11:19:45

Jani Hartikainen talks about some updates he's made to the ModelForm class for the Zend Framework and how its been reworked a bit to take advantage of Zend_Db_Table.

I've been reworking the ModelForm class for ZF a bit. Earlier this year, I discussed porting it to use Zend_Db_Table with Matthew Weier O'Phinney, for using it with Zend Framework. I initially had done some checking on Zend_Db_Table, and some small code changes to modify the class to use it instead of Doctrine, but I ran into some issues. Now, I've had some time to think about it, I've reworked the class slightly and added basic Zend_Db_Table support, too...

He talks about the two sides - the issues that came up (including relation support and differences between Zend_Db_Table and Doctrine) and how they were overcome (creating an adapter setup to accommodate for the relations issues).

0 comments voice your opinion now!
modelform zendframework development relations doctrine


Christian Weiske's Blog:
PEARhd steaming on
October 16, 2008 @ 08:49:02

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!
0 comments voice your opinion now!
pear documentation docbook phd render xml xsl


Symfony Blog:
Doctrine gains symfony citizenship in 1.2
September 16, 2008 @ 09:48:56

As announced on the symfony blog today, Doctrine now has "citizenship" in the framework with the release of the sfDoctrinePlugin:

Today, Doctrine gained its citizenship in symfony 1.2. The sfDoctrinePlugin was linked via externals and is now officially bundled with symfony. If you've been around for a while, you'll know that this was highly anticipated and is a long time coming. To celebrate, I'll give a short little tutorial on how you can get started using Doctrine in symfony. Read below if you're interested.

The post gives you a brief introduction to how to load and use the Doctrine plugin, including how to build out an application automatically via the symfony binary.

0 comments voice your opinion now!
symfony framework doctrine plugin tutorial


Devollo.com:
Data Filtering Using PHP's Filter Functions - Part one
September 15, 2008 @ 09:33:33

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.

0 comments voice your opinion now!
data filter extension pear tutorial example


DevShed:
PHP Networking
September 09, 2008 @ 12:09:12

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.

They look at the fopen, gethostbyname, gethostbynamel, getservbyport and the Net_Whois PEAR package (among others).

0 comments voice your opinion now!
tutorial network socket dns netwhois pear


ProDevTips.com:
Pagination with PHP Doctrine
September 04, 2008 @ 09:30:06

The ProDevTips blog continues their series on using Doctrine in a sample application in this new part, a look at paginating the results from your database query.

Things are starting to become more and more feature complete. Let's look at how to implement general search and pagination.

They define the search to perform ($searchConf) and the pagination parameters ($pageConf) and apply them to their current Doctrine setup applying a simple layout to make the numbered links for switching between pages. They also define the search() method that pulls the results from the table to push into the pagination component.

0 comments voice your opinion now!
pagination doctrine configure search template tutorial


Jani Hartikainen's Blog:
Understanding Doctrine's NestedSet feature
September 02, 2008 @ 10:29:56

On his CodeUtopia blog Jani Hartikainen gives an inside look at a feature of Doctrine, nested sets.

The Doctrine library comes with a feature called nested set, which makes saving trees in a database easy. However, it's quite easy to accidentally cause a lot of extra unneeded queries if not being careful. Here are some pointers to keep in mind while working with the nested set, and some example queries to make understanding it easier.

He gives an example, showing how to get rows from the database - parent and child - and some optimization tips to keep things light. There's also some pros and cons included for doing it either way (the standard fetching or using the more optimized versions).

2 comments voice your opinion now!
doctrine nestedset feature fetch database row parent child


ProDevTips.com:
File Uploads with PHP Doctrine
September 01, 2008 @ 10:37:50

The ProDevTips blog has posted the fifth part of their look at using Doctrine with PHP. This time they focus on file uploads.

It's time to take a look at how file uploads can be integrated into the Doctrine validation and CRUD process. We will have a product in the form of a digital download as an example, it will have a screenshot image that can be maximum 250 pixels wide and high. The download itself will be a zipped file.

They set up their table definitions first and set up a few validation functions (update, insert and for the file data) to work on top of that. Custom upload/uploadImage and save methods handle the user's submission while a simple delete method makes removing images easy.

0 comments voice your opinion now!
file upload doctrine tutorial database table insert image


ProDevTips.com:
CRUD with PHP Doctrine
August 25, 2008 @ 11:19:37

In a fourth part of their series looking at using Doctrine in PHP, the ProDevTips blog moves on to implementing it in a typical CRUD interface.

They create the links between the tables (two hasOne relationships), a search() method to find the destinations for a user, a sorting method to multisort based on the subkeys of the value passed in and the methods for updating the information already in the database.

That's it for now, feel free to download this tiny Smarty and Doctrine framework. Note that for this to work you have to put Smarty and Doctrine in the lib folder. There is a login interface involved, just click submit there without entering anything. There is also an SQL file in the trip_selector folder if you want to try this out with some test data (same as in the picture above).
0 comments voice your opinion now!
doctrine crud relationship update create retrieve delete


Symfony Blog:
Propel 1.3, Doctrine 1.0, and symfony 1.2
August 21, 2008 @ 11:18:52

In this new post to the symfony blog, there's an update on the framework's latest version, Propel integration and the addition of the sfDoctrinePlugin.

After more that two years of development, the Propel team has released Propel 1.3 yesterday. This is a great achievement as Propel 1.3 sports a lot a new exciting features.

These features include PDO integration, object instance pooling, improvements to the date handling features and the addition of more default values for database schemas. There's also the updates with Doctrine:

As announced in the symfony 1.2 roadmap, Doctrine 1.0 will be officially supported and the sfDoctrinePlugin will be bundled with symfony 1.2. Doctrine 1.0 beta1 has been released two weeks ago and the Doctrine team will release Doctrine 1.0 final on September 1st.
0 comments voice your opinion now!
doctrine symfony propel integration release features beta


Stefan Koopmanschap's Blog:
DbFinderPlugin The ORM isn't important anymore
August 14, 2008 @ 08:47:12

In this new post to his blog Stefan Koopmanschap looks at a plugin for the symfony framework that has him impressed.

Using this plugin, it is not necessary anymore to really care about which ORM you pick for your project. It's the thought behind symfony 1.1 taken into the symfony ORM-selection.

He points to the DbFinderPlugin as an alternative to rewriting up the ORM code for your application by hand (or in something like Propel or Doctrine). It makes switching between ORM layers simple - just a configuration change to point to the new system.

0 comments voice your opinion now!
orm dbfinderplugin symfony propel doctrine


ProDevTips.com:
Extending PHP Doctrine Record - Check Box Groups
August 12, 2008 @ 13:26:36

In the third part of the series dealing with using Doctrine in your PHP applications, ProDevTips has this third part looking at a method for extending the tool's current functionality.

I simply knew we would need the extension capability that the Mdl class allows for sooner or later, I didn't expect it to be this soon though. The main problem here is saving a many to many relationship straight to the database from the $_POST array, to do that we can extend Doctrine Record with a new function I have named fromArrayExt which adds something extra to the normal fromArray method.

He shows how to extend the classes to create custom handlers for a grouping of checkboxes. The new code automatically handles their submitted values and pushes them directly into the database (with a simple save() call).

0 comments voice your opinion now!
doctrine record tutorial checkbox extend group


Helgi's Blog:
PEAR installer updating its PHP deps
August 12, 2008 @ 12:04:26

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.

0 comments voice your opinion now!
pear installer dependencies php4 php5 support version


ProDevTips.com:
Table of contents for Working with Doctrine
August 08, 2008 @ 15:10:03

Henrik has posted the second part of his look at using Doctrine, this time in combining it with Smarty. (Check out part one here).

We are creating an MVC setup where M is Doctrine, V is Smarty and C is our own stuff we do here. The Zend Framework has been reduced to just another component library for me now, I will pick goodies when I need them.

He shows how to be "empowered, not stifled" by the framework and to combine the two technologies in a flexible, lightweight platform. His example is a simple signup form that, on submit, saves the information to the database via the Doctrine layer.

0 comments voice your opinion now!
zendframework smarty doctrine framework mvc tutorial


Dhiraj Patra's Blog:
Caching PHP Programs with PEAR
August 07, 2008 @ 12:58:09

In a recent post to his blog Dhiraj Patra looks at the caching functionality that PEAR has to offer via the PEAR Cache package.

Caching is currently a hot topic in the PHP world. Because PHP produces dynamic web pages, scripts must be run and results must be calculated each time a web page is requested, regardless if the results are the same each time. In addition, PHP compiles the script every time it is requested. [...] PEAR's Cache package offers a framework for the caching of dynamic content, database queries, and PHP function calls.

He talks a bit about what kind of methods are included with the package and shows examples of how it works for function call caching, caching the output from the script execution and how to implement your own custom caching extension of the main code to make it even more flexible.

3 comments voice your opinion now!
pear cache tutorial function call output custom handler


ProDevTips.com:
Doctrine for dummies
August 05, 2008 @ 12:55:52

Henrik waves goodbye to the Zend_Db component of the Zend Framework in this new post to the ProDevTips blog - his new favorite is Doctrine.

It was long overdue but finally I've taken a look at Doctrine. And I'm blown away, bye bye Zend DB. [...] It's time to try and convey how awesome I think Doctrine is.

His example sets up a table definition and defines the associations between the columns for a "members" table. He defines a "city" table too and shows how Doctrine can easily combine the two and make selecting from and inserting into the tables simple.

0 comments voice your opinion now!
doctrine database abstraction layer zenddb


Jacques Marneweck's Blog:
Grab PEAR via CVS is you need it
August 04, 2008 @ 09:34:40

Jacques Marneweck has a quick reminder for those trying to get the latest PEAR installer - you can always get it from CVS.

Quick note that the PEAR installer is missing (go-pear.org has expired and has been snapped up by some cybersquatters) and http://pear.php.net/go-pear renders a 404. So the current solution is to grab the go-pear install from CVS.

A quick curl call to a url on the cvs.php.net site (in the /pearweb directory) is all it takes to grab the latest. The page it's pulling is the source for the go-pear.php installer that can be run either from a web browser or from the command line (with a PHP binary).

0 comments voice your opinion now!
pear cvs gopear installer curl pearweb


Chuck Burgess' Blog:
Next Bug Triage Days for PEAR
August 01, 2008 @ 15:27:59

Chuck Burgess has a quick post pointing out the next "PEAR triage days":

PEAR's next Bug Triage days are this weekend: Saturday 4 PM - 9 PM UTC and Sunday 4 PM - 10 PM UTC.

You can find the schedule and more information about joining in at this page on the PEAR wiki. You can find others working on the triage on the EFNet's IRC network in the #pear-bugs channel.

0 comments voice your opinion now!
pear bug triage day weekend wiki efnet irc pearbugs


Amir Saied's Blog:
PEAR bash completion
July 28, 2008 @ 12:08:29

Amir Saied recently posted a handy little tool for the PEAR users out there - a bash script that handles tab completion for you.

Lately I've been playing alot with the PEAR CLI. The one annoying thing I noticed the most was its lack of tab completion that I'm used to from the shell. It turns out that this feature is very easy to add, in the bash at least.

It will finish off the PEAR commands for you and expand out the PEAR package names and discovered channels when it finds a match. You can download the package here.

0 comments voice your opinion now!
pear bash commandline completion tab package name channel


Asvin Balloo's Blog:
Geolocate your visitors with PHP (part 1)
July 21, 2008 @ 08:49:29

On his blog today Asvin Balloo has posted the first part of his look at his method for geolocating the visitors to your website using the PEAR GeoIP package and the MaxMind GeoLite Country information.

In this first part, he just makes sure that you have what you need installed before really getting started. Brief installation instructions are provided and example code is included to make sure things are up and working correctly (a lookup for whatever IP you're coming from).

It uses the lookupCountryName method to translate the information based on the MaxMind data.

0 comments voice your opinion now!
geolocate visitor maxmind pear geoip geolite tutorial


PEAR Blog:
PEAR Group Meeting Minutes 2008-07-13
July 17, 2008 @ 14:08:11

A new entry has been posted to the PEAR blog with the latest minutes for the group's July 13th meeting.

Some highlights from the meeting include new/upcoming RFCs for package naming schemes, exception handling in PHP 5.3, and a vote on extending the current PEAR2 Policies. Heavy stuff, check it out!

You can check out the full notes here on the PEAR portion of the PHP.net wiki.

0 comments voice your opinion now!
pear group meeting minutes wiki php5 naming exception pear2


Francois Zeninotto's Blog:
Comparing Propel, Doctrine and sfPropelFinder
July 09, 2008 @ 10:24:59

Francois Zeninotto has posted a comparison of three different ORM (Object Relational Mapping) layers for PHP - Propel, Doctrine and sfPropelFinder (the last being a plugin of the symfony framework).

When it comes to ORMs, it's all a matter of preference. Is it, really? This post compares side-by-side the code required to perform some simple operations with three OO database requesting API. The purpose is to demonstrate that productivity, and not only style, can vary a lot depending on the ORM you choose.

He's worked up a long list of examples including methods to:

  • Retrieving an article by its primary key
  • Retrieving the latest 5 articles
  • Retrieving articles based on a complex AND/OR clause
  • Retrieving articles authored by people of a certain group
  • Retrieving an article and its category by the article primary key
  • Retrieving articles and hydrating their author object and the author group

Each one comes with their own (usually simple) code. His conclusions point out different "bests" of each - like sfPropelFinder being the "most magic" and that some of the limits of Propel are very frustrating.

0 comments voice your opinion now!
compare orm layer doctrine propel sfpropelfinder symfony framework


SaniSoft Blog:
Code sniffs for CakePHP and then some more
July 04, 2008 @ 09:32:00

On the SaniSoft blog Tarique Sani has posted about (and made available for download) some code sniffs for the CakePHP framework. Some problems arose with some of the naming that the framework uses, but with some "tinkering around"...

[It became] apparent that I had to have my own set of Cake sniffs to manage this but a separate standard just for this seemed an over kill and the simplicity of code made it kind of fun to add more standards which I liked but were in different set of sniffs.

You can grab the whole list of sniffs from their downloads. They implemented them as a pre-commit hook on their SVN server even so that developers could not violate the coding standards when they submit their code.

0 comments voice your opinion now!
sanisoft sniff pear package phpcodesniffer svn commit hook cakephp


Padraic Brady's Blog:
Google roll out OAuth Authorisation to all Google Data APIs
July 01, 2008 @ 14:38:30

Padraic Brady has posted about a new inclusion that Google has announced will be included in the authentication methods for their APIs - OAuth.

The Google Data API support comes with a few gotchas. Its documentation show a clear preference for using GET instead of POST, though the Google OAuth server does appear to natively support POST requests for everything with the exception that it has a small bug which interprets an empty POST request body as a sort of phantom empty parameter.

He notes that the library he's been working on (and submitted to both the Zend Framework and PEAR) it up to the 0.0.3 release including functionality marked as beta for the Consumer portion.

0 comments voice your opinion now!
google oauth api data pear zendframework library consumer


Jonathan Street's Blog:
Windows Live Contacts coming to PEAR
June 30, 2008 @ 08:41:02

In a new entry to his blog, Jonathan Street talks about a new wrapper class he's built up around the Windows Live Contacts service.

It was a shame really as it was a really exciting project with Microsoft leading the way in the area. It's been only recently that Google and Yahoo have caught up and released their own APIs for accessing their users data. [...] With the possibility of actually using the code myself creeping up on the horizon I decided to put the time in to write wrappers for PHP. It can be broken down into two components.

These two components are the delegated authentication, used to get permission from the user to grab the data, and the actual interface to the Windows Live Contacts data. Both packages have been submitted to PEAR.

1 comment voice your opinion now!
windowslivecontacts pear package authentication


DevX.com:
Generating Reports and Statistics in PHP
June 27, 2008 @ 10:26:31

The DevX site has posted a new tutorial talking about their method for creating reports and generating statistics based off of data from your PHP application.

Statistics and reports analyze the change over time of any kind of phenomena. [...] For the software industry, statistics and reports provide both an ongoing challenge and an ongoing market. At present, programming languages such as PHP and Java come with built-in packages for developing applications around statistical problems.

They use two PEAR packages for the statistics - Text_Statistics and XML_Statistics to pull in different kinds of data and extract results from it. The next step is to make a meaningful report out of these numbers - that's where PHPReports comes in. It's a simple tool that makes simple reports for you that can then be styled with CSS however you'd like.

0 comments voice your opinion now!
tutorial report statistic pear package textstatistics xmlstatistics phpreports


Padraic Brady's Blog:
PEAREncryption and Zend_Crypt Revisited
June 17, 2008 @ 15:32:50

Padraic Brady has a new post today mentioning both the PEAR::Encryption package and the Zend_Crypt component of the Zend Framework.

It's been a while since I did some active ZF/PEAR component development. It's been one of those 6 month periods where time to commit was a rarity for a few reasons. So now that I'm back on the road, where to?

He sets his sights on the Zend_Crypt component and details some of the encryption methods it contains - HMAC, the Diffie-Hellman Key Agreement Protocol, a hashing wrapper and proposed support for a RSA public key cryptography. He mentions that a lot of this support is already in a beta package for PEAR.

0 comments voice your opinion now!
pear encryption package component zendframework zendcrypt


David Coaller's Blog:
To a great upcoming year
June 17, 2008 @ 11:17:38

David Coallier has posted both a congratulations and thank you about the PEAR group elections. Congrats to those who were voted in including Joshua Eichorn, Christian Weiske and Travis Swicegood and his many thanks for being voted in as President:

My place as I consider it and as Greg mentioned on the mailing list yesterday is much more "ambassadorial" than "presidential" and being the PEAR ambassador around the world, I'll be glad to discuss, argue, improve the general idea of PEAR to anyone. I'll also be happy to discuss PEAR2 if anyone is interested but first and foremost I'll be happy to help our new PEAR Group (which I am pretty sure won't need help ) and the community.

You can find out more about the results of this year's elections on the PEAR election pages from pear.php.net.

0 comments voice your opinion now!
election pear president amabassador group


Daniel O'Connor's Blog:
How to customise PHP_CodeSniffer
June 13, 2008 @ 11:11:36

Daniel O'Connor has posted a quick guide to customizing your installation of the PHP_CodeSniffer PEAR package to match the coding standard you'd like.

PHP_CodeSniffer is a PEAR package which detects potential coding problems and enforces your style guide. The default is the PEAR coding standard, but you can easily change that.

His method requires the creation of a custom "FooCodingStandard.php" (named whatever you'd like, of course) that contains a class/method defining the "sniffs" you'd like to use for your standard. Use "pfm" to make it into a package and install it to your system - you'll be all set.

0 comments voice your opinion now!
customize pear package phpcodesniffer sniff standard


Zend Developer Zone:
Getting Started with OpenID and PHP
June 05, 2008 @ 10:27:20

Vikram Vaswani has a new tutorial posted to the Zend Developer Zone today about integrating PHP with an OpenID system via a few helpful packages.

OpenID, a free, open-source framework for "single sign-on" across different Web sites and applications. The even better news? There already exist a bunch of PHP widgets that allow developers to easily integrate OpenID into a PHP application, and this article is going to show you how to use them. So what are you waiting for? Flip the page, and let's get going!

For those not familiar with the authentication method, he defines OpenID and shows how it can help with the "too many passwords, too many accounts" problem many users face. He uses the PHP OpenID Library and the Authentication::OpenID_Consumer PEAR package (as well as several other PEAR packages to help with the connections and message formatting). He builds two simple forms to use the service - one to authenticate a user and another to create a new account.

0 comments voice your opinion now!
openid tutorial connect authenticate myopenid pear package


PEAR Blog:
Election time 2008
June 05, 2008 @ 08:49:44

It's that time of year again - time to gather the votes for this year's PEAR elections for the role of President and others to be inducted into the group.

As every year it is the time of the election for the PEAR Group and PEAR President for the year 2008 and 2009. If you haven't casted your vote just yet, NOW is the perfect time to do it so go to the election page and place your vote.

You can find out more about the elections from the page for the Presidental election and for the Group elections. You must be a PEAR developer in order to vote.

0 comments voice your opinion now!
pear election vote president group induct developer


Ken Guest's Blog:
Book review PHP Objects, Patterns and Practice (second edition)
June 04, 2008 @ 07:58:39

Ken Guest has posted a review of yet another PHP-related book from APress publishing, "PHP Objects, Patterns and Practice (Second Edition)".

While being an easy read, this is a well written, serious book and is aimed squarely at enterprise-level developers and software engineers who make their living through the development and architecture of solutions developed in PHP.

He breaks down the book into the three sections its title mentions - working with objects, design patterns and a healthy dose of PEAR, phpDocumentor, PHPUnit, CVS and phing.

4 comments voice your opinion now!
book review apress object pattern pear phpdocumentor cvs phpunit phing


Ken Guest's Blog:
Validation in Depth - a retort to using just regular expressions
May 27, 2008 @ 07:58:54

Ken Guest, in a response to another post from a different blogger, has posted some of his own validation replacements for the regular expression method the other blogger chose.

I've noticed that Richard Heyes, who professes himself to be a php guru, deleted my comment on his "Some common regular expressions" posting which simply pointed out his expressions didn't quite do the job and suggested a few PEAR packages that should be used instead of the expressions that he proffered

His examples have the benefit of what he calls "defense in depth" - the functionality to catch a bit more than just a regular expression can alone. His examples include PEAR_Validate for email addresses, Net_CheckIP2 for IP addresses and the Validate_UK package for the sort code and telephone numbers.

0 comments voice your opinion now!
pear package regular expression validate email telephone ipaddress domain


Gennady Feldman's Blog:
Pear/Pecl website improvement ideas and suggestions
May 26, 2008 @ 09:38:41

Gennady Feldman has posted two comments/suggestions about things he thinks could be done to improve the PEAR and PECL websites:

So I attended the PEAR2 presentation and had a chance to bug the guys behind PEAR/PECL. There's definitely exciting stuff happening and they are pushing forward with many exciting ideas.

His suggestions include updates to documentation, crrection broken parts of the API and a "Package News" feature with the ability to leave comments on them.

He's also posted another suggestion - the ability of the authors of the project to provide other links besides the ones just for the project (external documentation, tutorials, etc)

0 comments voice your opinion now!
pear pecl website improve meeting suggestion


Matthew Turland's Blog:
Unit Tests and Code Coverage with PHPT
May 26, 2008 @ 07:54:33

Matthew Turland has posted about some of his experience with PHPT tests with PHPUnit.

Recently, I wrote some for a project and realized that I wasn't aware of how to generate code coverage reports. Many thanks to the very helpful patrons in the #pear channel on EFNet for helping me to get this working.

He show his setup process (on Kubuntu) - grabbing the PEAR package, installing it and how to get a runner script to integrate the PHPT testing into PHPUnit.

0 comments voice your opinion now!
unittest phpunit phpt kubuntu pear package codecoverage


Ken Guest's Blog:
The Date_Holidays package, a pack of splitters and a pear tree
May 09, 2008 @ 12:56:39

In a new post to his blog today, Ken Guest talks about the split that's been made in a PEAR package for calculating the dates of holidays (Date_Holidays) for localization reasons.

We decided that this one package should be split into subpackages: one subpackage per region/country. Some advantages of this approach are that each driver / filter / subpackage gets it's own stability and version number - we wouldn't have to keep increasing the version number of Date_Holidays each time a new driver is added or when an existing driver gets a significant number of fixes.

To replace your current version of the package (with all of the regions built in) with a new version that still contains all versions, uninstall the Date_Holidays and grab the "Date_Holidays#all" package. Otherwise, you can check out the PEAR page for the main package and see the subpackage list if you only need one for your area.

0 comments voice your opinion now!
dateholidays pear package split regional filter driver subpackage


Community News:
PEAR Group Elections 2008-2009 (Nominations)
May 06, 2008 @ 16:09:04

Time has come back around for the 2008-2009 PEAR group elections and David Coallier has posted some details about this year's elections.

It is now this time of the year again where the PEAR Group throws in the PEAR Group Nominations. The nominated people will then be called for votes by the community and 7 lucky (even though luck has nothing to do with it) will be elected as the new PEAR Group member for the year 2008-2009.

The entire PHP community is requested to nominate who they think would make the best addition to the group, regardless of how they're related to the PEAR project. Nominations should be sent to Martin Jansen by midnight (UTC) May 31st.

0 comments voice your opinion now!
pear group nominate election matrinjansen email


PHPBuilder.com.au:
Powerful Web Services with PHP and SOAP
April 30, 2008 @ 08:43:28

In a new article from PHPBuilder.com.au today, they talk about the "powerhouse of web services", SOAP, and how to get started working with it in PHP.

You've tried your hand at building mashups, experimented with a few RESTful Web services, maybe even started your own. Sure, you've got data sharing working. But how do you make your Web applications really talk to each other? In this tutorial, I'll show you how to take your Web applications to the next level with SOAP.

They opt to go with the NuSOAP method to consume another service and create your own simple one. They include a few code examples for either side and a (very) brief look at doing some debugging with what NuSOAP has to offer. One thing to note - if you have PHP5's SOAP extension compiled in and working, NuSOAP will throw an error about redeclaring a class name. This is because of a conflict between the naming of the SOAP extension's methods and NuSOAP.

0 comments voice your opinion now!
soap tutorial nusoap client server pear package


codediesel.com:
6 books to master PHP
April 23, 2008 @ 22:07:12

code:diesl has posted their list of the top six books that can help you master the PHP language:

If you are new to PHP or are thinking of moving to PHP form other language then the following list of books will provide you with the required knowledge to become a seasoned PHP programmer. Of course, the list is subjective and you may have a different list of books in mind.

Their list is made up of:

0 comments voice your opinion now!
book list php5 certification pear mysql cookbook recommendation


Ruben Vermeersch's Blog:
Integrating Zend Framework and Doctrine
April 21, 2008 @ 10:28:54

The Zend Developer Zone has linked to a tutorial from Ruben Vermeersch about how to get the Zend Framework and the Doctrine ORM library working together.

This article will guide you through the steps needed to set up a project using both the Zend Framework and Doctrine. In a step-by-step way, we will set up a simple message board application.

He includes introductory things like the folder structure and an example of having Doctrine installed inside of it. Its all code from there on out - the bootstrap file, setting up a global handler, and how to integrate it all into their simple ZF application.

0 comments voice your opinion now!
integrate doctrine zendframework tutorial application


New Earth Online:
Caching PHP pages
April 21, 2008 @ 09:31:40

The New Earth Online has a quick look at one easy method for speeding up your site in a few different ways - caching pages and information with things like Cache_Lite and APC.

As your site traffic grows it takes longer and longer to generate a dynamic page from sending multiple queries to a database. One possible solution to limit queries is to cache the result of each query that is needed, or to have a complete full page cache for your site.

They look at the two ways I mentioned - the Cache_Lite PEAR package and the APC extension (that will soon be included by default in the stable PHP releases). Bits of code are provided for each showing how to get them set up and get them working inside of your application.

0 comments voice your opinion now!
cache page apc pear cachelite tutorial install


Michael Kimsal's Blog:
Joe Stump @ MySQL
April 18, 2008 @ 12:09:57

On his blog, Michael Kimsal talks about a presentation he sat in on at this year's MySQL Conference given by Joe Stump from Digg.com:

One key thing he's repeating is using a service layer to access data asynchronously. His advice right now is to group data requests at the top of a user request, do them asynchronously, and then use the data in the rendering when it comes back.

They've published a PEAR package as an example of this asynchronous method that interfaces with Digg's API (http://services.digg.com). You can read more about the subject of his talk on the MySQL Conference website.

0 comments voice your opinion now!
joestump mysqlcon2008 digg pear package asynchronous


PEAR Blog:
First PEAR bug triage over!
April 03, 2008 @ 10:26:34

According to this post on the PEAR blog, the first PEAR bug triage is now over:

PEAR's bug tracker hit the 600+ open bugs mark a month ago. [...] So with 600+ open bugs (not including the feature requests), we had to do something. [...] The logical step was to hold our own bug smashing event and see how it works for PEAR.

Back on March 22nd and 23rd (Easter weekend) they hunted for bugs. Several developers showed to help out and many bugs were fixed and they managed to bring the number of open bugs for PEAR down to 547 with the two days of work. There were some milestones reached too:

Thanks to the triage, we are close to reaching two important milestones: Closing bug reports with lower bug ID than 1000 (1 bug left!) and 2000 (5 left).
0 comments voice your opinion now!
pear bug triage close problem issue feature event


Zend Developer Zone:
Reading and Writing Spreadsheets with PHP
April 03, 2008 @ 08:49:19

On the Zend Developer Zone, Vikram Vaswani has posted a tutorial that shows hos to "break the language barrier" between PHP and Microsoft's Excel to allow for the reading and writing of spreadsheet data directly from one to the other.

When it comes to playing nice with data in different formats, PHP's pedigree is hard to beat. Not only does the language make it a breeze to deal with SQL result sets and XML files, but it comes with extensions to deal with formats as diverse as Ogg/Vorbis audio files, ZIP archives and EXIF headers. So it should come as no surprise that PHP can also read and write Microsoft Excel spreadsheets, albeit with a little help from PEAR.

After grabbing the different parts needed (the PHP-ExcelReader package and the Spreadsheet_Excel_Writer PEAR package, he shows how to create a simple spreadsheet with just numeric information in it. For something a bit more interesting, he goes the other way and shows spreadsheet data as an HTML table.

Other examples included as well are things like: pushing spreadsheet data into a database, working with formulas and styling it to your liking.

0 comments voice your opinion now!
spreadsheet excel pear package phpexcelreader writer tutorial


Lukas Smith's Blog:
Chatting with Rasmus (part one)
March 31, 2008 @ 13:58:08

Lukas Smith got a chance to catch up with Rasmus Lerdorf (and others in #php.pecl) and "talk shop" about topics including handling large libraries and maxclients settings.

In this first post I will provide a link and some commentary on Rasmus's points regarding Doctrine (note I left independent chatter in the log in order to not have any chance of me filtering the content, but there is very little of that so I hope the discussion is still easy enough to follow).

  • Lukas introduces Doctrine briefly (what it does) along with some general thoughts on ORMs and making code a bit more bye code cache friendly.

  • 0 comments voice your opinion now!
    rasmuslerdorf chat doctrine orm suggestion bytecode cache


    Pear-Code-Authors.com:
    Installation of a local PEAR copy on a shared host
    March 27, 2008 @ 12:02:43

    Jacques Marneweck points out a tutorial he came across showing how to perform an installation of the PEAR library system on a shared host.

    This is quite useful when you are forced into using a clueless shared host who only have the bare PEAR installation on their servers, and have not ever considered installing DB, Mail, Net_SMTP, etc. which lots of people use instead of reinventing the wheel with each project.

    The steps of the tutorial are pretty simple and they include two different ways - installing it to your docroot directory if the web host already has the pear binary set up or using ftp/ftps/sftp to upload and install the needed files.

    1 comment voice your opinion now!
    installation pear shared host binary ssh ftp method tutorial


    Symfony Blog:
    Upgrade your plugins
    March 20, 2008 @ 12:03:06

    The Symfony project is recommending you upgrade your plugins to the latest editions - an issue with the PEAR channel caused it to load the wrong ones:

    A problem in the symfony project PEAR channel made the plugin-install task always install the oldest version of the plugins, instead of the latest. If you recently installed plugins with the symfony command line, you probably installed an outdated version. Plugins installed via SVN are not affected.

    You'll need to run a plugin-upgrade command for each of the plugins installed on your system to ensure that you're completely up to date. The post has complete info on how to tell which plugins you have and the exact commands to issue to being them up to date.

    0 comments voice your opinion now!
    symfony framework upgrade update plugin pear channel


    Jonathan Street's Blog:
    Is PHP good enough for science?
    March 20, 2008 @ 09:32:41

    On his blog today, Johnathan Street poses a question - is PHP "good enough" to be used in the scientific community?

    There is an accelerating trend in Biology to make data and tools available via web interfaces. In my opinion this is an environment where PHP excels and yet all the literature I've seen discussing the development of these services uses Perl or occasionally Java.

    He came across two science-related PEAR packages that were created back in 2003, but not too much since then. He wonders if there's anyone else out there that might feel like PHP is a perfect fit for some of the sort of applications the scientific community could need.

    So my question is this. Is anyone out there using PHP in a scientific environment? Are there resources available which I've missed?
    0 comments voice your opinion now!
    science application pear package project


    Developer Tutorials Blog:
    5 PEAR gems free php scripts that will help you code quicker
    March 19, 2008 @ 09:37:29

    Akash Mehta has pointed out five "PEAR gems" that can help you get your code up and running faster - some helpful bits of code to help you deal with some common issues.

    Sifting through the repository is also a challenge; a basic category system is in place, but it's hard to tell what you want when you don't know what's available. Here are some gems from the PEAR repository that you could really find useful.

    The five that made his list are:

    0 comments voice your opinion now!
    pear repository package akisment http archive spreadsheet excel xml


    Stefan Mischook's Blog:
    PEAR vs. Zend Framework
    March 14, 2008 @ 07:56:53

    On his blog today, Stefan Mischook compares two of the popular component libraries out there - PEAR and the Zend Framework (yes, it can be considered a grouping of components too).

    Now that the Zend Framework is ready for 'prime time', I've been considering the Pear framework with regards to how it now fits in the PHP world.

    He suggests that not could both be considered component libraries, but might also both be frameworks (based on a definition that a framework is a "consistent set of components that are designed to work together in a unified manner"). He also asks about the need for something like PEAR now that the Zend Framework has come along, getting Jonathan Lebensold's opinion too.

    0 comments voice your opinion now!
    pear zendframework compare need component framework library


    Developer Tutorials Blog:
    Give Your Visitors a Relative Time
    March 07, 2008 @ 11:19:00

    Following on the heels of this post to the SitePoint blog (about "roughtime"), Akash Mehta has posted his own version of providing users with something a little different - relative time.

    I understood the merits of the approach, but it struck me that a relative time might be a little more useful for many situations. For example, in a fast moving discussion, a short timestamp (e.g. 8:30 AM) as well as a verbal summary of how long ago the time was (e.g. "4 hours ago", "20 minutes ago") are most useful to the user. [...] Now, I figured this could be achieved very easily in PHP - and it could.

    His code is included showing a series of if/else comparisons that change the values to their hour/minute/second counterparts. He also recommends the PEAR Numbers_Words package to help with readability.

    0 comments voice your opinion now!
    relative time pear numberswords since




    Community News:
    Services_Akismet PEAR Package Created
    February 22, 2008 @ 15:58:00

    Mike Gauthier has created a PEAR-based implementation for the popular Akismet spam filtering system that he's added to the site:

    I'd like to let you know about a new PHP 5 implementation of the Akismet REST API. The package, Services_Akismet is MIT licensed and distributed through the official PEAR channel at http://pear.php.net/package/Services_Akismet.

    Hopefully this will make it even easier for third-party PHP projects to use Akismet spam tools. The code is well documented and should "just work" on any PHP 5.2.1+ system.

    It's currently in its alpha stage and was derived from the miPHP Akismet class written by Bret Kuhns.

    0 comments voice your opinion now!
    pear package akismet alpha rest api interface



    Tony Bibbs' Blog:
    Zend Framework's Official PEAR Channel?
    February 14, 2008 @ 16:02:00

    In this new post to his blog today, Tony Bibbs asks a question that pops up every once and a while surrounding the Zend Framework - why don't they use the PEAR package distribution methods to handle the releases of the framework? (Specifically as pertains to PEAR channels)

    Why hasn't Zend provided an official PEAR channel? In my search for an answer I found this response from "bkarwin": No, we have no plans to offer ZF under a PEAR channel or other piece-by-piece distribution method. Assuming bkarwin was working in some half-official capacity at Zend I'd simply ask "Why not?".

    Tony wonders why, if the PEAR group (and project) has such a good thing already in place, it can't just be adapted to make releases of the various components of the framework simpler than having to wait for a whole new release to get the fixes the users need.

    1 comment voice your opinion now!
    zendframework pear package release bugfix component




    Zend Developer Zone:
    PHP and your domain model with Doctrine ORM
    January 31, 2008 @ 08:40:00

    On the Zend Developer Zone, jonwage has posted about an ORM (Object-Relational mapping) he came across that can help abstract out your interface with your backend database - Doctrine.

    One of its key features is the ability to optionally write database queries in an OO (object oriented) SQL-dialect called DQL inspired by Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains a maximum of flexibility without requiring needless code duplication.

    The project's page gives the full details on the features it offers and has links to the latest downloads so you can try it out for yourself. There's even a blog you can subscribe to to keep up to date.

    0 comments voice your opinion now!
    php5 object relational mapping doctrine database abstraction


    Zend Developer Zone:
    Creating Data Tables With PEAR Structures_DataGrid
    January 28, 2008 @ 16:19:30

    Cal Evans has posted a tutorial on the Zend Developer Zone (posted today) about using the PEAR Structures_DataGrid package to create quick and easy data tables.

    In this article, I'll be introducing you to the Structures_DataGrid package, showing you how it can be used to display structured data in tabular form. I'll be showing you how to hook it up to various data sources (including a CSV file, an RSS feed and an Excel spreadsheet), and how to format the resulting output so it's as pretty (or as ugly) as you want it to be.

    They talk about what you'll need to get started (the different packages for different kinds of data) and some sample code to help you down the path to more attractive tables. There's even a bit touching on some of the more advanced features like exporting to Excel, pagination and data sorting.

    0 comments voice your opinion now!
    pear package structure datagrid table tutorial


    DeveloperTutorials.com:
    Effective Geotargeting with PHP
    January 28, 2008 @ 09:47:00

    The Developer Tutorials blog has a new article that talks about their method for creating simple geotargeting for your visitors.

    In this tutorial, we'll take a look at the technique of geotargeting, or serving content to users based on their physical location. The technology is invaluable; with simple techniques, you can target advertising to specific users, collect more accurate usage statistics, serve content in different languages for different regions and provide local information like weather reports to your visitors.

    They use the GeoIP services offered by Maxmind to perform the IP to location translation and the PEAR package already created to make the integration as painless as possible.

    1 comment voice your opinion now!
    geotargeting tutorial geoip maxmind pear package



    Zend Developer Zone:
    Generating and Validating Web Forms With PEAR HTML_QuickForm (part 2)
    January 22, 2008 @ 07:57:00

    The Zend Developer Zone has released part two of a series (here's part one posted back in November) looking at making forms for your website with the help of the PEAR HTML_QuickForm class.

    I'll be discussing some of the package's non-standard form elements, teaching you how to combine elements into groups, showing you how to apply templates to control a form's appearance, and guiding you through the process of writing and registering your own custom validation rules.

    There's plenty of sample code and screenshots to go around in this second part including examples of form auto-completion, multi-select elements and and example of its integration with Smarty.

    0 comments voice your opinion now!
    form generate validate pear htmlquickform series




    Helgi's Blog:
    New features and changes in pear.php.net
    January 08, 2008 @ 12:50:00

    Helgi has posted about the updates that have recently been made to the PEAR website (pear.php.net) to help correct some issues and bring in some new features.

    I just did a new release of pear.php.net which has a bunch of new features and bug fixes, most of which you can see here.

    Some of the updates include:

    • One column design instead of the 2 column design
    • Usage of the YUI CSS reset + fonts
    • The package list on http://pear.php.net/packages.php doesn't highlight deprecated packages anymore
    • Now developers can see bug reports by unconfirmed accounts
    • The RSS feeds now contain new line breaks!
    • Patch uploading during ticket creation now works

    He also specifically mentions some of the feedback he's gotten on certain things (like the new layout, the CSS of the site and the DES passwords) and explains some of the rationale behind their update/use.

    0 comments voice your opinion now!
    pear website update feature change layout password css pear website update feature change layout password css



    Stoyan Stefanov's Blog:
    Text_Highlighter 0.7.1 and hiliteme.com updates
    January 03, 2008 @ 11:17:00

    Stoyan Stefanov has posted about some updates he's been making to his Text_Highlighter PEAR package and to the hiliteme.com website.

    In today's busy schedules there's less and less time to give love to our favorite open source projects. [...] Anyway, today I found the time to fix two bugs in Text_Highlighter and also include the patch from Daniel Fruzynski that adds support for highlighting VBScript. Wo-hoo!

    The update to hiliteme.com uses the newly updated package, so you can try it out before you go and install it.

    0 comments voice your opinion now!
    texthighlighter hiliteme update pear pacakge install texthighlighter hiliteme update pear pacakge install




    RegDeveloper.co.uk:
    Build your PDF and Excel reports with PHP
    December 19, 2007 @ 14:33:00

    On the RegDeveloper website, there's a new tutorial posted that covers the creation of both PDF files and Excel reports from inside of PHP (with the help of the Spreadsheet_Excel_Writer PEAR component and the ClibPDF PHP Library (bundled with PHP 5.3).

    Given the prevelance of PHP, Excel and PDF it's fortunate there exists class libraries for the generation of PDF documents and Excel spreadsheets using PHP.

    They start with the PDF generation and show the installation process for ClibPDF and an example of creating a document on the fly. Their example sets up a title, some content text and a table of information. Creating the Excel spreadsheet is even simpler with the Spreadsheet_Excel_Writer - installation via a PEAR channel and defining the worksheet, fonts and content are quick and easy function calls.

    0 comments voice your opinion now!
    developer pdf excel pecl component pear spreadsheetexcelwriter clibpdf developer pdf excel pecl component pear spreadsheetexcelwriter clibpdf



    David Coallier's Blog:
    PEARValidate 0.8.0 released...THE release, finally
    December 11, 2007 @ 13:46:00

    David Coallier has posted about the release ("THE release") of the latest version of the PEAR Validate package - version 0.8.0.

    I am happy to announce the release of Validate to it's version 0.8.0 (In my opinion the last one before the next (and first) RC of this package towards a stable state). [...] The team has had a hard year loosing one of it's greatest member and the whole project has been literally on neutral since then.

    This new release includes nearly thirty bugfixes including resolutions for issues dealing with iTLD validation, date extra validation, better ISSN/ISBN validation and includes some new unit tests as well. There's plans in the works to add features that would validate country codes and to make the move to PHP5.

    0 comments voice your opinion now!
    pear validate package release bugfix validation pear validate package release bugfix validation




    Travis Swicegood's Blog:
    PHPT_Ensure v0.1alpha and PHPT_Core v0.1.1alpha released
    November 26, 2007 @ 12:08:00

    Travis Swicegood has announced the release of the latest versions (both in alpha) of two of his PHP packages - PHPT_Ensure and PHPT_Core.

    I woke up this morning a bit before 5 and couldn't go back to sleep. I decided to try to get some of the busy work on a new package, PHPT_Ensure finished up. I hinted at it a few weeks ago, but now it's ready for use, albeit a bit limited.

    You'll need to update the Core package as well to get it up and running. He shows some sample output from a sample test and mentions some challenges he's still facing (like comparing arrays).

    1 comment voice your opinion now!
    phptensure phptcore test alpha package pear phpt phptensure phptcore test alpha package pear phpt




    Gennady Feldman's Blog:
    PHP Getting Started Videos and resources
    November 14, 2007 @ 09:34:00

    In a new post Gennady Feldman has listed out some beginner resources to help those just getting into PHP:

    I know that some of my last blog entries were a bit too technical for the web designers who are just starting out and curious about using PHP for their website. I thought I'd do a blog post with links for the newbies who are just starting out and making their first steps in PHP.

    He points out the videos on the KillerPHP.com website, links to the PHP manual and the PEAR and PECL home pages.

    0 comments voice your opinion now!
    getting started beginner video resource pear pecl manual video getting started beginner video resource pear pecl manual video


    Zend Developer Zone:
    Generating and Validating Web Forms With PEAR HTML_QuickForm
    November 12, 2007 @ 14:32:00

    On the Zend Developer Zone today, Vikram Vaswani has a tutorial posted introducing the PEAR HTML_QuickForm package and how to use validation right along with it.

    Over the next few pages, I'll be introducing you to one of PEAR's most powerful tools for generating Web forms and validating the input that arrives through them: the HTML_QuickForm package. This package provides a flexible, reusable library of methods that can literally save you hours of time when dealing with form-based user input - and best of all, it's free and extremely easy to use. So what are you waiting for? Jump right in, and let's get going!

    You'll need to be familiar with some of the technologies before getting started (it's not going to teach you PHP) and you'll need to have the software setup and ready with the HTML_QuickForm package installed. There's lots of different examples of form creation (including generated from database information) as well as information on the rules you can apply to your form elements to check on the user input (like alphanumeric, maximum length and matching a regular expression).

    2 comments voice your opinion now!
    html pear pacakge quickform tutorial validation html pear pacakge quickform tutorial validation


    Community News:
    Latest PEAR Releases for 11.12.2007
    November 12, 2007 @ 07:05:54

    Latest PEAR Releases:
    0 comments voice your opinion now!
    pear weekly releases pear weekly releases


    SitePoint Server Side Coding Blog:
    Cache it! Solve PHP Performance Problems
    November 09, 2007 @ 19:16:00

    On the SitePoint "Server Side Coding" blog, there's this look at caching to help solve some PHP performance issues.

    In the good old days when building web sites was as easy as knocking up a few HTML pages, the delivery of a web page to a browser was a simple matter of having the web server fetch a file. [...] Then dynamic web pages came along and spoiled the party by introducing two problems: a delay for processing and a check of the file's age before it's sent to the browser.

    They talk about what caching can do for you, what you can do (both server and client side) to prevent caching, working with the headers sent from and back out to the browser, using output buffering, partial caching and using PEAR::Cache_Lite in your application.

    0 comments voice your opinion now!
    caching serverside clientside pear cachelite package partial caching serverside clientside pear cachelite package partial



    Skaldrom's Blog:
    Want to create your own progranning language? Lexer & Parser in PHP!
    November 02, 2007 @ 11:12:00

    Skaldrom passed along a link to an article he's written up to show how to use one of the more powerful PEAR packages in a simple "Hello World" kind of script - the PHP_LexerGenerator and PHP_ParserGenerator packages.

    Who doesn't dream about it: Your own programming language, because the syntax and the word are expression! A step continue to go to ascend and from the programming language user to the language creator! This is now possible in PHP, but unfortunately only with minimum documentation.

    He provides an example of the Lexer/Generator in action - handling a simple mathematical operation. The execution code is first with the Lexer definition file and the code for the parser following. Lastly, he has included the code to make things work - passing the test string into his custom Lexer which is passed off to the Parser and a value returned.

    0 comments voice your opinion now!
    lexter parser pear package generator example lexter parser pear package generator example



    Pádraic Brady's Blog:
    Doing that thing called PEAR - Packaging Source Code for PEAR Distribution
    October 26, 2007 @ 14:56:51

    Pádraic Brady has followed up his last post on PEAR. This time he's covered the method to package and distribute source code using the PEAR installer.
    All right then! You read the last blog entry advocating PEAR (or found it during the week ;-)) and you want to know all about packaging code so your users can install your library or application using the PEAR installer. A few things first:

    1. You don't need to propose a package to PEAR to do this.
    2. You don't need to create a PEAR "channel" although it's very much recommended (another future blog post no doubt).
    3. You don't need a whole lot of effort.

    Taking your source code, and generating a PEAR package is a relatively simple task.
    He covers the process at lengths with easy to follow steps.
    0 comments voice your opinion now!
    pear packaging xml sourcecode tutorial pear packaging xml sourcecode tutorial


    Travis Swicegood's Blog:
    New Release - PHPT
    October 24, 2007 @ 10:37:00

    Travis Swicegood has made a new release of the successor to the PEAR RunTest package for PEAR2 - the new PHPT.

    Since this is usable and PEAR2 is still being worked out, I've decided to release this as a standalone package for the time being with the intent of bundling it with Pyrus or including it directly in PEAR2 when PEAR2 is realized.

    This provides the majority of the functionality provided by PEAR's pear run-tests command via its own phpt command and it can even provide pear style output.

    Examples of its use are included as well as the method to download this latest version (via a PEAR channel, of course) or through the package's web page. Issues found with the software can be posted to the project's Google code page.

    0 comments voice your opinion now!
    phpt pear package runtest pear2 channel phpt pear package runtest pear2 channel


    Padraic Brady's Blog:
    To PEAR or not to PEAR? And how to PEAR anyway?
    October 24, 2007 @ 08:04:00

    In his latest post, Padraic Brady takes a look at PEAR in a verb form - both in how you can use it and what sorts of things it has in store.

    over the last few months after finally getting over my ignorance of PEAR beyond it being a hodge podge of packages of dubious quality I've been questioning whether pearifying my future and past code is worthwhile. The answer is a resounding YES.

    Unfortunately, there are some barriers for most people to get into the PEAR world (including the lack of the "coolest packages") with some of the perceived barriers including:

    • PEAR will require large scale changes to my shiny new cool code
    • PEAR only allows proposals for complete functional code
    • PEAR is elitist
    • PEAR is fossilised

    He also talks about PEAR packages and dispels one of the most popular myths about the package repository - "you can't use PEAR on a shared host".

    0 comments voice your opinion now!
    pear package perceived barrier repository pear package perceived barrier repository


    The PEAR Blog:
    PEAR communities (LinkedIn & Facebook)
    October 22, 2007 @ 12:04:00

    A quick post to the PEAR blog today points out two groups that, whether you're a PEAR user or not, you might want to be a part of - one on LinkedIn and the other on Facebook.

    These groups are primarily for fun, but also act as networking tools to get to know the people who are developing and using PEAR. The official support channels for PEAR are still the mailing lists and bug tracker, and are listed at http://pear.php.net/support.php

    To find either, log into your account and search for the term "PEAR". It'll be on the list.

    0 comments voice your opinion now!
    pear community linkedin facebook group pear community linkedin facebook group



    Travis Swicegood's Blog:
    PHPT A teaser...
    October 19, 2007 @ 12:17:00

    Travis Swicegood is teasing us with some output from a script in his latest blog post:

    So my free time of late (what there is of it) has been spent on a project that's getting really close to v0.1 release. In other words, its first functional release. If you've ever run a test using the PEAR installer or know what a .phpt file looks like, you might be able to guess what I've been up.

    Keep an eye on his blog for more information on his "secret project".

    0 comments voice your opinion now!
    teaser phpt pear installer output teaser phpt pear installer output



    Adam Harvey's Blog:
    $pear->list
    October 13, 2007 @ 14:26:00

    Adam Harvey has a (very) quick post with a hint for PEAR users out there - how to get a list of installaed packages on the system you're using.

    I've seen three people ask a variation of how can I get a list of installed PEAR packages from within my PHP script in the last few weeks on IRC, and two just in the last day. Because I'm a helpful sort, here's a little morsel of code that will do just that.

    The code loads the PEAR Registry package and loops, via a foreach, through the results from a listPackages() call. It should work with just about any PEAR version.

    0 comments voice your opinion now!
    pear list package example listpackages registry pear list package example listpackages registry


    Joshua Eichorn's Blog:
    PEAR2 Unconference
    October 11, 2007 @ 14:22:04

    Though there's no slides for his unconference PEAR2 talk, Joshua Eichorn has posted some of his planned features for the update to the popular PHP package repository:

    I do have a list of new features planed(or already implemented) for the Pyrus installer.

    The list includes:

    • no installation necessary. It runs out of the box as a .phar. No go-pear.phar needed
    • Pyrus is much more development/production-oriented, and will have a "deploy" command for managing deployment of development code to a production server
    • out-of-the-box supported packaging formats include .tar, .tgz, .tbz, .zip, and .phar
    • PHP 5.3+-based code means it fully utilizes cutting edge PHP features such as SPL iterators, XMLReader/XMLWriter, ZIP extension, phar extension (if enabled), exceptions
    • full application support is available with the new www and cfg (configuration file) roles

    Check out his post for more items on the list.

    0 comments voice your opinion now!
    zendcon2007 pear unconference pear2 update package zendcon2007 pear unconference pear2 update package


    Manfred Webber's Blog:
    PHP and Flex - Part III
    October 10, 2007 @ 12:39:00

    Manfred Webber, after reading an article from PHPBuilder, decided to show a "more standardized" method for communication between PHP and a Flex application. In his latest post, he shows how to use the PEAR Services_Webservice package to help make the connection.

    Why not do the same with Flex and the PEAR package Services_Webservice which I think is a smarter way, if you want to use XML at all. Smarter because you use Web Standards and developers do not need to learn and parse the returned XML structure.

    He includes both the PHP code for the web service and the cut&paste for the simple Flex application.

    0 comments voice your opinion now!
    flex serviceswebservice pear xml webservice flex serviceswebservice pear xml webservice



    Sebastian Nohn's Blog:
    Using Net_DNSBL and Nagios to check if your SMTP server is listed in a RBL
    October 05, 2007 @ 10:22:00

    Sebastian Nohn has created a handy little script using PEAR packages to work with a Nagios installation to perform an automatic check - validating that your domain isn't listed with the given black lists.

    RBLs are a great way to get rid of a lot of SPAM (if you choose the right ones). On the other hand you (and users of your mail server) get in big trouble if your SMTP server gets listed on a common RBL.

    Checking this manually is a job that sucks a lot, checking this automatically is an easy job with Nagios, PHP, Net_DNSBL and Console_Getopt.

    He includes the parts you'll need - grabbing the PEAR package, the PHP script to make the request and the changes you'll need to make to the configuration files to make it all work together.

    0 comments voice your opinion now!
    netdnsbl nagios smtp blacklist check pear package netdnsbl nagios smtp blacklist check pear package


    Padraic Brady's Blog:
    OAuth Specification and Zend Framework/PEAR Proposal
    October 04, 2007 @ 12:03:00

    Since it's been moved up into the "Final Draft" stage in its proposal process, Padraic Brady wanted to blog about this latest update for the OAuth Specification, a standardized protocol that allows secure API authentication from both desktop and web applications.

    Because I love all things OpenID related and am an OpenID "pusher" in Europe (blame the OpenID Europe Foundation membership on Snorri Giorgetti), I'll be proposing a PHP5 implementation of OAuth to the Zend Framework (assuming no other OAuth proposal) and PEAR (PEAR because that's now the home of my OpenID For PHP library under proposal).

    You can get more information about OAuth from the project's website.

    4 comments voice your opinion now!
    oauth specification zendframework pear proposal final draft oauth specification zendframework pear proposal final draft


    Padraic Brady's Blog:
    PEAR OpenID support packages released
    October 02, 2007 @ 13:44:00

    Padraic Brady has posted about the release of three of his packages for OpenID functionality into PEAR:

    After proposing these back in June/July (and getting held up by August's vacation!) I have gotten around to releasing three packages on PEAR which are required for an OpenID package later on.

    His three packages are:

    0 comments voice your opinion now!
    pear openid package support servicesyadis crypthmac2 cryptdiffieHellman pear openid package support servicesyadis crypthmac2 cryptdiffieHellman



    Greg Beaver's Blog:
    Working towards Pyrus and PEAR2, check it out or miss out
    September 24, 2007 @ 12:05:00

    Greg Beaver talks about a big push that he's making towards PEAR2 by working hard on an integral piece of the puzzle - the Pyrus installer.

    I'm churning out code to turn its installer, Pyrus, from vaporware into actual code. Along these lines, there has been significant progress. The code has been developed on PHP 5.2, but will most likely target PHP 5.3 with the introduction of namespaces. Pyrus completely revamps the way things are done.

    Greg mentions some of the functionality the installer will use including XMLReader/XMLWriter, namespaces and bits of functionality from the Standard PHP Library (SPL). He's released what he's developed so far via a PEAR channel with no other dependencies.

    0 comments voice your opinion now!
    pyrus pear2 pear installer subversion channel spl namespace pyrus pear2 pear installer subversion channel spl namespace




    ONLamp.com:
    Quick and Clean PHP Forms
    September 14, 2007 @ 07:57:00

    On O'Reilly's ONLamp.com website today, there's a new tutorial posted walking you through the creation of online forms through the amazingly helpful PEAR HTML_QuickForm package.

    As its name suggests, the PHP Extension and Application Repository (PEAR) library called HTML_QuickForm can be used to quickly and cleanly to produce validating HTML forms, relieving the developer of the tedium that often accompanies such tasks. [...] This tutorial presents a basic implementation of HTML_QuickForm to produce a common email contact form and explores ways to get the most from this powerful library.

    They introduce the topic by explaining when is a good time to use the package. Now that you're sure you want to use it, they move on to the code portion of the tutorial - the creation of an email form. They define the fields (their labels, types and required status) and show how to dump that array into the HTML_QuickForm class to create the HTML field output. They also add validation rules to check the contents of the field - in this case, ensuring that all of the entries have values and aren't empty.

    1 comment voice your opinion now!
    pear htmlquickform form tutorial package pear htmlquickform form tutorial package


    PHPClasses.org:
    PHP Programming with PEAR
    September 10, 2007 @ 12:03:00

    The PHPClasses.org website has a new book review posted today covering one of Packt Publishing's PHP-related publications: "PHP Programming with PEAR".

    If you want to learn how to use the most relevant PEAR packages with great detail, "PHP Programming with PEAR" must be in your bookshelf, definitely. [...] "PHP Programming with PEAR" is a mandatory book, especially if you are thinking about using PEAR on a daily basis to increase your productivity, or if want to improve your skills on the use of the covered packages.

    The reviewer, Marcelo Santos Araujo, goes into a bit of detail on the contents of the book too - chapters talking about MDB2, data display packages, working with XML, web services and date/time functionality.

    Check out the Packt Publishing page for the book for more info.

    0 comments voice your opinion now!
    programming packt publishing book review pear programming packt publishing book review pear




    Greg Beaver's Blog:
    phar gets a major speed boost with version 1.2.1
    August 30, 2007 @ 09:06:00

    Greg Beaver has blogged about an enhancement in the latest release of phar (1.2.1) - a major speed boost:

    A few minutes ago, I released phar version 1.2.1. phar is a PHP extension that allows the creation of complete filesystems within a single physical file. In addition, a bootstrap stub written in PHP can be used to run a phar archive as if it were an executable file or shell script. Documentation on its usage and how to create phars is at http://php.net/phar in the PHP manual.

    Greg mentions some other issues that were fixed and a refactoring of some of the stream operations to cut the speed in half.

    0 comments voice your opinion now!
    phar archive pear pecl package release speed boost phar archive pear pecl package release speed boost



    Travis Swicegood's Blog:
    Some new PEAR channel code
    August 22, 2007 @ 10:27:00

    Travis Swicegood talks about some updates he's made to the Ctrx_PEAR_Channel_Frontend package to make some updates for creating PEAR channels.

    The code's great and provides a good jumping off point, but I thought it needed some updates. Davey's been a busy guy and I had a few free hours every other evening or so for a few, so I decided to start extending it.

    Among the things he changed were some updates to the frontend text (to move away from hard-coded and into a more templated style) and the push of these changes into two new packages: Domain51_PEAR_Channel and Domain51_PEAR_Channel_Frontend. Together they allow access to the tables that Chiara_PEAR_Server creates and an extension system that allows for what he calls "package extras".

    0 comments voice your opinion now!
    pear server ctrxpearchannelfrontend channel update package pear server ctrxpearchannelfrontend channel update package



    DevShed:
    Developing SOAP Clients using PHP
    August 15, 2007 @ 07:56:00

    DevShed has a new article posted today - a tutorial walking you through a sort of brief history of SOAP support in PHP and some working examples of each - NuSOAP, PEAR::SOAP and PHP's SOAP extension.

    SOAP (Simple Object Access Protocol) provides a flexible communication layer between applications, regardless of platform and location. As long as both the server and the client speak SOAP, they can communicate. A PHP-based web application can ask a Java database application to get some information. In this article we will try to focus on different methods of developing SOAP web service clients in PHP.

    They start with a look at NuSOAP and the creation of both a client and server (as well as an example on how to use some of its debugging. Next up is PEAR::SOAP, a powerful package that simplifies much of the same functionality NuSOAP has to offer. Finally, they get to the most recent SOAP functionality for PHP, the PHP SOAP extension that comes loaded with PHP5 installations by default. This includes a brief overview of its API and code examples that, in a few lines, do what takes the others twice as much.

    0 comments voice your opinion now!
    soap client server nusoap pear soap extension tutorial soap client server nusoap pear soap extension tutorial


    Evert Pot's Blog:
    PHPRPC and PHP frameworks
    August 13, 2007 @ 16:27:00

    In an effort to spread PHP-RPC functionality around as much as possible, Evert Pot has suggested his code to three of the major sources for application development - the PEAR project, the Solar Framework and the Zend Framework.

    I started the process to submit PHPRPC to the major frameworks. I feel like I should submit it to all the major frameworks, so I can make sure people can use PHP-RPC regardless of their framework of choice.

    In PEAR, it has been submitted as a PEAR2 package, in the Solar Framework as an open ticket (so far) and in the Zend Framework as just an idea (no formal or informal kind of submission yet).

    0 comments voice your opinion now!
    phprpc framework solar zendframework pear phprpc framework solar zendframework pear



    Jonathan Street's Blog:
    Elsewhere...New PEAR package for the Compete API
    August 06, 2007 @ 16:08:00

    In a new post Jonathan Street mentions a new PEAR package that's an API for the Compete API:

    After writing about the compete API Hiroki Akimoto contacted me mentioning a proposal he had made to PEAR. Our scripts each had strengths and we decided to combine our attempts and hopefully make something better. After a week or so we updated the proposal with the new code and after a little time for comments and a week for voting the proposal was accepted and on 30th July a new package, Services_Compete, was available on PEAR

    This package (currently in an alpha release, version 0.1.0) acts as a wrapper class to connect to and use the Compete SnapShot API.

    0 comments voice your opinion now!
    complete api pacakge pear servicescomete complete api pacakge pear servicescomete


    Zend Developer Zone:
    Paging Data Sets With PEAR Pager
    August 06, 2007 @ 15:15:40

    On the Zend Developer Zone today, there's a new tutorial covering the use of the PEAR Pager class to break sets into smaller sets for all sorts of data sets (not just database results).

    PEAR's Pager class, [which] offers developers a framework for breaking large data sets into smaller chunks, or pages, for greater readability or easier navigation. Pagination is important, particularly when dealing with result sets containing hundreds or thousands of items, because it allows the user to exert some degree of control over which segment of the data set is visible at any given point, and thus avoid drowning in a never-ending sea of data.

    Cal explores the functionality this powerful little class has under the hood including working with pagination of normal arrays, database results and XML information. Of course, code is provided through out and screenshots are posted where needed to show what the output should look like.

    0 comments voice your opinion now!
    pear pagination pager class tutorial array xml database pear pagination pager class tutorial array xml database



    Kevin van Zonneveld's Blog:
    Speedup your website with Cache_Lite
    August 02, 2007 @ 09:31:00

    Kevin van Zonneveld has a quick new tutorial he's written up covering the installation and use of the Cache_Lite software to increase performance on your site.

    Every time a request hits your server, PHP has to do a lot of processing, all of your code has to be compiled & executed for every single visit. Even though the outcome of all this processing is often identical for both visitor 21600 and 21601. So why not save the flat HTML generated for visitor 21600, and serve that to 21601 as well? This will relieve resources of your web server and database server because less PHP often means less queries.

    The Cache_Lite PEAR package makes it simple to cache both entire pages or just small parts. He shows the installation (through aptitude on Ubuntu) and how to use it in a simple code example that stores the cached copy to the local drive for a given amount of time.

    0 comments voice your opinion now!
    cachelite pear cache component page performance cachelite pear cache component page performance


    Sebastian Bergmann's Blog:
    Wanted PHP Implementation of Unified Diff
    July 30, 2007 @ 09:32:00

    Sebastian Bergmann has posted a "wanted" sign over on his blog - he's looking for a PHP function to do two things:

    • takes two strings as its input and
    • returns a string with the differences between the two string in the same format as GNU diff would return for diff -u for two files that contain the respective strings.

    Think you can help him out? Drop him a line...

    0 comments voice your opinion now!
    implement diff function unified gnu textdiff pear implement diff function unified gnu textdiff pear



    Padraic Brady's Blog:
    OpenID In PHP PEAR Proposed!
    July 26, 2007 @ 11:18:00

    Padraic Brady has an announcement posted to his blog today - his OpenID PEAR has officially been proposed to the PEAR group for consideration.

    Yes, my OpenID 2.0 PHP5 Consumer has finally been proposed to PEAR. This brings the OpenID fanaticism on PEAR to four packages: OpenID_Consumer, Services_Yadis, Crypt_HMAC2, Crypt_DiffieHellman.

    He'll be working to get the code "further up to par" including Nonce validation, more consistent error reporting and other operation modes (like check_immediate). He's also included a screencast in the post for those not familiar with OpenID to get their first dose.

    0 comments voice your opinion now!
    openid pear component proposed consumer yadis crypt hmac2 diffiehellman openid pear component proposed consumer yadis crypt hmac2 diffiehellman


    IBM developerWorks:
    Turn SQL into XML with PHP
    July 25, 2007 @ 09:21:00

    On the IBM developerWorks site today, there's a new tutorial by Vikram Vaswani walking through the use of the XML_Query2XML PEAR package to pull data from your SQL database and push it into an XML structure.

    Ever wished for an easy way to transform SQL result sets into XML? It's a PEAR package named XML_Query2XML, and it provides a comprehensive framework to efficiently turn the results of a database query into a customizable XML document. This article introduces the package, and demonstrates useful real-world applications, including using it with XSL and XPath, combining it with data from external Web services, and creating database dump files.

    They go through the installation and the steps to create the XML:

    • Convert SQL to XML
    • Transform XML output with XSL
    • Customize XML output
    • Work with SQL joins
    • Filter SQL records with XPath
    • Merge data from multiple sources
    • Create database backups

    Check out the full tutorial for an excellent guide to using this powerful PEAR package.

    0 comments voice your opinion now!
    pear xmlquery2xml xsl xpath join install backup pear xmlquery2xml xsl xpath join install backup


    Pádraic Brady's Blog:
    PHP OpenID 2.0 library for PEAR Updates
    July 24, 2007 @ 12:53:00

    Pádraic Brady has posted two new updates about his OpenID library for PEAR - one concerning the previous version being available from a subversion repository and the other about some updates to the source.

    From the first post:

    So after a few days throwing around code in an IDE, a small amount of swearing, and an overdose of caffeine, I have committed initial OpenID PHP5 code in it's shiny new PEARified form to subversion. What this means is that after a few more days of completion to work out major kinks, the PEAR-Dev mailing list will be notified of a new OpenID Consumer proposal ;-). A Server proposal will follow at a later date, i.e. when the dull ache in my forearms subsides. The repostory: http://svn.astrumfutura.org/pear/trunk/OpenID/

    And, from the second post:

    Just a quick update on the PHP OpenID 2.0 library being proposed to PEAR. The library is a PHP5 implementation of the OpenID 2.0 Authentication Specification. It's currently only including a Consumer (so you can build OpenID authentication into websites) but a Server is already in the works for later.

    Be sure to check out both of these posts for lots more information than's presented here. Pádraic's worked hard on the package - check out the alpha code at http://svn.astrumfutura.org/pear/trunk/ to see just how much.

    0 comments voice your opinion now!
    pear openid library package subversion source pear openid library package subversion source


    Community News:
    phpDocumentor 1.4.0 (Stable) Release
    July 24, 2007 @ 11:16:00

    The phpDocumentor project has announced the release of their latest version (a stable!) - phpDocumentor 1.4.0 - on their site today:

    The PhpDocumentor team would like to announce the release of PhpDocumentor version 1.4.0 through SourceForge and pear.php.net. This is the first stable feature release since 2006.

    This new release adds in functionality for new tags for "magic" properties and methods, some new runtime options (like ignoresymlinks and undocumentedelements) and puts a new memory_limit option on the ini file to help keep it more under control.

    You can grab the latest download either through a "pear upgrade" or directly from the project's SourceForge site. Their latest post also includes the complete Changelog for more details on the updates.

    0 comments voice your opinion now!
    phpdocumentor stable release sourceforge pear phpdocumentor stable release sourceforge pear



    Pádraic Brady's Blog:
    OpenID for PEAR Services_Yadis proposed
    July 16, 2007 @ 10:26:00

    Pádraic Brady notes in a new post today that his Services_Yadis package has been official proposed to the PEAR group:

    This provides a PHP5 implementation of the Yadis Specification 1.0 a requirement of the OpenID Authentication 2.0 Specification. There are way too many specifications out there! The proposal is a reflection of February's "Zend_Service_Yadis" proposal to the Zend Framework. The main differences (beside the PEARification) were fixing the main bugs the ZF sample code had.

    He also mentions his next proposal - to create an OpenID Consumer package.

    0 comments voice your opinion now!
    openid servicesyadis pear proposal consumer openid servicesyadis pear proposal consumer



    Elizabeth Naramore's Blog:
    July Edition of IPM Published
    July 13, 2007 @ 14:38:00

    Elizabeth Naramore points out the recent publication of the latest International PHP Magazine issue for July of 2007:

    I was happy to contribute to their recently released June edition. I did an interview with the new PEAR Group on the future of PEAR. I'm glad to see such enthusiasm and collaboration among the newly elected group.

    You can check out the issue and order your copy from the International PHP Magazine website (here's the table of contents too showing the rest of the articles/columns in this month's edition.

    0 comments voice your opinion now!
    intlphpmag publish pear interview group future intlphpmag publish pear interview group future


    Dotvoid.com:
    Generating Excel files with PHP
    July 10, 2007 @ 07:46:47

    Danne Lundqvist has posted about the process he went through when developing a solution to create Excel files in PHP:

    I'm on this project at work where we need to create an excel file and send it via email or ftp to a recipient. The normal answer to this is to create a comma separated file and name it .xls and excel will work it out. However, that only works if you open it directly through an http request and are able to set the http headers correctly.

    To get around these limitations, he found two solutions (thanks Google!) in PEAR's Spreadsheet_Excel_Writer and an MS-Excel Stream Handler class. He includes code that gives an example of another solution, one that packs data into a binary string and returns it as a part of the Excel document.

    2 comments voice your opinion now!
    excel file pear spreadsheet msexcel stream handler excel file pear spreadsheet msexcel stream handler


    PEAR Blog:
    PEAR2 standards, we would like to know what you think
    July 09, 2007 @ 11:12:00

    On the PEAR blog today, they're asking for thoughts on some of the standards for the coming PEAR2 development environment:

    Please read the following document and post your comments on the wiki using the discussion page. Comments are opened for a period of two weeks. It is very important that you comment as these standards will define PEAR2.

    The standards can be found here and include everything from the base requirements and package approach down to specific package-related rules (for things like directory structure, class-to-file conventions and handling dependencies).

    0 comments voice your opinion now!
    pear pear2 standards opinion requirements package wiki pear pear2 standards opinion requirements package wiki


    Dave Dash's Blog:
    Saving a file to a database using symfony and doctrine
    July 09, 2007 @ 08:49:00

    From the Spindrop blog, there's a quick new post that shares the code needed to save a file to a database inside of a symfony application:

    I like to save content uploaded by website visitors to a database versus the file system. It makes it easy having the data all in one spot. I tend to overcomplicate this process, so I wanted to write down the important steps.

    His two step process involves modifying your application's form helper and the code to pull the binary data out of the submit and push it into a new object.

    0 comments voice your opinion now!
    symfony file database doctrine tutorial helper symfony file database doctrine tutorial helper



    Matthew Weir O'Phinney's Blog:
    File_Fortune refactored
    July 06, 2007 @ 09:36:00

    In a new blog entry today, Matthew Weir O'Phinney talks about updates (and refactoring) that he's done to a PEAR package he's developed, File_Fortune.

    Over the past few evenings, I've refactored File_Fortune to have it implement Iterator, Countable, and ArrayAccess -- basically allowing it to act like an array for most intents and purposes. As a result, I've eliminated the need for the File_Fortune_Writer package, and greatly simplified the usage.

    The package is designed to make an interface between the casual PHP user and the fortune files common on most *nix machines. To illustrate he update, he includes some code that grabs the fortune file, parses it to grab a random one and echoes them out. Also included is the save() method so you can add your own to the list easily.

    0 comments voice your opinion now!
    filefortune refactor pear package fortune filefortune refactor pear package fortune



    PEAR Blog:
    Request for ideas New developer FAQ
    June 29, 2007 @ 10:22:00

    The PEAR Blog has posted a request for ideas to help work up a new developer FAQ they can hand out to potential PEAR developers as a "jumpstart" guide to working with the package repository.

    New developers need quite a time to familiarize themselves with the rules and conventions in PEAR. With the new role of mentors in PEAR2, they will have a contact person they can ask in that cases. But in many cases the same questions will get asked which will get boring for the mentoring developer, so we need a Mini-FAQ with a list of things the newbie should know.

    They're looking for comments posted to the entry to help define this guide. So far, a suggested outline has been proposed by David Coallier for both general information and developer-specific details.

    0 comments voice your opinion now!
    pear developer general faq question frequently outline pear developer general faq question frequently outline


    Padraic Brady's Blog:
    More OpenID (in PEAR and Refactoring)
    June 26, 2007 @ 11:49:00

    Continuing on with his look at his OpenID library and its implementation, Padraic Brady has two new posts with more of the story.

    From the first post:

    As a follow on from my previous entry about OpenID in the Zend Framework, I've been in brief contact with Dmitry Stogov across a scattering of emails. Dmitry posted his OpenID proposal for the framework over at the Proposals Wiki earlier in the week. [...] It's actually very hard to comment constructively rather than simply handing over my code which probably says a lot more all by itself. [...] Anyway, I've agreed to port my OpenID library to PEAR as a PHP5 package. I checked with the mailing list, and the approach I've taken in splitting the library across a number of freestanding components hasn't seen any objections. On the flipside, it does help by providing upgrades to existing PEAR Encryption packages which are not yet migrated to PHP5 versions.

    And from post number two:

    Over the weekend, I managed to grab a few hours to dig around my OpenID library with the ultimate development tools: patience and experimentation. [...] What I've refactored towards is a splitting of the OpenID process based on three categories: Request, Redirect, Response.
    0 comments voice your opinion now!
    openid library zendframework pear refactor openid library zendframework pear refactor



    Greg Beaver's Blog:
    Quick review of Pixy vulnerability scanner for PEAR users
    June 25, 2007 @ 07:30:27

    Greg Bever has a (very) quick post about his experiences with the Pixy XSS and SQLI Scanner running against PEAR files.

    I tried out the Pixy XSS and SQLI Scanner (http://pixybox.seclab.tuwien.ac.at/pixy/index.php) on a few simple PEAR files. On the first, I got a java exception, on the second it was unable to resolve the simplest of includes (no ability to resolve include_path). In short, the thing is useless for anything written using PEAR. Fun!

    The Pixy XSS and SQLI Scanner is made to find SQL and XSS injection issues in scripts. It runs as a Java application and scans PHP4 source code to try to find problems. For more information on the scanner or to try it out for yourself, check out the project's homepage for documentation and downloads.

    0 comments voice your opinion now!
    review pixy vulnerability scanner pear xss sqlinjection review pixy vulnerability scanner pear xss sqlinjection


    PHP-Tools Blog:
    Testing FIT
    June 22, 2007 @ 07:45:00

    On the PHP-Tools blog, Gerd Schauffelberger has posted about a new PEAR package he's just created to implement the FIT testing protocol.

    Testing_FIT is the PHP and pearish version of Ward Cunningham's FIT http://fit.c2.com. As such it provides an easy to use framework for acceptance software tests.

    The package is a simple download and install and gives you four basic fixtures to use Action-, Column-, Row- and Primitve-Fixture (and a Summary-Fixture for stats purposes).

    0 comments voice your opinion now!
    fit pear package testingfit fixture fit pear package testingfit fixture


    Richard Heyes' Blog:
    PEARDB replacement class updated
    June 20, 2007 @ 08:43:00

    Richard Heyes has made some updates to his PEAR::DB replacement class today, including:

    • Added numCols() function to the DB_result object
    • Added seek() method to the DB_result object
    • Enabled you to specify the fetchmode for getRow() and getAll()
    • Made the test script easier to navigate
    • Added reset() method to the DB_result object

    You can find out more about the project here or just download this new version and check out the documentation to get you started.

    1 comment voice your opinion now!
    peardb class replacement pear database abstraction peardb class replacement pear database abstraction


    PEAR Blog:
    SVN and PEAR
    June 19, 2007 @ 08:34:00

    From the PEAR blog today comes a new post talking about the introduction of a much requested option when accessing the PEAR source code - SVN over CVS.

    As part of the PEAR2 project we are making that happen. I'm happy to announce that we now have an SVN repo ready for testing. Web access at http://svn.pear.php.net with the SVN url being http://svn.pear.php.net/repo.

    The access isn't quite available yet, but it will be as soon as they figure out how they want people to be able to access the parts of the PEAR2 source code. Keep an eye on the PEAR Blog for the latest.

    0 comments voice your opinion now!
    subversion svn pear cvs access subversion svn pear cvs access


    Community News:
    PEAR Project Looses Valued Contributor - Bertrand Gugger
    June 18, 2007 @ 09:26:13

    The PHP community, specifically the PEAR group has lost a member of their family - Bertrand Gugger (toggg), a valued contributor to the PEAR project.

    The PEAR Project has lost a member of its community. Bertrand Gugger (toggg) passed away in the night from June 16th to 17th after suffering a heart attack.

    Bertrand was involved in the maintenance of several important PEAR packages, including the Validate package family.

    Posted here, here, here and here is more information about his contributions to the PEAR project and personal experiences with him.

    0 comments voice your opinion now!
    pear project bertrandgugger contributor pear project bertrandgugger contributor



    DevShed:
    Databases and PHP
    June 14, 2007 @ 12:08:00

    DevShed has started a new series looking at working with PHP and databases with this new tutorial posted today, an excerpt from the O'Reilly book "Programming PHP, Second Edition".

    We focus on the PEAR DB system, which lets you use the same functions to access any database, rather than on the myriad database-specific extensions. In this chapter, you'll learn how to fetch data from the database, how to store data in the database, and how to handle errors. We finish with a sample application that shows how to put various database techniques into action.

    In this first part of the series, they look at what kinds of things are possible with the database connection, some of the basics of using the PEAR DB class and working with data source names to help with the connection.

    1 comment voice your opinion now!
    database tutorial pear oreilly excerpt programming database tutorial pear oreilly excerpt programming


    Travis Swicegood's Blog:
    Book Review The PEAR Installer Manifesto
    June 11, 2007 @ 07:47:00

    Travis Swicegood has posted a book review he's done on the PEAR Installer Manifesto, a book by Greg Beaver detailing the use of the PEAR installer, channels and the creation of a blogging application to put them both to use.

    From Travis' review:

    This past weekend I read through the PEAR Installer Manifesto. For anyone who's not familiar the PEAR installer and how it can be used in projects outside of PEAR, I would point them to this book. [...] This is a four star rating, so there were a few things that weren't exactly what I had hoped for. I hoped this would serve as a full reference to the installer. While this book takes you a lot of great jumping off points, it doesn't have the thoroughness I wanted.

    The book does cover things like how to create and work with PEAR channels and how to create a custom plug-in system by embedding the Installer into an application. Overall, he gives the book positive marks with only a few complaints (like the lack of a full reference to the installer being included).

    0 comments voice your opinion now!
    pear bookreview installer manifesto packt pear bookreview installer manifesto packt



    Community News:
    PEAR Installer version 1.6.0 released
    June 08, 2007 @ 12:06:00

    New from the PEAR blog today is an announcement about the official released of the latest version of the PEAR installer - 1.6.0.

    This release fixes a number of major regressions introduced in PEAR 1.5.2 that were not fixed in PEAR 1.5.3 or PEAR 1.5.4, and is recommended for immediate upgrade.

    The march to Pyrus, the next generation installer for PEAR, and the repository of packages designed for Pyrus (PEAR2) continues. Maintenance on 1.x will continue to contain bug fixes and security fixes, but the pace of new features is going to slow considerably.

    PEAR users can either download the latest package from the main PEAR site or just issue a "pear upgrade PEAR" command from their system to pull it down from the default PEAR channel.

    0 comments voice your opinion now!
    pear installer release upgrade pyrus pear installer release upgrade pyrus


    CodePoets.co.uk:
    How to use PHP and PEAR MDB2 (Tutorial)
    June 07, 2007 @ 13:56:00

    On CodePoets.co.uk, there's a new tutorial posted by David Goodwin showing how to use PHP with the PEAR MDB2 component to access your database backend.

    While writing some PHP Training materials for Pale Purple, I thought I'd add an updated guide on PHP and database access. I've already done one on PEAR::DB, but PEAR::MDB2 is it's successor and has a slightly different API.... and as PEAR::DB is now deprecated, it's probably about time I rewrote it anyway.

    David looks at what the MDB2 package is, how to install it, connecting to your database and including some error handling as well. He (thankfully) also touches on one of the most handy features of the package - the prepared statements and the security they can offer.

    0 comments voice your opinion now!
    pear component mdb2 database tutorial security preparedstatement pear component mdb2 database tutorial security preparedstatement


    Tony Bibbs' Blog:
    Geeklog_Generator 1.0.0 Released
    June 07, 2007 @ 11:17:00

    Tony Bibbs points out the latest release of the Geeklog_Generator PEAR package today, version 1.0.0.

    What is Geeklog_Generator? It's a package that compliments the great ORM implementation, Propel. What's missing from Propel, you ask? First and foremost, it's always annoyed me that Propel (more concisely, the Propel Generator) doesn't generate pure PHP model objects...objects that don't need to include a bunch of persistence level code.

    Geeklog_Generator gets around this by building minimal, pure PHP models (called Data Transfer Objects or DTO for short) that can not only be passed around easily via web services but it also but they can be quickly turned into the persistable Propel objects.

    Changes made for this release include "massive updates in preparation for GL2 GSoC and scafolding". You can grab the latest version of the package from its PEAR repository.

    0 comments voice your opinion now!
    geeklog propel object generatorp pear release geeklog propel object generatorp pear release


    David Coallier's Blog:
    PEARDB is Deprecated, Got It?
    June 04, 2007 @ 15:21:00

    In response to several other posts lately about the PEAR::DB package in PEAR (and things that could be done to improve it), David Coallier got a bit fed up and shared his opinion - "PEAR::DB is deprecated, got it?"

    All new features are made into MDB2 and not DB, the only thing that is being done on DB is security fixes. So MDB2 is first of all, faster, smaller (Because of it's driver and modularity), easier, and has more features (LOB handling, Iterator, etc) and better end-user documentation, quite solid docs indeed.

    Of course, the comments of the post are full of people arguing to keep it around and others that agree with David, especially in light of a MDB2 driver for the Zend Framework he mentions.

    0 comments voice your opinion now!
    pear db database mdb2 deprecated pear db database mdb2 deprecated


    Community News:
    PEAR Group Launches Blog - blog.pear.php.net
    June 04, 2007 @ 12:52:00

    The PEAR group, with some of the new leadership in place, has decided to start something that probably should have been in place long ago - the PEAR blog.

    Joshua Eichorn notes:

    We will be using it to make announcements and to ask the community for feedback. I think this is a big step towards making PEAR a more transparent project.

    So far, the most interesting post is the latest one mentioning PEAR's new installer - Pyrus - a (currently pre-devel) installer that will handle the PHP5+ PEAR packages to come.

    0 comments voice your opinion now!
    pear blog website pyrus pear blog website pyrus


    Greg Beaver's Blog:
    pear.php.net is now mirrored
    June 04, 2007 @ 12:03:00

    As Greg Beaver mentions in his latest blog entry, the main website for PEAR, pear.php.net has been mirrored as part of an effort to restructure and "revamp" the PEAR wesbite.

    I'm excited to announce the first two mirrors of pear.php.net are now actively mirroring the installer REST files and actual .tgz files of package releases. They are http://us.pear.php.net (provided by Joshua Eichorn and bluga.net) and http://de.pear.php.net (provided by Christian Weiske). The option exists at a future date of mirroring the entire website, but this will not be possible without further changes to the infrastructure.

    Using these servers is only slightly different than the main site, setting the preferred_mirror setting in your configuration to use one of the above.

    4 comments voice your opinion now!
    pear website mirror mirror preferred configuration pear website mirror mirror preferred configuration



    Dave Dash's Blog:
    Installing a PHP that can do symfony+doctrine on Dreamhost
    June 01, 2007 @ 21:15:00

    Dave Dash has posted guide to setting up a PHP installation that can work with both the Symfony framework and the doctrine functionality on a Dreamhost server.

    Lately I've been experimenting with Doctrine on a few projects. It does have some requirements, including the PDO layer of PHP 5.2. Things didn't work right off the bat on Dreamhost (which I still use for non-critical things), so I opted to build my own php.

    The post is basically a cut and paste of a handy "install all" script you can customize to match your installation preferences.

    0 comments voice your opinion now!
    install dreamhost symfony doctrine script install dreamhost symfony doctrine script


    DevShed:
    PHP, MySQL and the PEAR Database
    June 01, 2007 @ 12:28:00

    Wrapping up a three-part series today, DevShed has posted part three of their look at combining PHP and MySQL with their final excerpt from the O'Reilly book "Learning PHP and MySQL" (Michele Davis and Jon Phillips).

    In this conclusion to a three-part series, you will add PEAR into the mix of what you have already learned.

    They show the installation of the needed PEAR classes, translating the previous example from the MySQL functions to use the PEAR class - writing, executing, and returning the results from the database.

    0 comments voice your opinion now!
    pear dataase tutorial mysql pear dataase tutorial mysql


    WebReference.com:
    Security Techniques Part 2
    May 29, 2007 @ 12:02:00

    WebReference.com has posted part two in their series looking at security techniques in PHP. This time they focus on the use of a few things - the PECL filter, the PEAR Auth module and mcrypt.

    For each of the three topics covered, they include a few code examples on their use - an HTML form with the filter extension, user authentication with the PEAR Auth, and encrypting data to be used in a more secure cookie.

    The article is excerpted from PHP 5 Advanced: Visual QuickPro Guide by Larry Ullman.

    0 comments voice your opinion now!
    security technique tutorial filter pecl pear auth mcrypt security technique tutorial filter pecl pear auth mcrypt


    Joshua Eichorn's Blog:
    Slides from azPHP presentation of PEAR An Introduction
    May 29, 2007 @ 08:46:00

    Joshua Eichorn has posted some slides that he presented at a local PHP User Group meeting just passed that serve as an introduction to PEAR.

    I'm hoping to improve the slides a bit and give this presentation at lots of other places. If any PHP User groups on the west coast would like me to do a presentation about PEAR drop my a line.

    To help further the cause of PEAR, he's also offering the slides in an archived file for presentation anywhere.

    0 comments voice your opinion now!
    slides pear usergroup azphp pear introduction slides pear usergroup azphp pear introduction


    Sara Golemon's Blog:
    Why isn't this in PEAR?
    May 23, 2007 @ 10:23:00

    Sara Golemon describes the path she took in a search for an OpenID library to work with in PHP. The trip took her through both PEAR and PECL with no promising results. Heading off to a Yahoo! search she comes up with one good result - Auth_OpenID.

    Now, granted, this is the first OpenID system I've looked at, and I haven't really dug into it in depth, but I've got to say, this is some clean, well written code and the author clearly understands the maths involved (or at least fakes it shockingly good).

    Knowing this, she asks "why isn't this in PEAR" if it's so well-structured and useful? It works with any version of PHP from 4 up and is smart enough to adapt itself to whatever the structure of your application might be.

    There's also some great comments on the post where it's explained why the library isn't in PEAR, another OpenID package for PHP and suggestions for alternate distribution methods (PEAR channel).

    0 comments voice your opinion now!
    openid authopenid package pear php4 php5 openid authopenid package pear php4 php5




    Joshua Eichorn's Blog:
    Thanks for your thoughts on improving PEAR
    May 08, 2007 @ 15:02:00

    Following up from a previous post of his that got lots of great feedback, Joshua Eichorn has posted his own thanks, not only for the responses to his own thoughts but to the PEAR community as a whole.

    You'll be happy to know that were already working on many of your suggestions, Greg's post on the subject has some more details. I'll be sharing everyones comments with the rest of the PEAR group at our meeting on the 13th, so if anyone has a suggestion they haven't submitted yet thats your deadline.

    The thing he's most excited about is the new mentoring program that will introduce new developers to the PEAR-ality of it all and get them involved with both the coding and the community.

    0 comments voice your opinion now!
    improving pear thoughts mentor program improving pear thoughts mentor program


    Travis Swicegood's Blog:
    With friends like these... (or a PEAR Contribution Story)
    May 08, 2007 @ 09:31:00

    So, what happens if you try to contribute back to the community, specifically the PEAR project, and you get shot down for a proposal - even a simple one? Travis Swicegood found out:

    Yesterday I proposed my first PEAR package. I've helped a few friends with packages of their own, but never got around to getting a developer account and taking the lead on a package. After hearing about the recent changes in store and the umpteenth "you should propose that" from Josh, I decided to propose one of the smaller "packages" I've used in some of my code: PHP_Callback. I say packages with quotation marks because it's really just one, simple file.

    The problem wasn't in the proposal, but in the immediate responses he received for it - "it's useless", "this isn't the correct way to do this" and "it's too easy to implement on its own, it doesn't need to be in the library".

    Travis' response was to be expected:

    One most new-to-PHP programmers could have put together in an afternoon. I can only imagine how quickly a new developer would have unsubscribed from pear-dev and pulled his proposal if his first foray into contributing to the community had been met so quickly with such unconstructive criticism.

    0 comments voice your opinion now!
    pear contribue phpcallback comments pear contribue phpcallback comments


    Greg Beaver's Blog:
    Is anything working in PEAR?
    May 07, 2007 @ 16:07:00

    In response to an earlier blog post from another member of the PHP community, Greg Beaver has posted a few thoughts he's had on sharing what's really going on with the PEAR project.

    Newly elected PEAR Group member Josh Eichorn posted a blog entry, "How would you improve PEAR" recently. I was impressed with the response, it seems many people outside of PEAR are monitoring it and have thought about how to make it better. However, I was also not so impressed with the poor job we've done letting people know about the newest improvements to PEAR. In my comments, I listed as many as I could think of, but Josh pointed out that I would do well to post these comments in a more public setting, so here goes.

    He notes that most of the items mentioned in the comments of Joshua's post are already implemented, save for one - CVS over Subversion. He also shares his renewed obligation of working on the social issues surrounding the project and the efforts that the project is doing to help current developers (stable works the same) and development (get involved! get active!).

    0 comments voice your opinion now!
    pear project social issue comment improve public pear project social issue comment improve public



    Joshua Eichorn's Blog:
    How would you improve PEAR?
    May 04, 2007 @ 08:54:00

    Joshua Eichorn is asking for your opinion. He wants some feedback from the community - both PEAR users and not - on how to make what PEAR has to offer even better.

    If you were a member of the PEAR group what would you change about PEAR. Please keep in mind were not an all powerful body (Read the constitution for details), but we do have the ability to set policy, and like in any open source project we can make changes through our direct actions.

    One comment has already been made with three points: the bundling of PEAR modules into applications, the introduction of a lightweight database layer and making some of the package dependencies a little lighter.

    0 comments voice your opinion now!
    improve pear library project constitution improve pear library project constitution


    PHP-Coding-Practices.com:
    PHP Code-Beautifier Tool
    May 03, 2007 @ 07:54:00

    On PHP-Coding-Practices.com, there's a new post pointing out a code beautification tool Tim dug up the (aptly named) "PHP Code Beautifier".

    Today I discovered a good tool for beautifying existing PHP Code. It works via a web interface. You can either upload a script or directly input it. The code is beautified according to the PHP PEAR Standard Requirements. It does not change or debug your code in any way.

    He lists the things it can do for you and your code including setting indents to four spaces, uses the "one true brace" style for function definitions, and removes spaces between things like function calls, parenthesis and beginning of argument list.

    You can check out the application and get information on more of the updates it will make on the project's homepage.

    2 comments voice your opinion now!
    beautifier download pear standard beautifier download pear standard


    David Coallier's Blog:
    PEAR Elections Ended! Time to get some work done!
    May 01, 2007 @ 11:54:00

    As posted about on his blog today, David Coallier and others have been voted into the new PEAR group's team:

    I would like to say thanks to everyone who has voted for both the rest of the Team, and I :-). So the new PEAR Group team is built of the following members: Martin Jansen, Arnaud Limbourg, Joshua Eichorn, Christian Weiske, Helgi Thormar, Paul M. Jones, Justin Patrin and finally myself David Coallier.

    Team, here we go, let's get some good and solid work done! I am looking forward for such cooperation with both PEAR contributors and other frameworks out there!

    He also includes a lengthy listing of some of his personal work for the upcoming months, including work on several of the PEAR pcakges - MDB2, Text_CAPTCHA_Numeral, pearweb (the PEAR website), Image_Transform, and HTML_AJAX.

    0 comments voice your opinion now!
    pear election group member vote pear election group member vote




    Community News:
    PEAR Elections Happen Today
    April 20, 2007 @ 07:48:00

    As mentioned by Elizabeth Naramore in this new post to the php|architect site, the PEAR elections are happening today to help vote a bit of new life into the PEAR group.

    This is a reminder to get out and vote for your favorite PEAR contenders who wish to be part of the new PEAR governing group.

    The vote is for PEAR developers only, so the rest of the community will just need to wait and see the outcome. She also references this post from Joshua Eichorn with several of the candidates' names and links to their PEAR pages for a list of the projects they've worked with. Included in the list are Joshua himself, David Coallier, and Paul Jones (of the Solar framework).

    0 comments voice your opinion now!
    pear election group nominee pear election group nominee


    Stoyan Stefanov's Blog:
    Image_Text 0.6 beta is out
    April 19, 2007 @ 07:47:00

    In a new entry today, Stoyan Stefanov announces the beta release of the PEAR image manipulation package, Image_Text 0.6 (beta).

    This is my first PEAR release and I was actually surprised how easy it is to package and roll out a release.

    He also briefly describes the PEAR package release process (simple from his perspective) and what's required to make things go smoothly.

    Image_Text Description:

    The package provides a comfortable interface to text manipulations in GD images. Beside common Freetype2 functionality it offers to handle texts in a graphic- or office-tool like way. For example it allows alignment of texts inside a text box, rotation (around the top left corner of a text box or it's center point) and the automatic measurizement of the optimal font size for a given text box.
    0 comments voice your opinion now!
    imagetext pear package release beta imagetext pear package release beta



    SitePoint PHP Blog:
    Markup Separation with Template IT
    April 13, 2007 @ 09:42:00

    In a new post to the SitePoint PHP Blog today, Ian Muir shows you how to keep thing separated using the HTML Template IT extension. It helps prevent application functionality and logic from seeping its way into your output.

    One of the more challenging things I've run into while doing PHP development is effectively separating presentation from program logic. In many projects, I felt I was doing a great job until I had to do a markup change and jump through a lot hurdles to make it happen. In my recent projects, I've starting using the HTML Template IT extension in PEAR, and its made things a lot easier.

    By way of example, he gives code blocks - one showing an example template and the other how to populate it with your own data. You can get more information on the extension from it's PEAR page.

    0 comments voice your opinion now!
    tutorial searation template pear extension markup tutorial searation template pear extension markup



    Joshua Eichorn's Blog:
    Testing phpDocumentor 1.3.2
    April 03, 2007 @ 09:01:00

    Joshua Eichorn makes a request of the community to help out with some testing for the phpDocumentor project:

    The phpDocumentor team is just about ready to do a bug fix release. The code is sitting on the server and ready to be uploaded, we just want to get some extra testing done.

    If you could install 1.3.2 do your normal documentation run, and leave a note on this post I'd be grateful. The bug fixes have all been tested but you never know what can creep in during the packaging process.

    He links to the PEAR download, includes the "pear upgrade" command to install it, and links to the non-PEAR download for the rest of the group.

    0 comments voice your opinion now!
    phpdocumentor testing release download pear phpdocumentor testing release download pear



    David Coallier's Blog:
    PEAR is using jQuery et new features
    March 28, 2007 @ 11:02:00

    David Coallier points out a new feature of the main PEAR website (http://pear.php.net) - integration of the jQuery framework to help with the administration of a recent addition to the site, user comments.

    http://pear.php.net is now using jQuery for some sections of the administration area in order to view user notes/comments and that I will be starting implementing more sections over the site within the next few weeks (Of course this will all be done once we have split the code completely into templates, views, controllers, MDB2 move, etc)

    He also makes some comments about the number of Javascript frameworks out there and a mention of the roadmap for the rest of the features they plan to add to the PEAR site.

    0 comments voice your opinion now!
    pear website jquery administration integrate user comment note pear website jquery administration integrate user comment note


    Joshua Eichorn's Blog:
    Pear Mirror
    March 28, 2007 @ 10:19:00

    Joshua Eichorn has posted a quick note about a new addition to the PEAR functionality (with some help from Greg Beaver) - hosting a mirror of the main PEAR channel.

    At the moment were only mirroring installer data not the entire website but its a start. Things are still in the testing phase, but the mirror is usable, just run: pear config-set preferred_mirror us.pear.php.net

    The update runs every four hours, so thing might be a little out of sync sometimes, but if you're just looking to keep things up-to-date, that's more than enough.

    0 comments voice your opinion now!
    pear mirror hosting channel sync update pear mirror hosting channel sync update



    Amir Saied's Blog:
    PEAR XML_XUL at International PHP Magazine
    March 22, 2007 @ 06:57:36

    Amir Saied has pointed out an article that he's done for the International PHP Magazine that's been published in this month's edition. IT's a look at generating XUL pages on the fly with PHP.

    From the International PHP Magazine website:

    Have you ever wanted to write a Web application that truly seems like a desktop application and has its functionality too? And did the tons of CSS you'd have to do scare you? Gecko-based browsers are awesome to render pages properly and are compatible with the latest standards. You can use XUL's magic to make a Web application look exactly like its desktop alternate. The article explains XUL and how to use PEAR's XUL package to generate XUL pages on the fly.

    Be sure to check the rest of the issue too - there's articles on Ajax hype, working with REST, security tools, and the continuation of a beginner's series on PHP.

    0 comments voice your opinion now!
    pear xmlxul dynamic article itnlphpmag pear xmlxul dynamic article itnlphpmag



    Tony Bibbs' Blog:
    HOWTO Deploy Your Application Using PEAR
    March 15, 2007 @ 12:43:00

    Tony Bibbs has posted a handy howto guide on publishing your application via a PEAR channel:

    I have produced a HOWTO for both our system administrators and our developers. I've condensed this down to be a bit more generic and useful to anybody looking to establish their own PEAR Channel for the same purpose. My example hereon is that your channel is at pear.example.com.

    Come along on the journey of a developer making their very first PEAR package and deploying it to a PEAR channel using a real-word example. Seasoned PHP developers be packaging and deploying PEAR compatible packages in no time.

    He walks you through how to install the PEAR package creator, package up your application into a PEAR package, and how to make it available anyone and everyone that wants to give it a shot (including the PEAR commands they'll need to get it).

    0 comments voice your opinion now!
    howto tutorial package application pear channel download howto tutorial package application pear channel download



    Lukas Smith's Blog:
    Database abstraction mailing list
    March 09, 2007 @ 08:03:00

    In an effort to somewhat unify the authors of the wide range of PHP database abstraction layers out there in the community, Lukas Smith has proposed a "doctrine miling list" for the discussion of things "like best practices, new discoveries, challenges, etc".

    Now I am hoping that all of you are reading this. I know quite a few of you pretty well already (John, Hans, Manuel etc.). [...] So please everybody come out of the woodwork, send me a mail or post a comment.

    While I think its fine for end users to also join the list, the goal is not to create a list for end users to ask questions, but more for people who actively develop database abstraction layers. End users should better go to the respective mailing lists.

    Ian P. Christian has already stepped up to the plate and is offering a mailing list that you, the database abstraction developer can subscribe to - mailto:phpdbabstraction+subscribe@lists.pengus.net. Be sure to check out the comments for more great discussion.

    0 comments voice your opinion now!
    database abstraction layer mailing list doctrine database abstraction layer mailing list doctrine


    Lukas Smith's Blog:
    PEAR (and The Constitution Election)
    March 07, 2007 @ 09:58:00

    In a quick post to his blog, Lukas Smith notes his support of the recent announcement of the PEAR elections.

    I am confident that both of the proposals will help in improving collaboration in PEAR, mainly because they basically provide the same organization we used to have for all of PEAR (which worked great in the beginning), now for categories of related packages.

    He reasons that, since PEAR is such a huge project, it needs this kind of approach - a method to the madness - to help keep the project on the right path.

    0 comments voice your opinion now!
    pear election support project constitution vote pear election support project constitution vote


    Greg Beaver's Blog:
    Holy Release Party, Batman
    March 06, 2007 @ 09:11:00

    Greg Beaver points out the numerous releases that were made in the PEAR community today - including an update to the PEAR website itself.

    OK, today's release party wins. I've just uploaded the 8th package for release, and it's a very significant day of releases.

    The three updates made today are:

    0 comments voice your opinion now!
    release pear website patch track parsergenerator phpparser docblockparser release pear website patch track parsergenerator phpparser docblockparser



    Zend Developer Zone:
    Zend Framework Gets An Unofficial PEAR Channel
    March 02, 2007 @ 09:25:00

    As mentioned in this new post to the Zend Developer Zone, the Zend Framework has been set up on an "unofficial PEAR channel" you can install the popular framework from.

    The author, Geoffrey, with some help from Arnaud Limbourg, has created a PEAR channel to use in installing Zend Framework. As with any PEAR channel, the first thing you have to do is tell PEAR to go "discover" the channel.

    Cal gives the simple commands to get the process underway, showing both how to discover and install the framework from this new resource.

    0 comments voice your opinion now!
    zendframework pear channel unofficial discover install zendframework pear channel unofficial discover install



    Builder.com.au:
    Get the correct time by converting between time zones with PHP and PEAR
    February 23, 2007 @ 10:11:00

    On the Builder.com.au website today, there's a quick new tutorial on grabbing the correct time for a user's "home" rather than the server's time.

    PHP comes with an extensive catalog of date and time functions, all designed to let you easily retrieve temporal information, massage it into a format you require, and either use it in a calculation or display it to the user. However, if you'd like to do something more complicated, things get much, much hairier

    To make things easier, they enlist the service of the PEAR Date package to help bridge the gap between the time zones faster. They give some of the basics of using the package before actually getting into the time zone conversion. The code is pretty straight-forward and they even include other simple tips like how to calculate the GMT offset and how to add and subtract timespans.

    0 comments voice your opinion now!
    timezone pear date package difference gmt offset timezone pear date package difference gmt offset


    Greg Beaver's Blog:
    Vote in the first PEAR election
    February 23, 2007 @ 08:41:00

    Greg Beaver has announced an "official referendum on the future of PEAR" that he has set in motion to get PEAR developers voting on proposals for where PEAR should be going.

    As of February 22, 2007, I have called an official referendum on the future of PEAR. There is a news item on the front page of pear.php.net with the same instructions in this message. This election is only open to PEAR developers who have contributed to the development of a PEAR package at any time in history, but you must have the ability to log in at pear.php.net, and must have "pear.dev" karma.

    There's three options - "don't change anything", Greg's constitution, or Anant Narayanan's constitution. The results will pick the path that PEAR will follow and the future of the project. If you have access and the pear.dev karma, head over here and cast your vote today.

    4 comments voice your opinion now!
    pear vote constitution future project direction pear vote constitution future project direction


    Pádraic Brady's Blog:
    OpenID library for the Zend Framework?
    February 21, 2007 @ 07:53:00

    In a new post today, Pádraic Brady takes a look at the OpenID library included in the Zend Framework and his own efforts to create functionality of his own.

    Here in the present, everyone I work with is all too aware of OpenID. [...] Enter the Zend Framework. If you've ever looked under the hood of the JanRain PHP-Openid library you'll notice they implement all of this without a single dependency on PEAR or other external classes.

    He notes that this application of the "Not Invented Here" method that the Zend Framework follows might not be the best when there are already plenty of libraries out there that help with this exact functionality. He mentions a PEAR class that helps with it, but is written in PHP4 and hasn't quite been optimized.

    0 comments voice your opinion now!
    openid library zendframework pear class library openid library zendframework pear class library




    Greg Beaver's Blog:
    Synchronize live and development sites using the PEAR Installer
    February 12, 2007 @ 12:48:00

    Greg Beaver, PEAR guru extraordinaire, has added a new post to his blog encouraging the use of the PEAR installer to help manage and deploy your website to a production server.

    One of the most common tasks that we experience as web developers is synchronizing a development web server with a live site. There are many solutions that have been tried before. [...] However, every single method (described above) has the potential for immediate and catastrophic failure, even with a backup.

    He suggests the use of the PEAR installer functionality along with version control to easily deploy a site, allowing for things file dependencies and versioning. So, if files are handled through that package, how is the database managed? Through another PEAR-related feature - the post-install database initialization the Installer makes possible. Check out Greg's post for the full details on how to get you and your site started.

    0 comments voice your opinion now!
    synchronize live developmentn website pear installer version control database synchronize live developmentn website pear installer version control database



    IBM developerWorks:
    A step-by-step guide to publishing your own PEAR channels
    February 07, 2007 @ 09:57:00

    As mentioned over on the Zend Developer Zone, the IBM developerWorks website has posted a a new tutorial with a hand-holding guide to the creation of your own PEAR channels.

    This tutorial discusses channels, introduces and explains the channel.xml file, and demonstrates how to build a channel for distributing packages. Channels are ordinarily used to expose PEAR packages through the Internet, but enterprises can uses channels to make distribution of enterprise-specific PHP code easy.

    You'll need to log in to the IBM developerWorks website to get to the good stuff (you do have a login, don't you?), but once you do, you'll find a guide that goes through:

    • what PEAR is and what PEAR channels are
    • channel management (including the channel.xml file)
    • building the XML-RPC methods
    • publishing the channel
    • installing and upgrading a test package
    • and some troubleshooting hints and further resources

    0 comments voice your opinion now!
    pear channel tutorial publish guide package xmlrpc pear channel tutorial publish guide package xmlrpc


    Greg Beaver's Blog:
    Introducing pecl extension phar
    February 07, 2007 @ 08:25:00

    On his blog today, Greg Beaver has introduced a new pecl extension to add the phar functionality into any PHP installation as easily as adding any other pecl functionality.

    After 14 months and nearly 200 commits, Marcus Borger and I have finished the first release of the phar extension in PECL. Phar provides both a stream wrapper (phar://) and a Phar class which can be used to access the contents of a phar archive. What is a phar archive? Think of it as a virtual filesystem that is customized for use with PHP, sort of like a Java .jar archive. Incidentally, the phar extension is a C implementation of the principles behind the PHP_Archive PEAR package.

    A beginners guide to installation and usage is included, showing how to configure your installation and create two simple packages - one with a simple "Hello world" PHP script inside and the other grabbing the entire contents of a directory (and subdirectories) and pushing them in.

    0 comments voice your opinion now!
    phar pecl extension phparchive pear package guide install configure phar pecl extension phparchive pear package guide install configure



    Zend Developer Zone:
    Book Review - PHP Programming with PEAR
    February 02, 2007 @ 19:04:00

    Cal Evans of the Zend Developer Zone has posted a new book review of one of Packt Publishing's latest PHP-related offerings - "PHP Programming with PEAR".

    For those who have been living under a virtual rock for a while now, PEAR is the "PHP Extension and Application Repository". In a nutshell, it is a collection of classes, it's a framework, and it's a distribution system. Most importantly though, it's an excellent place to find the classes you need so you don't have to re-invent the wheel. (Ok, beginner's time is over, I promise).

    PHP Programming with PEAR, written by Stephen Schmidt, Carsten Lucke, Stoyan Stefanov and Aaron Wormus, takes a look at some important PEAR classes and how you can use them.

    He mentions what the book covers (which packages) and highlights some of his favorite bits, including the chapter on web services.

    0 comments voice your opinion now!
    pear book review packt package webservice mdb2 xml pear book review packt package webservice mdb2 xml


    Lorenzo Alberton's Blog:
    Things are moving... (PEAR Package Updates)
    February 01, 2007 @ 09:48:00

    Lorenzo Alberton has posted some updates about the PEAR packages that he maintains to his blog today including MDB_QueryTool, Mail_Queue2, MDB2, and Translation2.

    Even if lately I've been coding way more in C/C++ than in PHP, I still keep an eye on PEAR developement: I reckon in the last month I've closed a bug a day, on average. And after my last call for help about my PEAR packages, I'm also pleased to announce that someone did indeed offer a hand. I'm happy to welcome not one, but two new developers!

    Each of the items has links to their PEAR homepage and a few quick words on where the package stands (including developers involved or wanting to get involved). He also reminds developers out there that they can help out too if they want to jump in and get into PEAR.

    0 comments voice your opinion now!
    pear update package mdbquerytool mailqueue mdb2translation2 pear update package mdbquerytool mailqueue mdb2translation2



    Cyberlot's Blog:
    PHP bugs, whos responsible? Do they even read them?
    January 26, 2007 @ 10:43:00

    In this new post to his blog, Richard Thomas talks about a bug issue that he's "gotten in the middle of" and the conflict between the PHP group and the PEAR developers that came out of it.

    Today I managed to get right in the middle of this. [...] Both pear and php are pointing the fingers at each other, neither seem to be able to work together and Im not even sure if either one of them has even taken the time to run my test code and realize what the issue is to begin with.

    The problem comes when he created a a script with the Pear Mail, Mail_mime and Net_SMTP PEAR classes and, following the execution of the rest of the script, tried it both ways - turning the erro reporting back off or not messing with it at all. As a result, the code with the ending error_reporting() call throws an error, the one without does not.

    Unfortunately, at the time of this writing both sides are still pointing at the other for blame on the issue.

    5 comments voice your opinion now!
    bug responsible bugfix report pear errorreporting bug responsible bugfix report pear errorreporting


    PHPBuilder.com:
    Foundations of Pear Authentication
    January 26, 2007 @ 08:37:00

    PHPBuilder.com has posted a new article (an excerpt from the "Foundations of PEAR" book from APress) focusing on the authentication aspect and components PEAR has to offer.

    After all, nearly all authentication is identical in its basic functionality, and there's usually no good reason to spin off your own code if it's already written for you.

    They talk about three packages - the Auth package, Auth_HTTP, and the Auth_PrefManager. They describe the Auth package in depth in this article - common uses, related packages, required packages, what the constructor is like and descriptions of the functions the package provides.

    0 comments voice your opinion now!
    pear foundation authentication article excerpt apress pear foundation authentication article excerpt apress


    Greg Beaver's Blog:
    Mac OS X ships with security hole-laden PEAR - how to upgrade immediately
    January 25, 2007 @ 06:59:45

    Mac OS X PHP developers, listen up - Greg Beaver has a word of advice for you about your default PEAR installation:

    I won't get into the questionable business practice of shipping software with known security holes that have had known fixes for years. Instead, I would like to offer simple step-by-step instructions of how to upgrade from outdated buggy PEAR versions to the latest stable release, 1.5.0.

    You're five simple steps away from having an upgraded installation, all using the built-in pear installer and go-pear functionality.

    0 comments voice your opinion now!
    macosx security hole pear version upgrade simple gopear macosx security hole pear version upgrade simple gopear


    Community News:
    PEAR Version 1.5.0 Released
    January 24, 2007 @ 07:33:00

    The PEAR group is happy to announce the release of the latest version of the popular package system for PHP - PEAR 1.5.0. Changes in the new version include extension enabling in php.ini, implementing TAP output option for run-tests command, recognize deprecated package/channel and display to user, and much more.

    The community is also talking about the release:

    You can get the full information on this new release from the PEAR website or just head straight to the download page and grab the update.

    0 comments voice your opinion now!
    pear release package manager base pear release package manager base



    Stoyan Stefanov's Blog:
    Performance tunning with PEARDB
    January 17, 2007 @ 09:35:00

    Stoyan Stefanov has posted some of his tips to his blog today. Specifically, they deal with the PEAR::DB class, demonstrating some of the optimization of the package he's discovered in his coding experience.

    If you use PEAR::MDB2, you can set a custom debug handler and collect all the queries you execute for debugging and performance tunning purposes, as shown before. But what if you're using PEAR::DB? Well, since PEAR::DB doesn't allow you such a functionality out of the box, you can hack it a bit to get similar results.

    He creates a simple app to help with the illustration - a number of select queries to grab zipcode information from the database. As it stands, the PEAR::DB package doesn't handle the debugging well, so he adds in a few more lines to buffer the connection and some reporting code to check the resulting output (as well as some of his sample reports).

    0 comments voice your opinion now!
    pear package peardb performance tuning buffer connection reporting pear package peardb performance tuning buffer connection reporting



    PHP in Action Blog:
    Using Selenium with SimpleTest
    January 11, 2007 @ 07:42:00

    From the "PHP in Action" blog, there comes this guide to integrating SimpleTest to make for even more complete testing of your applications.

    From reading all this, you might get the idea that you can't run Selenium from SimpleTest. That's not the case. All you need is to call the PEAR package Testing_Selenium directly. It's slightly more typing than an API that is built into the test framework, but it won't kill you.

    They list the steps you'll need to follow to get things working, but don't provide much more than that. There's a simple script included that you can test the installation with that makes a request to Google for the term "hello world design patterns" and asserts two different patterns to look for.

    1 comment voice your opinion now!
    selenium simpletest integrate install pear package testingselenium selenium simpletest integrate install pear package testingselenium


    Stoyan Stefanov's Blog:
    Using PEAR and AWS to keep an eye on Amazon
    January 11, 2007 @ 06:59:59

    On his blog today, Stoyan Stefanov shows how to use a PEAR package - PEAR::Services_Amazon - to "keep an eye on" Amazon's stats for a book.

    I wanted to have a page that shows the books I've written, together with their Amazon sales rank and the average customer rating and number of reviews. It's really easy. I took one example out of the PEAR book and slightly modified it.

    The script needs to few things to get up and running, so he points out those (an AWS id, the PEAR pacakge) and the simple path the application will take to grab the information (request/response). Then it's on to the actual PHP code - all 60 lines of it, including the HTML for the output.

    It makes the request with the Services_Amazon package for the given item numbers (he happened to have already) and pulls the results back, looping through them displaying sales rank, title, author, the average rating, and the number of total customer reviews - all in a handy unordered list.

    0 comments voice your opinion now!
    amazone pear pacakge servicesamazon salesrank reviews rating amazone pear pacakge servicesamazon salesrank reviews rating


    Greg Beaver's Blog:
    problem with PHP_Archive-based phars tracked to odd unpack() bug
    January 08, 2007 @ 11:02:00

    Users of the PHP_Archive PEAR package should check out Greg Beaver's latest post for some information about the latest version of the package:

    I just pushed out a release of PHP_Archive 0.9.1. This release fixes a bug that affects 64-bit users of PHP 5.2 and newer. Basically, the unpack() function does not behave in a predictable way when unpacking large integers. This is a known bug, and is documented at the manual page, although I was unaware of the issue until today.

    He gives the example code that would cause the problem and a more correct version that would allow the package to work with all versions of PHP (previously, it would fail due to a bad return from pack). The latest version of the package can be grabbed from it PEAR page or via the "pear" command to grab it automatically.

    0 comments voice your opinion now!
    phparchive pear package bug pack release phar phparchive pear package bug pack release phar


    William Candillon's Blog:
    phpAspect alpha 0.1.0 is released!
    January 08, 2007 @ 08:36:00

    William Candillon has made two new advances in his phpAspect project - first, he's moved the project to its own blog and second, he's officially released a new version of the library.

    I took advantage of the end-year holiday period to work on my Google Summer of Code project and I'm very pleased to announce the release of phpAspect alpha 0.1.0.

    He's started the documentation (downloadable here) and seems excited about where the project is heading and how much support there's been to see it succeed. Sebastian Bergmann has also posted some of his own support.

    0 comments voice your opinion now!
    phpaspect release blog alpha parsetree pear documentation phpaspect release blog alpha parsetree pear documentation



    David Coallier's Blog:
    Text_CAPTCHA_Numeral goes stable
    January 05, 2007 @ 07:07:00

    David Coallier has a quick post to his blog today about a great change in the Text_CAPTCHA_Numeral PEAR package - its move to stable.

    I have just made Text_CAPTCHA_Numeral go into stable state as it is not an overly complex package and it's simplicity is working very well.

    Interface support is also included in the package (in "Text/CAPTCHA/Numeral/interfaces/NumeralInterface.php"). Check out the package's page on the PEAR website for more details and the downloads.

    0 comments voice your opinion now!
    pear package textcaptchanumeral stable download interface pear package textcaptchanumeral stable download interface


    Manfred Weber's Blog:
    Consuming PHP SOAP Webservices with Flash - Part I
    January 03, 2007 @ 09:40:00

    Manfred Weber has posted the first part of a quick series looking at pulling information from a PHP-generated SOAP web service inside of a Flash document.

    A PHP Pear package to easily create Webservices and WSDL. After several tests with PHP and C# I thought it is time to find a better way in Flash to create backend-driven applications.

    He starts with the creation of a simple web service that just returns a string ("Hello!") including what the information page would look like in a browser. Next up is building the Flash side of things - using the serivces.WebService object already in Flash to pull in the info for the service and make the call to the "hello" method.

    0 comments voice your opinion now!
    flash soap webservice consume serviceswebservice pear package flash soap webservice consume serviceswebservice pear package



    Manfred Weber's Blog:
    Services_Webservice Beta!
    December 28, 2006 @ 08:33:00

    Manfred has announce the beta release of the Services_Webservice PEAR package today:

    found some time to reactivate Services_Webservice and release the beta version. This package has been in alpha state since more then a year. You can download the version on the pear website. Additional information about the package are available here.

    He also includes a few tests to give you an idea of how the package works - working with simple calls, class types, arrays, and class arrays.

    0 comments voice your opinion now!
    pear package servicewebservice beta release pear package servicewebservice beta release


    Brett Bieber's Blog:
    Chiara_PEAR_Server Release Droplet for Mac OS X
    December 27, 2006 @ 14:30:54

    As Brett Bieber mentions in this new blog entry, there's been an OS X release of the Chiara_PEAR_Server package (a "droplet").

    This is a Mac OS X droplet for PEAR developers that run Chiara_PEAR_Server. This little droplet just takes in your PEAR Package .tgz and it will release it to Chiara_PEAR_Server.

    He idea of the droplet is to automate the packaging process for a tgz file to post it out to a PEAR channel server. Sounds quite handy - check it out for yourself by grabbing the source from svn.saltybeagle.com.

    0 comments voice your opinion now!
    osx mac package pear chiara server channel automatic osx mac package pear chiara server channel automatic



    Greg Beaver's Blog:
    Interesting, potentially critical bug in PEAR
    December 20, 2006 @ 13:16:39

    Following right on the heels of a different PEAR problem, Greg Beaver has posted about a similar PEAR-related issue that could cause some serious problems for you and your installation.

    After investigating (which in my case meant briefly recalling from memory how PEAR actually validates dependencies), I remembered that PEAR validates dependencies twice, once prior to download, and once prior to installation. By the time the dependencies are sorted, PEAR assumes that the sort algorithm properly sorts things.

    This is actually a pretty reasonable assumption considering the unit tests that are in place to test this. However, like all regression testing, the unit tests test boundaries and likely cases, but not all possible inputs.

    So, to try to figure out where things might have gone wrong, Greg does a little research to find the problem. He discovers that it has to do with the order that the "subpackages" for the dependencies are installed, where the contents of those files are not removed correctly before installation, resulting in a file conflict.

    0 comments voice your opinion now!
    pear critical install dependency package subpackage file conflict pear critical install dependency package subpackage file conflict


    Greg Beaver's Blog:
    Be careful of PEAR 1.4.4 and older installs when uninstalling a package
    December 19, 2006 @ 09:45:00

    Greg Beaver has a warning for those developers using an older version of PEAR (1.4.4 and older) and uninstalling packages - a bug that might cause issues from an unauthorized uninstallation.

    Recently, a curious bug was opened at pear.php.net for the PEAR package (#9639). In it, a user was able to uninstall the Structures_DataGrid package, even though all of its subpackages were installed, which should have prevented uninstallation.

    There's been a key update to the dependency module that keeps this sort of thing from happening, but it's only in versions 1.4.5 and higher. Greg also recommends the reinstall of any packages that you've installed before and up to version 1.4.4 just to ensure that the dependency database is up to date.

    15 comments voice your opinion now!
    pear packge uninstall older version reinstall dependency pear packge uninstall older version reinstall dependency


    Greg Beaver's Blog:
    Sample chapter of PEAR Installer Manifesto available
    December 18, 2006 @ 09:23:00

    Greg Beaver points out today that the sample chapter [pdf] of the "PEAR Installer Manifesto" has been posted by Packt Publishing.

    Packt has put up a sample chapter, Chapter 5 "PEAR Channels: releasing to the world" up at http://www.packtpub.com/files/SampleChapter-The-PEAR-Installer-Manifesto.pdf. Check it out to see what you're missing if you don't already own the book.

    The chapter he points to talks about setting up a channel (using Chiara_PEAR_Server) and why they're the "killer features in PEAR 1.4.x+".

    You can get the full information on the book from its page on the Packt Publishing website and order it directly or from another retailer.

    0 comments voice your opinion now!
    pear installer book packt manifesto sample chapter pdf pear installer book packt manifesto sample chapter pdf



    Stoyan Stefanov's Blog:
    Laziest image resize in PHP
    December 14, 2006 @ 09:19:00

    On phpied.com, there's this new post that shares Stoyan's lazy way to resize images in PHP - with the help of the PEAR::Image_Transform package.

    Today I saw a post at digg.com on image resizing with PHP and there was quite a discussion. Let me share the laziest way (that I know of) how to do it - PEAR::Image_Transform is all it takes.

    His code is only five lines log and takes in a JPG image and resizes it down to a 100x100 pixel image to output as a PNG. He also mentions some of the other functionality the package has, including lots of other image manipulation extensions.

    2 comments voice your opinion now!
    image resize pear package imagetransform image resize pear package imagetransform


    Greg Beaver's Blog:
    Planting PEAR seeds - you can decide PEAR's future
    December 13, 2006 @ 09:03:00

    In his latest post, Greg Beaver gets excited about some of the recent advancements in PEAR including: more traffic on the mailing lists, improvements to the acceptance policies and documentation for packages, and fun things like the download statistics and a Google Map of developers.

    His real excitement comes with the latest offering the PEAR group is creating to pull more of the PHP community into the project and make them feel a part - a new election interface to vote on packages and the future of PEAR.

    Most of the important decisions I mentioned will be decided by a general election, meaning that the users of PEAR, not just the developers, will have a voice in the direction PEAR decides to take.

    PEAR developers out there are already registered to vote, but if you'd like to get in on the action, head over to the signup form and get involved today.

    0 comments voice your opinion now!
    pear documentation package vote community involve pear documentation package vote community involve


    David Coallier's Blog:
    PEAR now mapping developers!
    December 12, 2006 @ 09:37:00

    David Coallier has an update today on the effort to get PEAR developers all over the world mapped out to a Google map to show their locations - one that's finally been launched.

    Over the past weeks we have had many people asking around if it would be possible to have a place to see the pear developers around the world. Well now Christian Weiske and I (With the help of Arnaud Limbourg) have put up a nice little map system on pear.php.net. You can see it at http://pear.php.net/map/

    David also links to images of some of the administration panels for the application (one, two, three) and the connection information for a web service (REST) that allows access to all of the data.

    0 comments voice your opinion now!
    pear map developer google locate administration pear map developer google locate administration



    HowToBoard.com:
    Installing php-5.2.0 from srpm on CentOS 4
    December 07, 2006 @ 15:17:00

    If you're running CentOS 4 and want to get PHP up and running on your installation, check out this quick and dirty guide posted over on the HowToBoard.com.

    The process really only involves six or seven steps to get things up and running, but you'll need to know how to get in and edit things before you can build the packages up right. Oh, and of course, a little credit where credit's due:

    Enjoy! Do not forget to install new php-pear as well. Special thanks to Peter Zaitsev.
    0 comments voice your opinion now!
    install php5 centos step build compile pear install php5 centos step build compile pear




    MelonFire Community:
    Caching Web Sites With PEAR Cache
    November 21, 2006 @ 09:37:00

    From the MelonFire community pages comes a new tutorial today talking about caching websites with a pre-existing PEAR package, PEAR_Cache.

    More often than not, today's Web sites more closely resemble the big black truck crawling along the freeway than the little red Ferrari zipping through traffic. Fortunately, it's not all doom and gloom. By "caching" certain sections of your Web site, you can reduce the load on your server, significantly improve application response times and make your users happier.

    They get down to the basics first, talking about what caching is and what it can do to help you and your application. This is quickly followed by some sample code to get the ball rolling, showing how to cache a simple string automatically. The next obvious step is to cache the contents of an entire dynamically generated file or automatically cache an entire application (without the need to do each file independently).

    There's a few other examples they include as well - caching time, partial content, results from XML requests, and how to use a database to store your cached information.

    0 comments voice your opinion now!
    caching website file page pear cache package database tutorial caching website file page pear cache package database tutorial



    Joshua Eichorn's Blog:
    Writing again (HTML_AJAX Manual)
    November 16, 2006 @ 10:36:00

    Joshua Eichorn has gotten back to work on the HTML_AJAX manual and has changed things over to a bit more public forum - a new wiki.

    There's all sorts of content already populated there, including getting started with HTML_AJAX, exporting your PHP classes correctly and much more. There's also links to the project's PEAR homepage and the API documentation to help you get down to the small stuff.

    It's definitely coming along nicely and is a great repository for all things HTML_AJAX. And, since it's a wiki, things like spelling mistakes and new content can be added at any time.

    0 comments voice your opinion now!
    htmlajax pear package ajax manual wiki htmlajax pear package ajax manual wiki


    Dan Scott's Blog:
    PEAR File_MARC 0.1.0 alpha officially released
    November 14, 2006 @ 15:49:18

    Dan Scott has an announcement today about the official release of his File_MARC PEAR package, version 0.1.0 alpha.

    What does this mean? Well, assuming you have PHP 5.1+ and PEAR installed, you can now download and install File_MARC and its prerequisite with a simple command. I've also imported the File_MARC source into the PEAR CVS repository, so you can poke and prod and provide patches.

    He notes some of the changes he wants to make before things hit version 1.0, including MARCXML support.

    0 comments voice your opinion now!
    pear package filemarc alpha release official marcxml pear package filemarc alpha release official marcxml


    David Coallier's Blog:
    Text_CAPTCHA_Numeral is out!
    November 13, 2006 @ 12:02:00

    On his blog today, David Coallier has an announcement about the PEAR package he's been working on that's finally come into it's own - the Text_CAPTCHA_Numeral.

    Hello all, so for the previous weeks I have put the simple pear package Text_CAPTCHA_Numeral through the rough pear proposal process and voting. Now it has been proposed, and accepted, you can see it working at this address (In it's natural form).

    David also points out the live source of the demo, giving developers a great place to start with this package. There's even two FAQ questions to help get simple topics out of the way (spammers and storing the answer).

    0 comments voice your opinion now!
    pear package textcaptchanumeral release demo spam pear package textcaptchanumeral release demo spam



    Zend Developer Zone:
    Zend Framework Hidden Gems Introduction
    November 08, 2006 @ 15:36:00

    Cal Evans, of the Zend Developer Zone, is taking a different path than the large number of Zend Framework tutorials that he's seen out there:

    Zend Framework looked like an interesting platform, but each tutorial that I read started out with explaining how to set up your front controller, and moved form there into writing an entire application. I am not starting any new projects, and have no need for that.

    Instead, he's chosen to look a bit "behind the scenes" at what really makes the Framework tick and why it would be a good choice for any number of web applications out there. It's going to become a series on the ZDZ, so he starts it off right with a comparison between PEAR and the Zend Framework, specifically when it comes to error handling.

    It's more of a compare and contrast kind of thing than a contest, but it does seem that Cal favors one's approach a bit more. Which one? Well, you'll just have to go read and find out...

    0 comments voice your opinion now!
    zend framework hidden gem pear error handling exception simplicity zend framework hidden gem pear error handling exception simplicity


    Sebastian Bergmann's Blog:
    PHPUnit 3.0 Beta 3
    November 07, 2006 @ 15:56:00

    Sebastian Bergmann notes today that he has release this third beta version of the upcoming PHPUnit 3 release, a popular unit testing framework for PHP.

    A list of features is available as well as a list of changes. You can install PHPUnit using the PEAR Installer.

    PHPUnit 3.0 is the (coming soon) version of PHPUnit - both a framework that makes the writing of tests easy as well as the functionality to easily run the tests and analyse their results.

    0 comments voice your opinion now!
    phpunit unit testing beta release pear installer phpunit unit testing beta release pear installer


    PHPWomen.org:
    Bundled go-pear.phar broken in 5.2 windows releases
    November 07, 2006 @ 07:42:00

    The PHPWomen have posted a quick note about some of the broken-ness that's happened in the latest release of PHP, version 5.2, and the go-pear.phar file in the Windows releases.

    Greg Beaver fixed it immediately, but the fix was NOT incorporated into the 5.2 releases for windows - however the file for the source releases is correct. If you are getting errors that look like this

    If you're getting an error like they mention ("cannot use scalar value"), you'll need to go over and grab the latest Go-pear from the CVS repository and install it instead.

    0 comments voice your opinion now!
    bundled gopear pear broken php5 release windows download cvs bundled gopear pear broken php5 release windows download cvs



    PHPied.com:
    JSON renderer for Text_Highlight
    October 30, 2006 @ 12:52:29

    On PHPied.com, Stoyan shares the hacks he made to the Text_Highlighter PEAR package to get it to correctly format JSON-formatted messages.

    Today I played with adding a JSON renderer. Useful in case you want to get highlighted source code in your new shiny AJAX app.

    He talks about the tweaks he had to make, links to the demo of the script, and givesn an example o fhos you can use this updated version of the highlighting functionality in your scripts.

    0 comments voice your opinion now!
    json render text hilight pear package demo example link json render text hilight pear package demo example link



    Greg Beaver's Blog:
    PEAR Installer Manifesto from Packt Publishing - next week!
    October 27, 2006 @ 09:24:00

    Greg Beaver shares his excitement today about his book from Packt Publishing, The PEAR Installer, will be released and headed out to shelves next week.

    This book originally started as two chapters in the recently released PEAR Book. After receiving the first chapter, a 70-page behemoth on the features available in package.xml version 2.0, the publisher decided this was too exciting and should be its own book.

    Greg tals more about the contents of the book, all six chapters/270 pages, including some interesting ideas like using the PEAR Installer to maintain a live website. He also includes a link to be able to order it with a twenty percent discount (pre-order).

    0 comments voice your opinion now!
    book packt publishing pear installer manifesto book packt publishing pear installer manifesto


    PHPKitchen:
    Advantages of using the PEAR class naming convention
    October 26, 2006 @ 07:51:00

    Keeping with convention - well, naming convention - is a good thing sometimes. Demian Turner thinks so and talks about one of many reasons he sees to follow a standard set in place for a while now - the PEAR naming standard.

    By far the most convincing reason to use the file naming convention, which means that a class located in your include path like Foo/Bar/Baz.php is called Foo_Bar_Baz, is the ability to take advantage of PHP 5's __autoload magic method.

    The __autoload functionality in PHP 5 is definitely one of the most handy, elegant single lines of code out there and I'd definitely vote for anything that will make working with it even easier. Demian also includes a few lines of example code to show the interaction between the function and the files with the naming convention.

    0 comments voice your opinion now!
    pear class naming convention autoload simple reason pear class naming convention autoload simple reason


    PHPBuilder.com:
    PEAR's HTML_QuickForm
    October 25, 2006 @ 14:29:00

    PHPBuilder.com has posted a brand new tutorial today covering the installation and use of one of the most popular PEAR packages - HTML_QuickForm.

    It makes handling the rendering and display of forms, and more usefully, both client and server-side validation, quick and easy. This article will take you through the basics of that package. It assumes familiarity with HTML form elements, and reasonably basic PHP skills.

    Thanks to the PEAR installer, setting the package up on your machine is a snap. They also point out that you'll need the HTML_Common package to get things working. They move on to creating a simple form - showing how to add the elements and what the output looks like. There's even information on adding input validation (you do validate your input, don't you?) and doing a bit of formatting for the layout of the elements.

    0 comments voice your opinion now!
    pear package htmlquickform tutorial basic validation layout pear package htmlquickform tutorial basic validation layout


    Greg Beaver's Blog:
    PhpDocumentor 1.3.1 is released
    October 25, 2006 @ 08:36:00

    As Greg Beaver mentions, the latest version of the PHP documentation tool, PHPDocumentor has been released - version 1.3.1.

    This release addresses a problem with the sourceforge release, as well as a few other minor bugs.

    The phpDocumentor tool is a standalone auto-documentor similar to JavaDoc written in PHP. It differs from PHPDoc in that it is MUCH faster, parses a much wider range of php files, and comes with many customizations including 11 HTML templates, windows help file CHM output, PDF output, and XML DocBook peardoc2 output for use with documenting PEAR. In addition, it can do PHPXref source code highlighting and linking.

    You can grab this download from either:

    1 comment voice your opinion now!
    phpdocumentor release sourceforge pear package download phpdocumentor release sourceforge pear package download



    Greg Beaver's Blog:
    Statistics are back up for pear.php.net
    October 18, 2006 @ 10:04:00

    After being out of comission for a while, Greg Beaver is happy to annouce that the statistics for the pear.php.net website have rejoined the world of the living:

    After 3 grueling days of work, statistics are finally back up and running for pear.php.net, and are running fast at pecl.php.net. You can see the results in action at http://pear.php.net/package-stats.php.

    The statistics show the global statistics for the PEAR project (like total packages, total downloads, and total releases) as well as information specific to each of the packages (including a list of top downloaded packages).

    Greg also shares a bit more about the trials and tribulations (and help from Lukas Smith) that happened along the way. If you want to feel his pain and check it out, head over to his latest blog post.

    0 comments voice your opinion now!
    statistics pear package website database issue download release statistics pear package website database issue download release


    Dan Scott's Blog:
    Double-barreled PHP releases
    October 18, 2006 @ 09:21:00

    Dan Scott posts some information about the "double-barreled PHP releases" hes made on his blog today. The two packages he's talking about are the Structures_LinkedList and the File_MARC PEAR packages.

    I'm the proud parent of two new releases over the past couple of days: one official PEAR release for linked list fans, and another revision of the File_MARC proposal for library geeks.

    For the Structures_LinkedList package, the update is a release of 0.1.0-alpha that he's quite happy with. Next up in the release cycle for this project is (if all goes well) 0.1.0-stable. He also mentions a problem he (and several from the IRC channel #php.pecl) worked through that ultimately lead to issues with the custom __destructor.

    The File_MARC pakcage saw an update as well, with the new proposal version (0.0.9) being pushed into the PEAR Proposal process. It corrects a problem discovered at Hackfest with using file() to read in the lines of information (and it not scaling well). The solution was to go with the streams alternative, using stream_get_line.

    0 comments voice your opinion now!
    pear package release file_marc structures_linkedlist update pear package release file_marc structures_linkedlist update


    Christopher Jones' Blog:
    Review Easy Oracle PHP
    October 17, 2006 @ 07:05:26

    Christopher Jones has reviewed one of the first Oracle PHP books that has been published ("Easy Oracle PHP: Create Dynamic Web Pages with Oracle Data") in his latest blog post today.

    The writing style of Easy Oracle PHP is very clear. The book is relatively short at 264 pages but it focuses directly on PHP-Oracle interaction and does not need to be longer (though everyone will always wish for more).

    Some topics covered in the book include the basics of PHP, the OCI8 model, using PEAR, using ADOdb, and installing the PHP5/Apache/PEAR combo. Christopher's opinion of the good overall is good, but notes that the target it would best fit with is for developers coming from Oracle to PHP (but will work as well for those coming the other way).

    0 comments voice your opinion now!
    book review easy oracle dynamic introduction pear oop adodb oci8 book review easy oracle dynamic introduction pear oop adodb oci8


    Lukas Smith's Blog:
    Little status update
    October 16, 2006 @ 10:04:00

    Along with a few personal comments, Lukas Smith has posted some thoughts about the state of everything PEAR following his stepping down from working as an active developer on the project.

    I guess with me and Pierre leaving it did spawn a lot of energy about how to organize PEAR in the future. I am still participating in this discussion to some extent, mainly functioning as the historian who can explain why things are the way they are etc in order to prevent people from making rash decisions or even worse repeating old mistakes.

    He also comments on the state of package submissions to PEAR, noting that some of them are just unrealistic and that it might be better to start a "PEAR2" side to allow for some of these more expanded ideas to flourish.

    Instead I think each of the categories should manage itself more. So packages approval would be handled within the category. The same for QA'ing etc. This way new developers would not be facing this gigantic community. I think this is simply overwhelming. Even for old developers it becomes impossible to feel "at home" in a project of the size of PEAR.
    0 comments voice your opinion now!
    pear status update proposals pear2 repository project pear status update proposals pear2 repository project


    Stoyan Stefanov's Blog:
    The PEAR book
    October 16, 2006 @ 09:28:00

    Another author of the Packt Publishing book PHP Programming with PEAR, Stoyan Stefanov has his own post talking about the book and listing out each of the packages covered inside.

    In case you've missed it - the PEAR book hit the streets! The exact title is "PHP Programming with PEAR" and it's co-written by Stephan Schmidt, Carsten Lucke, Aaron Wormus and yours truly. Aaron also put up a Wiki for book and PEAR-related updates, it's at thepearbook.com.

    His (hopefully) comprehensive list of packages covered includes:

    • Calendar
    • HTTP_Request
    • Services_Google
    • XML_RPC
    • XML_Serializer
    ...and many, many more. I haven't gotten a chance but to hear other's comments and check out a bit of this book, but it definitely sesms like a great resource for anyone wanting to get into using PEAR for their applications. Check out the Packt site for a full chapter listing of everything covered.

    0 comments voice your opinion now!
    pear book packt publishing programming package pear book packt publishing programming package


    Lorenzo Alberton's Blog:
    Navigation Through Paragraphs in an Article
    October 16, 2006 @ 08:53:00

    Following the PEAR::Pager class theme, Lorenzo Alberton has posted another pagination tutorial today with a look at using the package to "paginate" through the paragraphs of an article quickly and easily.

    Users often prefer reading short chunks of text instead of scrolling a very long page (unless they want to print the page, then the opposite applies). In this tutorial, we're going to see how we can build an article pagination system, with a little help from PEAR::Pager.

    Lorenzo provides both the database structure and sample data to work off of as well as (obviously) the code to make it all happen. The script is pretty straight-forward, especially if you've looked through his previous tutorial using the same class. Since the paragraphs are broken up into different rows in the database, it makes it simple to pull them out just like the pages of the articles before.

    He also includes some alternative navigation styles to help make things look a bit different - a drop-down, an article summary (of the sections), and a printer-friendly version.

    0 comments voice your opinion now!
    pagination pear pager package tutorial paragraphs pagination pear pager package tutorial paragraphs



    Aaron Wormus' Blog:
    The PEAR Book is out!
    October 12, 2006 @ 08:24:00

    As he (Aaron Wormus) mentions in this new blog posting, the PEAR book from Packt publsihing has officially been released.

    This is a collaboration between Stoyan Stefanov, Stephan Schmidt, Carsten Lucke and me. The original book was conceived way back at IPC2k4 so it's been in the pipeline for a while now.

    Aaron talks about the contents of the book too - the different aspects of programming with PEAR with a more "solution-based" perspective (versus just dumping all of the information in your lap and shoving you out the door). He's also created an unofficial community wiki for the book to give things like reviews, comments, and other book-related things a place to live.

    0 comments voice your opinion now!
    pear packt publishing book published available order pear packt publishing book published available order


    Builder.com:
    Get the correct time by converting between time zones with PHP and PEAR
    October 10, 2006 @ 09:38:00

    On the Builder.com website, there's a new tutorial demonstrating how to use the PEAR Date class to make switching between time zones a snap.

    To be fair, PHP has built-in time zone functions to help with this, but these aren't particularly intuitive and require a fair amount of time to get used to. A quicker alternative is to use the PEAR Date class, which comes with built-in support for time zones and is, by far, the simplest way to perform these conversions.

    This tutorial will teach you how to convert temporal values between time zones with the PEAR Date class. It assumes that you have a working Apache and PHP installation and that the PEAR Date class has been correctly installed.

    They go with a few simple examples to introduce you to how things work:

    • just taking in and echoing back out the date
    • taking in the date and echoing it back out in a different format
    • making a simple time zone conversion
    • convert the timestamp to local time
    • finding the offset for the time stamp from GMT
    • adding and subtracting time stamps
    all complete with the (simple) code to perform them all.

    0 comments voice your opinion now!
    pear date class time zone convert offset pear date class time zone convert offset


    Sebastian Bergmann's Blog:
    PHPUnit 3.0 Beta 1
    October 10, 2006 @ 07:16:11

    Right on the heels of Derick Rethans' post of the first release candidate for Xdebug 2, Sebastian Bergmann has announced a beta release of his unit testing package - PHPUnit 3.

    A list of features is available as well as a list of changes. You can install PHPUnit using the PEAR Installer. Note that previous installations of the PHPUnit and PHPUnit2 packages from the pear.php.net channel have to be uninstalled.

    Sebastian also mentions the PHPUnit Pocket Guide published a little while back, acting as the official documentation for the project.

    0 comments voice your opinion now!
    phpunit beta release pear installer pocket guide documentation phpunit beta release pear installer pocket guide documentation



    Sebastian Bergmann's Blog:
    Integrating PHPUnit with Selenium
    October 04, 2006 @ 08:20:00

    In his latest post, Sebastian Bergmann mentions the work he's done to integrate Selenium with PHPUnit to make a powerful testing platform.

    Today I committed the initial work for integrating Selenium RC with PHPUnit. In this case it is PHPUnit that drives the execution of the web application UI tests, using PEAR's new Selenium package to communicate with the Selenium RC Server.

    He includes an example of how it will be used, creating a test to check if a page's title is equal to "Example Web Page".

    0 comments voice your opinion now!
    selenium phpunit integrate pear example selenium phpunit integrate pear example


    Lorenzo Alberton's Blog:
    PEARPager - Navigation with Pager and AJAX (or simple Javascript)
    October 03, 2006 @ 13:15:43

    Lorenzo Alberton is back today with another tutorial dealing with the PEAR::Pager class. This time, he focuses on using it with some simple Javascript and Ajax.

    Not everyone has jumped on the (Ajax) bandwagon, though, and many libraries still exist without implementing this feature, so you're faced with the dilemma: should I keep using that old library and give up my cool AJAX ideas, or should I implement my own version?

    If you're looking for a pager class with these requisites, I'm happy to reassure you about PEAR::Pager: it is AJAX-ready, and has been since a long time ago. 100% buzzword-compliance guaranteed!

    He gives two examples of what he means - one just using the Pager package to create Javascript lists and divide them into paginated chunks and the other to work with an Ajax connection (via PEAR::HTML_AJAX) to grab the data and push it into a container DIV on the page.

    0 comments voice your opinion now!
    pear pager package javascript ajax list pear pager package javascript ajax list


    Upcoming.org:
    Release of PHP API Wrapper Class
    October 02, 2006 @ 09:59:06

    The Yahoo-acquired site Upcoming.org has released a new (PHP 5 only) wrapper class for interfacing with their backend API. The Zend Developer Zone has the full story.

    On Sept 28, 2006, Upcoming.org released it's new PHP 5 (only) wrapper class. Details can be found here and the wiki page can be found here.

    The wiki page lists the prerequsites you'll need to use the wrapper (including SimpleMXL, PEAR's Cache::Lite, and the API documentation) as well as a simple "getting started" guide to making requests. There are a few issues they mention happening with the package, so keep an eye out for future updates.

    0 comments voice your opinion now!
    api interface php5 wrapper simplexml pear upcoming api interface php5 wrapper simplexml pear upcoming



    Lorenzo Alberton's Blog:
    DBMS and charsets, a summary and a call for help
    September 28, 2006 @ 08:15:00

    On his blog today, Lorenzo Alberton Talks about DBMS and the character sets they support and issues a call for help for anyone interested to help them (on the PEAR::MDB2 project) set up proper character set support for each database.

    We're working on PEAR::MDB2 charset and collation support. That means that we're in the process of figuring out what's the best way to set the charset in each DBMS, and how to make it portable and consistent through all of them.

    I'll try to explain how the various DBMS implement charset settings first, then describe the MDB2 status-quo regarding charset support. Finally, we'd like to get some feedback to implement a better charset support in MDB2.

    He lists out the types of character sets - client, connection, database/table/field, and result - explaining each of their roles in the average connection. He then breaks out the different databases into the different settings they support for the different character set types.

    The call for help comes in with him asking anyone out there with experience and skill in these areas to get in touch and help out if they can. Contact information is in the post. You can also check out some of Lukas Smith's comments over on his blog too.

    0 comments voice your opinion now!
    database characterset summary callforhelp pear mdb2 database characterset summary callforhelp pear mdb2


    Kore Nordmann's Blog:
    Installing cairo_wrapper on Gentoo
    September 28, 2006 @ 07:37:25

    Kore Nordmann looks at his attempt to install the cairo_wrapper and includes a handy note on how he found to get it working.

    I tried to install the cairo_wrapper by Hartmut on my gentoo machines, to play around with it, and probably writing an output driver for Image_3D, but I had some problems installing it, I want to share.

    He was seeing failures with phpize when he tried to compile it, but had a suggestion from Hartmut on something that would help - setting an environment variable (PHP_AUTOHEADER) and then running the pear command from there.

    0 comments voice your opinion now!
    cairo_wrapper gentoo environment variable pear install cairo_wrapper gentoo environment variable pear install


    Community News:
    Lead PEAR Developer Changes Focus
    September 27, 2006 @ 10:15:00

    Today, Pierre-Alain Joye has fomally announced his "retirement" from working with the PEAR project as a lead developer. He's making a shift to work mainly towards other graphics/imaging work he's been developing and to continue work with his current extensions (and a few new ones on the way).

    I spoke with him on some of the things that had lead up to making this decision and he mentioned it as a two-fold reason: one was some personal conflict between other PEAR developers and himself and the other an issue of time and interest in the project. He still wants to see it succeed, but just doesn't see the time in his life right now to do his part. Pierre will continue to work with the PECL extensions and on the PHP internals groups to help improve and develope them towards future versions. Some of the extensions he lists as the ones currently in his development are things like GD, xmlwriter, Zip (of course), and filter.

    It is just a normal process, things and people change. I would have preferred a slower switch, as I was working on my leave (giving lead for many of my packages to other friends).

    Pierre's PEAR work can be seen on this page of his blog and includes all of his PEAR and PECL work as well as PHP internals and Pimp/Cairo/GD development work.

    You can also check out the decision in his own words over on his blog.

    0 comments voice your opinion now!
    pear pecl extensioon internal move pear pecl extensioon internal move


    Hartmut Holzgraefe's Blog:
    PHP Graphviz Extension
    September 27, 2006 @ 10:03:00

    In this new blog post, Hartmut Holzgraefe talks about his experiences with the Graphviz library and its integration with PEAR.

    We've had PHP Graphviz support in PEAR for quite a while but only by passing graph description files to graphviz binaries running in seperate processes and by collection their output files later.

    Now it is possible to create graphs by adding nodes, edges and node and edge attributes to a graph within PHP itself.

    He's even created a trac site for deonstration and downloading of this new bit of functionality. There's also some documentation in a simple manual on the trac pages as well.

    1 comment voice your opinion now!
    extension graphviz integration pear trac download extension graphviz integration pear trac download


    Hartmut Holzgraefe's Blog:
    PHP Braille Extension
    September 27, 2006 @ 08:10:00

    Hartmut Holzgraefe shares an interesting extension with the community in