PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 221 to 240 of 256

Zend Framework Proposal: Zend\Html\Filter (html Sanitisation And Manipulation)

Zend Framework Proposal: Zend\Html\Filter (html Sanitisation And Manipulation)
For a while now, I've been keen to build a html Sanitisation solution for PHP. Where else would I end up putting it other than in Zend Framework? As I've explored in past articles [1] [2], html Sanitisation in PHP is a very inconsistent practice. Sanitisers like htmlPurifier are very secure out of the box but undeniably slow and resource intensive while others based on regular expression powered html parsing are much faster but tend to lose out a lot in the security stakes. Isn't it possible to create a...

Collecting Garbage: Cleaning Up

Collecting Garbage: Cleaning Up
Collecting Garbage: Cleaning Up London, UK Monday, September 6th 2010, 09:23 BST This is the second part of three-parts column that was originally published in the May 2009 issues of php|architect. Part one is here. In this second part of the three part column on the new garbage collecting mechanism in PHP 5.3, we'll dive into a solution to the problem with circular references. If we look quickly back, we found that by using code like the following, an in-request memory leak is created:...

PHP segfaulting with pecl/uuid and pecl/imagick

PHP segfaulting with pecl/uuid and pecl/imagick
Ran into a bug yesterday, where http://pecl.php.net/uuid in combination with http://pecl.php.net/imagick yielded a segfault when using uuid_create(). GDB backtrace looks like this (without the exact place where it happens in libuuid, as there is unfortunatly no libuuid1-dbg-package in current Ubuntu versions): gdb --silent --ex run --args php -r "var_dump(uuid_create());" #0 0xb6e85321 in ?? () from /lib/libuuid.so.1 #1 0xb6e862bf in uuid_generate () from /lib/libuuid.so.1 #2 0xb6bcc67a in...

recent work with zend framework and doctrine2

recent work with zend framework and doctrine2
I recently began working with an organization and we are in the midst of making some changes. They were not far enough along that any changes now make that much of a difference, but it was an odd set of changes nonetheless. Initially, the client had started with CodeIgniter (during a phone call earlier, there was interest in ZF2, but when I started they'd gone with CI). One of the first things I tried to do was to get unit testing set up with CI, and the CIUnit failed out of the box. We're using PHP5.3,...

The Central Tension Of Programming

The Central Tension Of Programming
The central tension in the software process comes from the fact that we must go from an informally identified need that exists in-the-world to a formal model that operates in-the-computer. From aoBeyond Programminga by Bruce Blum, as quoted in aoThe Design of Designa by Frederick P. Brooks Jr.

Local video stores going away? Hopefully not.

Local video stores going away? Hopefully not.
Just saw a comment on a forum that aBlockbuster has a dead business model', and I've noticed that one branch of our local video store chain closed. The other store, while still big, is feeling empty. The rise of Netflix predicted the end of video stores years ago, but it didn't happen. At least, not quickly. The rise of avideo on demand' also was seen as a nail in the coffin for video stores, but it didn't happen right away either. aVideo on demand' is something we've had via Tivo for 3 years from...

Highlight source code lines in LaTeX

Highlight source code lines in LaTeX
I love LaTeX for any kind of text writing (actually typesetting), simply because it creates so nice looking and consistent layouts. And, of course, because I can write it in my favorite text editor. We use LaTeX especially for presentation slides at Qafoo, since the beamer package provides such a convenient environment. Combined with listings package, presenting source code snippets with nice syntax highlighting has never been easier. However, there was one problem we did not solve, yet, until some days...

Chris Tankersley's Blog: Getting Started with Reflection

Chris Tankersley's Blog: Getting Started with Reflection
Chris Tankersley has a new post to how blog looking at a powerful but sometimes seldom used feature of PHP - Reflection. His post introduces you to some of the basics you can use to have your code find out more about itself.Reflection is a metaprogramming construct that allows a program to look into itself and do a multitude of different things - gain meaning, watch execution, call code, or even provide feedback. [...] With PHP 5, PHP gained a robust reflection class that allows a developer to gain...

Brian Swan's Blog: Accessing OData for SQL Azure with AppFabric Access Control and PHP

Brian Swan's Blog: Accessing OData for SQL Azure with AppFabric Access Control and PHP
Brian Swan has a new post to his blog today about consuming protected feeds of OData coming from SQL Azure in a PHP application.I did write a post a few weeks ago that described how to enable anonymous access to SQL Azure OData feeds (Consuming SQL Azure Data with the OData SDK for PHP), but I had a few things to learn about AppFabric access control before I felt comfortable writing about authenticated access to these feeds.He starts from the Azure side, creating a sample OData feed and adding...

Lorna Mitchell's Blog: Tips for Event Hosting: On The Day

Lorna Mitchell's Blog: Tips for Event Hosting: On The Day
Lorna Mitchell has posted her second part of her "tips for [tech] event hosting" series (first part here) with some suggestions for the day of the event - those last minute things that might get forgotten.As an organiser you should know exactly where you are going on the day and what you need. [...] As an organiser you see all the small behind-the-scenes crises, but if they are invisible to the average attendee, then you're doing really well.She makes suggestions about the little things - ensuring name...

Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 5

Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 5
Kevin Schroeder has the latest excerpt from his book posted ("You Want to Do WHAT with PHP?") with a focus on the SPL - Standard PHP Library. He specifically takes a quick look at Iterators.If you are doing any data processing whatsoever you are using arrays. And most likely you are doing database queries, iterating over the results and doing your algorithm-ing. But what if you have additional functionality that you need to have integrated with your data. You could go the traditional route and copy and...

SitePoint.com: OAuth for PHP Twitter Apps, Part I

SitePoint.com: OAuth for PHP Twitter Apps, Part I
On the SitePoint blogs today there's a new tutorial posted, the first part of a series, from Raj Deut about making the move away from the basic authorization for connecting to the Twitter API and towards their new OAuth method for Twitter Apps.As of August 31, Twitter's HTTP Basic Authenticated API service has been disabled entirely. Now, any interface with the API will be required to use a token-based authentication method known an OAuth. [...] At first glance, the task of implementing OAuth can appear...

PHPFreaks.com: A simple Debian based dev environment

PHPFreaks.com: A simple Debian based dev environment
On the PHPFreaks.com site there's a new post that's a guide for creating a basic development environment on a Debian system (complete with VirtualHosts).This is just a quick walkthrough describing how to setup a decent development environment allowing the easy setup of multiple sites. It already assumes you have a working Debian or Ubuntu OS installed and configured with PHP, MySql & Apache already running. You will also need to have a working sudo.They add a group for the web server user (www), change...

NETTUTS.com: Creating a Web Poll with PHP

NETTUTS.com: Creating a Web Poll with PHP
On NETTUTS.com today there's an intermediate tutorial showing you how to create a simple polling system for your site - complete with a database backend and a CSS styled results view.Polls are nearly ubiquitous on the web today, and there are plenty of services that will provide a drop-in poll for you. But what if you want to write one yourself? This tutorial will take you through the steps to create a simple PHP-based poll, including database setup, vote processing, and displaying the poll.They include...

Site News: Popular Posts for the Week of 09.03.2010

Site News: Popular Posts for the Week of 09.03.2010
Popular posts from PHPDeveloper.org for the past week:Developer.com: Quercus: Bring Java's Power to Your PHP Development (and Vice Versa) Jani Hartikainen's Blog: Now you can write PHP code...without writing any code NerdMom Blog: Kohana 3 & CodeIgniter 2 Ahmed Shreef's Blog: iconv misunderstands UTF-16 strings with no BOM Klaus Graefensteiner's Blog: Climbing the CodeIgniter PHP MVC framework learning curve Web Builder Zone: NetBeans vs. Vim for PHP development Site News: Job Postings for the week of...

Gonzalo Ayuso's Blog: Using Monkey Patching to store files in CouchDb using the standard filesystem

Gonzalo Ayuso's Blog: Using Monkey Patching to store files in CouchDb using the standard filesystem
Gonzalo Ayuso takes his "CouchDb as a filesystem" approach one step further (see the previous post about it here) with this new post talking about monkey patching to store files into the CouchDb server using the normal PHP file handling functions.Since PHP5.3 a new design pattern is available for us: Monkey Patching. With this pattern we can override PHP's core functions with a home-made functions in a different namespace (another example here). That's means if I have fopen function in the above example,...

Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 4

Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 4
Kevin Schroeder has another new post to his blog today with an excerpt from his "You Want to Do WHAT with PHP?" book. This new post is a section from the fourth chapter looking at stream handling.Communication is key to building applications now and for the future. While it is not something that I think that everyone should do, I have not seem many applications that make good use of streams in PHP. Streams can be immensely useful in the right situations, but a lot of developers are not really aware of...

TechTatva.com: [How To] Setup Cherokee with PHP5 FPM

TechTatva.com: [How To] Setup Cherokee with PHP5 FPM
On the TechTatva.com site today there's a new tutorial posted about getting the Cherokee web server set up and running PHP5 FPM. It's a few simple steps to install and a few clicks around the GUI to get things configured.In this "how to" we will see how to setup cherokee on Ubuntu with PHP5-FPM (FastCGI Process Manager). Although the cherokee CookBook claims that "If PHP-fpm binaries are found, those will be prioritized over the regular binaries." it turns out that the latest stable version of cherokee...

Zend Developer Zone: Zend Framework is a BOSSie Award Winner

Zend Developer Zone: Zend Framework is a BOSSie Award Winner
According to this new post on the Zend Developer Zone, the Zend Framework has won itself a BOSSie award (from InfoWorld) in the "best open source application development software" category. Matthew Weier O'Phinney has this to say about the award:I am one of the privileged few to have worked with Zend Framework since before the original public pre-alpha release. [...] What [Mike Naberenzy] showed me at the time captured my imagination: the company with the best known name in the PHP industry was building...

ThinkPHP Blog: Contributing to Zend Framework

ThinkPHP Blog: Contributing to Zend Framework
On the ThinkPHP blog today there's this new post talking about open source contribution and, more specifically, making contributions to a popular PHP project - the Zend Framework.Who hasn't ever started writing his own Framework/CMS? It is considered best practice for learning purposes, but going through all the security stuff can be stressful and boring at the same time. That's where most devs start to contribute to big Open Source-projects like Typo3 or the Zend Framework, because they are already...