Nessa's Blog: Working with Permissions in PHP
302417
On her blog Nessa has a brief look at working with permissions with PHP via three functions - chown, chgrp and chmod.   PHP uses the same command as *nix systems when dealing with changing permissions for files. These commands are particularly useful in situations where PHP runs as a different user on the system, which is common when PHP is compiled as an Apache user.   She includes a basic syntax for each of them and how one (chmod) could be used in an example of file creation.
402184
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.
732440
The International PHP Magazine has posted results from their latest PHP community poll as voted on by visitors to their site. The question for this poll asked developers what they thought, of the choices on the list, was the most common mistake that PHP developers make.   Coming in at number one by an overwhelming lead was "Not escaping entities and SQL input" (a definite problem indeed) with the next highest option, "Not using a Framework" a full twenty percent lower. The next two options were closer (descending) - "Using old PHP versions" and "No or little use of Object Orientation".   There's a new poll this week for your consideration - this time asking which stage, of the five options, should come first in the development cycle of a typical content management system. Head on over and cast your vote today!
325308
This week's edition of PHP Magazine's PHPBarnstormer has been released - Issue #22.
496780
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.
654370
Pierre-Alain Joye has a little reminder posted to his blog today about two posts from planet-debian and Apache that refer to clones/references in PHP4 and PHP5 and some of the misconceptions presented there.   Reading planet-debian and Apache (from Sven and David), I catched two posts about clones and references in php4 and php5. I do not think it is worth to explain again everything here as Sara wrote a very good post already, check it out here.   He mentions his annoyance with articles/posts like these and the impact that it has on PHP as well as the person posting.   I wonder when the OS community in general will be mature enough to stop bitching at each other. And that's valid for PHP developers, gnome-kde and other well established wars.
197002
On the SitePoint PHP blog today, Troels Knak-Nielsen has written up an article that talks about dependencies in your applications - those little interconnections your code relies on to do more with less.   In lack of better words, I'll call this compositional programming style. It's a style which is usually more prevalent with experienced programmers. [...] There is, however, a dark side to composition - dependencies.   He starts with a definition to bring everyone up to a level field then moves on to how their used (through a "global symbol" or directly passed in) and how they can "leak" if you're not careful.    To help protect you and your code from any kind of damage down the line, Troels suggests making a container to keep objects where they need to be. He even includes an example with namespace support to make things even easier down the road.
493955
Tony Bibbs takes a look at an increasingly popular bit of functionality in PHP5, the SOAP extension, and notes that it still has a "ways to go".   In my latest round of web services work in PHP5 I was creating a PHP5 client that interacts with our Java-based ERP. The client needs to be a combination of a couple of WSDL's into one, nice, compact and powerful client. It should be noted this client will be distributed via the State of Iowa PEAR channel so it will undoubted by used by other project in our organization and throughout state government so the result needs to have a lot more fit-and-finish than would be typical.   He mentions his expectations for PHP's usage of the protocol, including the automatic generation of variables/methods/etc to help the developer use the remote application easier.
473226
Damien Seguy has continued his series looking at PHP configurations around the web and is sharing the results in the form of two new reports over on Nexen.net.   I just published the second part of the serie about PHP configurations. This part focuses on three aspects of PHP: PHP extensions, PHP streams, and disabled functions.   You can find the statistics themselves here and the latest configuration statistics here. It's interesting to see the drop-off when it comes to the various modules that are installed ("php, ftp and http are the most common. Besides them, tough luck.") and to see the somewhat more gradual curve of which functions are disabled - with system() topping out the list (with good reason).
291476
Matthew Turland, like many in the PHP community these days, has been pondering PHP6 and what it might mean to both the developers and to the language itself:   Be that as it may, as a user with about five years under his belt as of now who has seen all qualities of PHP code ranging from pristine to pedantic, a thought or two has crossed my mind on the subject of the latest upcoming incarnation of the language.   Specifically, he talks about some of the hot topics like namespaces, the mysqlnd driver, Unicode support, and named parameters. Overall, though, his comments are positive, looking toward a brighter future for PHP with this upcoming edition.
763575
Ilia Alshanetsky posts today about the proposed "Month of PHP bugs" that Stefan Esser is proposing:   It would be interesting to see what issues he discovers, hopefully most of them have already been reported to the PHP Security Team, in which case the upcoming 5.2.1 release will provide a resolution path for affected users.   Hopefully, as Ilia states, the bugs will not turn out to be zero-day vulnerabilities and will instead be smaller issues. Either way, a bug-fix patch will probably soon follow.   Either way, I have to look at this as a free security audit of PHP by someone with a clue about security and ultimately, in the long run it will only make PHP better, even if March is going to be rather busy.
347402
In this new post on the PHP Security Blog, Stefan Esser brings up an interesting issue when dealing with web applications - being able to bind a script/application to a different port on the local machine.   Unfortunately the ability to bind yourself to a port and receive connections is a threat to webapplications installed on different virtual hosts on the same IP, even if other security measures in place, like tight filesystem permissions or executing PHP script with the permission of the owner.   He gives an example in PHP of how this can happen and one of the scary side effects of having it in the same domain - the cookie information is passed in. It's a simple concept that could have very bad consequences in the wrong hands.    Additionally, you don't even have to create it in PHP either. As cyberlot mentions, it could be created in any language that has socket functions. Be sure to check out the comments for more thoughts and comments on the post.
620214
On Paul Jones' weblog today, there's a posting covering one of the banes of PHP life - form processing/handling.
194190
Matthew O'Phinney has two new posts that talk about something object-oriented developers seem to shy away from - globals in their classes and how they can make things more difficult to make "embeddable applications" a reality.   In my previous entry, I ranted about the use of globals in popular PHP applications, and how they make embedding said applications difficult. I develop using object-oriented practices, and can honestly say I can't recall ever having slung a global variable around in my own code. Globals seem hackish to me, and as a result, trying to get applications that use them to behave correctly has been a challenge.   In the first part, he notes an interesting find about the $GLOBALS value and illustrates with a code example how he was able to get around it in his instance (wrapping a Serendipity instance in a Zend Framework app).   In part two, though, and uses another code example to show what kind of issues he was seeing with the $GLOBALS - a script that sets some globals in different instances and echoes the results back out.
722744
On his blog, Ian Bicking has posted some of his thoughts on a positive look at PHP - what he thinks PHP has done right.   With the recent talk on the blogosphere about deployment (and for Django, and lots of other posts too), people are thinking about PHP a bit more analytically. I think people mostly get it wrong.   He points out that PHP, in essence, is a CGI-style execution and, in being so, makes it more flexible. Both sides, web and command line, can work with the language equally well. He also mentions the developer/administrator split he sees in PHP's structure and how the language facilitates it.
676141
While attending Gunter Kniesel's "Aspect-Oriented Software Development" lecture yesterday it occured to me that it might be possible to (ab)use PHP 5's __autoload(), __call(), __get(), and __set() interceptors to facilitate Aspect-Oriented Programming with PHP.
273337
Here's what was popular in the PHP community one year ago today:Job Posting: National Auto Warranty Seeks MySQL DBAJob Posting: National Auto Warranty Seeks PHP Web App Developer (Wentzville, MO)DevShed: Creating a Login Script for a PHP Invoicing SystemZak Greant's Blog: The eZ partner program (response to Seth Gottlieb's Commercial O/S business post)php|architect: Application-level Logging with the Zend FrameworkPaul Reinheimer's Blog: Object-Oriented PHP, Concepts, Techniques, and CodeRyan Malesevich's Blog: Fight Spam Comments with Bad Behavior and AkismetZend Developer Zone: SQLite: Lean, Mean DB MachineBuilderau.com.au: Cache PHP scripts with APC modulePro-PHP Podcast: Interview With Cal EvansSitePoint PHP Blog: PHP extension for Cairo graphics libraryTechnobabbler.com: making a radar loop with PHPDevShed: Working with MySQL Result Sets and the Decorator Pattern in PHPJob Posting: exhibit-E Seeks Interactive Developer (New York, NY)Jacob Santos' Blog: Patterns for PHP: Page Controller Draft