PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 141 to 160 of 214

PHP Base-62 encoding

PHP Base-62 encoding
There's a really horrible bug (though they won't call it that!) in Apache's mod_rewrite that means that urlencoded inputs in rewrites get unescaped in their transformation to output patterns. The bug actually remains unfixed, though a workaround first appeared in Apache 2.2.12 (which wasn't all that long ago). Put it like this: if you're not using the [B] flag in your mod_rewrite rules, your site is probably only working due to blind luck. With that in mind, a few years ago I spent ages looking for a...

PHPBuilder.com: Smarty PHP Template Engine: Building PHP Apps in a Flash

PHPBuilder.com: Smarty PHP Template Engine: Building PHP Apps in a Flash
On PHPBuilder.com today there's a new tutorial from Octavia Anghel introducing you to Smarty, a PHP-based templating engine that can make creating the layouts and output of your site simpler and easier to reuse.Smarty is a template engine for PHP whose main goal is to facilitate a very useful way to separate the business logic from the presentation logic. This article introduces Smarty and demonstrates how to install the template, create an application from scratch and interact with a...

Slawek Lukasiewicz's Blog: Throwing Exception with Type Hinting Failed

Slawek Lukasiewicz's Blog: Throwing Exception with Type Hinting Failed
Slawek Lukasiewicz has a helpful hint posted to his blog today about handling type hinting failures in a what he sees as a "more correct" way than just throwing an error - throwing an exception when the hinting criteria's not met.One of the most annoying behavior of PHP type hinting feature is triggering error instead of throwing exception when instance type is invalid.By default, a failure generates a "catchable error" that, thanks to the custom error handling methods PHP includes, can be correctly...

Anthony Ferrara's Blog: On Optimization in PHP

Anthony Ferrara's Blog: On Optimization in PHP
Anthony Ferrara has a new post to his blog today looking at something that's constantly a focus of user-facing applications, PHP ones or otherwise - application optimization. He specifically discusses handling it in PHP and some things to keep an eye out for.When it comes to optimization, there are two competing viewpoints in the PHP community. Some say that optimization should only ever be an after thought and to avoid premature optimization at all costs. Others will say that this is impractical, and...

Community News: Latest Releases from PHPClasses.org

Community News: Latest Releases from PHPClasses.org
Color Namer Gamify Best CAPTCHA police Cifrador Simple CSV transpose zbase32 Grid class HHO Text Counter ADV_FTP phpSVG Files

Rafael Dohms' Blog: PHP Development in the Cloud by Ivo Jansch and Vito Chin

Rafael Dohms' Blog: PHP Development in the Cloud by Ivo Jansch and Vito Chin
Rafael Dohms has posted a review of a book from Ivo Jansch and Vito Chin - "PHP Development in the Cloud", a guide to some considerations about running PHP applications on cloud-based platforms.Cloud computing is finally reaching a point of maturity and leaving its early "hype" years behind. Ivo and Vito do a very good job of bringing the topic into a PHP developer's world in a very concise and objective manner, without leaving important platforms and concepts behind.He briefly mentions the book's...

Superdit.com: Google Web Seach With ExtJS Grid and PHP

Superdit.com: Google Web Seach With ExtJS Grid and PHP
From Superdit.com there's a tutorial showing you how to display search results in an ExtJS grid as pulled from Google's API. The article's from the beginning of the year, but it's a good self-contained example of using ExtJS to automatically pull in data produced from the backend.This time I want to make a simple example in displaying google web search result in ExtJS grid, other ExtJS component that can be used to displaying this result is dataview, but grid is more common in displaying data in ExtJS....

Bertrand Mansion's Blog: PHP with Itnl and Gettext on OSX Lion

Bertrand Mansion's Blog: PHP with Itnl and Gettext on OSX Lion
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...

Sameer Borate's Blog: Checking your site for malicious changes

Sameer Borate's Blog: Checking your site for malicious changes
Sameer Borate, in the wake of having security issues with his site, has posted a hint you could use to help detect when something has changed in important files in your application by checking their hash.Today a couple of hours back my site got compromised. Not much changes to the code, but the .htacces was changed and some code [...] was added to the .htaccess file, which redirected the traffic coming from search engines to a malware site. It has now been removed and to prevent any such changes to the...

Martin Sikora's Blog: Storing arrays using JSON, serialize and var_export

Martin Sikora's Blog: Storing arrays using JSON, serialize and var_export
Martin Sikora was working on an application that used a large dataset (in an array) and found some interesting things in regards to PHP's resulting loading time and saving time in four different types of arrays.Recently I was dealing with precessing and storing large arrays in PHP (around 100 000 items) and I found out some quiet surprising facts that are very useful in performance critical applications. [...] When I started looking for some benchmark I found article Cache a large array: JSON, serialize...

Bradley Holt's Blog: The Case For Rapid Release Cycles

Bradley Holt's Blog: The Case For Rapid Release Cycles
Bradley Holt has a new post to his blog today talking about something he's a fan of in his development processes - rapid release cycles - and how something like the Zend Framework could benefit from it.There has been some discussion recently on the Zend Framework mailing list around release cycles. I proposed a release cycle of six months for major versions (someone else suggested eighteen months, which may be more reasonable for a framework). Rapid releases allow one to accelerate the cycle of building,...

Community News: Latest PECL Releases for 08.09.2011

Community News: Latest PECL Releases for 08.09.2011
Latest PECL Releases: lua 1.0.0 CUBRID 8.4.0.0003 CUBRID 8.3.1.0007 uploadprogress 1.0.3

The Case For Rapid Release Cycles

The Case For Rapid Release Cycles
There has been some discussion recently on the Zend Framework mailing list around release cycles. I proposed a release cycle of six months for major versions (someone else suggested eighteen months, which may be more reasonable for a framework). Rapid releases allow one to accelerate the cycle of building, measuring, and learning. Gathering data from actual usage (measuring) provides an opportunity for learning that can be applied to the next release (building). Zend Framework 2.0 should be released...

Derick Rethans' Blog: Valgrinding shared modules

Derick Rethans' Blog: Valgrinding shared modules
In the process of some development he's been doing on various shared modules for PHP, Derick Rethans stumbled across an issue with using Valgrind to test his code:While testing whether I correctly free all memory with Valgrind, I ran into the issue where I couldn't see the stack frames of where the memory leaks occurred in the extensions, and once I even ran into a Valgrind bug. The reason why Valgrind could not show the function names belonging to the stack frames is because PHP had already unloaded the...

PHPBuilder.com: Back to Basics: Managing PHP Configuration php.ini Directives

PHPBuilder.com: Back to Basics: Managing PHP Configuration php.ini Directives
Jason Gilmore gets "back to basics" in a new tutorial with a look at managing configuration in your ini file to tune it to just what you need.While PHP's configuration capabilities are indeed powerful, the sheer breadth and different ways in which these configuration directives can be set are often confusing and downright intimidating to newcomers. So in this article it worth meandering from the typically intermediate-level discussion and instead offer some insight into PHP's configuration-specific...

Cal Evans' Blog: Announcing Day Camp 4 Developers #3

Cal Evans' Blog: Announcing Day Camp 4 Developers #3
Cal Evans has announced the latest Day Camp 4 Developers (their third installment) with a focus on Project Management. It will be happening Saturday, October 1st through Sunday, October 2nd.We've added a speaker this time around for a total of six and did away with the lunch break. We discovered that since we were a virtual conference, our lunch break fell at odd times if you weren't actually in Central Time Zone - and a lot of participants weren't. So we filled that with an additional talk.Speakers on...

Propose a Session for Vermont Code Camp 2011

Propose a Session for Vermont Code Camp 2011
Vermont is a beautiful place to visit-especially in the fall! We're looking for Vermonters and non-Vermonters alike to speak at this year's Vermont Code Camp. Vermont Code Camp is organized entirely by community volunteers, with the help of our great sponsors (we're still accepting sponsorships, too). Vermont Code Camp is a polyglot event. We're looking for sessions on .NET, PHP, Ruby, Python, Java, and more. Abstracts are due this Friday, August 12 and we're going to try and have the session list...

Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPDocumentor feedback

Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPDocumentor feedback
As a follow up to his previous post about using DocBlock commenting and phpDocumentor for automatic project documentation generation, Michelangelo van Dam has posted a deeper look at DocBlox, one of his previously mentioned alternatives.First of all, thank you all for the enormous feedback I got on my latest article on documentation of code. I got a lot of comments on the usage of PHPDocumentor. [...] I have to agree that [there are reasons] valid enough to step away from PHPDocumentor as a tool for...

Dave Marshall's Blog: Traits in PHP 5.4 - HelloWorld with Logging Trait

Dave Marshall's Blog: Traits in PHP 5.4 - HelloWorld with Logging Trait
Dave Marshall is already looking ahead to the next major release of PHP, version 5.4, and one of the features it will include - traits. In this new post to his blog, he introduces a "logging trait" he's come up with to make logging simpler in your (Zend Framework) application.One of the 'traits' I find myself constantly adding to library files is optional logging of it's behaviour. The library class has it's own log method, that checks to see if the instance has had a logger injected and if so, logs the...

Gonzalo Ayuso's Blog: Runtime Classes. A experiment with PHP and Object Oriented Programming

Gonzalo Ayuso's Blog: Runtime Classes. A experiment with PHP and Object Oriented Programming
Gonzalo Ayuso has put together an experiment related to the current OOP structure of PHP - a test working with runtime classes, a structure generated entirely when the script is executed and not predefined in the file.Last week I was thinking about creation of a new type of classes. PHP classes but created dynamically at run time. When this idea was running through my head I read the following article and I wanted to write something similar. Warning: Probably that it is something totally useless, but I...