PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 181 to 200 of 240

APC: get a key's expiration time

APC: get a key's expiration time
It's always surprising to me, but APC is still the best kept secret. APC offers a bunch of very useful features - foremost a realpath cache and an opcode cache. However, my favorite is neither: it's being able to cache data in shared memory. How so? Simple: use apc_store() and apc_fetch() to persist data between requests.The other day, I wanted use a key's expiration date to send the appropriate headers (Expires and Last-Modified) to the client, but it didn't seem like APC supports this out of the box...

Cal Evans' Blog: Day Camp 4 Developers: Soft Skills wrapup

Cal Evans' Blog: Day Camp 4 Developers: Soft Skills wrapup
Cal Evans has posted a wrapup of the "Day Camp 4 Developers" event that happened this past Saturday. The event was targeted less towards the hard tech topics and more towards the "softer side" of things like working on resumes and furthering your career.Well, it's done. Our first ever Day Camp 4 Developers was yesterday and was by most accounts, a rousing success. Some of the comments over at Joind.In are just wonderful. I won't rehash all the great times and comments but I do want to list a few things I...

Monitoring PHP Errors

Monitoring PHP Errors
PHP errors are just part of the language. Some internal functions throw warnings or notices and seem unavoidable. A good case is parse_url. The point of parse_url is to take apart a URL and tell me the parts. Until recently, the only way to validate a URL was a regex. You can now use filter_var with the FILTER_VALIDATE_URL filter. But, in the past, I would use parse_url to validate the URL. It worked as the function returns false if the value is not a URL. But, if you give parse_url something that is not...

Community News: Latest PEAR Releases for 11.08.2010

Community News: Latest PEAR Releases for 11.08.2010
Latest PEAR Releases: Net_DNS 1.0.7

ZendCon 2010 Recap

ZendCon 2010 Recap
This was my sixth ZendCon and I've lost count of how many conferences overall. Regardless, this is one of the unique conferences in the PHP community as it's a blend of business and Open Source. Sometimes that works beautifully, sometimes not so much.. The Good First, the content was excellent. In past years, I've always heard of a few oddbad "what was he thinking" sessions. This time, they either weren't there or didn't cause a ripple. Overall, the content was solid, interesting, and well-supported. A...

Help testing the OpenPSA business suite

Help testing the OpenPSA business suite
OpenPSA is an web-based management suite for consulting companies. The GPLd suite includes functionalities like calendaring andAcontact management, product configurations, sales processes, projectAmanagement and invoicing. The application was originally developed by Nemein but since 2008 has seen excellent maintenance work by the Content Control team. As a result of last weekend's Midgard developer meeting in FSCONS, the OpenPSA suite has now been packaged for Debian and Ubuntu. Ubuntu users can easily...

Dependency Injection for static methods

Dependency Injection for static methods
Developers who are familiar with the topic of clean code know that static methods are a problem, especially if it comes to testability. Static makes the code global, and if there is some kind of state involved it is even more a problem because this is global state then - both a maintenance and testability nightmare. Unfortunately, sometimes you don't get around of using such code. This could be due to a third party library you have to use, or even because of limitations of PHP itself. (Ever wanted to...

Slides for aBuilding an SSO platform in PHP'

Slides for aBuilding an SSO platform in PHP'
My second presentation at Zendcon last thursday was about Single Sign On. SSO becomes increasingly important. Especially in a system where users are increasingly mobile and using multiple devices to access applications, it becomes more important to allow users to safely log in without giving them yet another username/password combination. Especially in corporate environments where many applications are used (some of which are hosted onsite, some offsite) users have a hard time remembering all their...

mysqlnd plugins for PHP in practice

mysqlnd plugins for PHP in practice
If you follow my blog or twitter stream you might know I've recently been at Barcelona to attend the PHP Barcelona conference. Conferences are great for exchanging ideas one of the ideas I discussed with Combell's Thijs Feryn: They are a hosting company providing managed MySQL instances to their customers, as such they run multiple MySQL servers and each server serves a few of their customers. Now they have to provide every customer with database credentials, including a host name to connect to. The...

Plat_Forms contest 2011

Plat_Forms contest 2011
In 2007 there was a programming competition conducted by the university of berlin and "Heise Verlag":Different programming platforms for web applications (Java vs. PHP vs. Perl) should be compared and the result were analysed in many aspects. I took part as a member of the Zend team and had a lot of fun there.Now Prof. Prechelt from FU Berlin is setting up another challenge. In January 2011, the contest will be repeated. With more platforms and even more fun this time. The official announcement can be...

Jose da Silva's Blog: Revisiting PHP 5.3 __invoke magic method

Jose da Silva's Blog: Revisiting PHP 5.3 __invoke magic method
In a new post to his blog Jose da Silva briefly looks at a feature that was introduced in the PHP 5.3.x series of the language - the __invoke magic method.PHP version 5.3 introduced a new magic method designed __invoke, this method is called when a script tries to call an object as a function. [...] As php cannot accommodate pseudo-first-class functions, the __invoke method can be used to suppress this language limitation. On other hand you can use this for simpler things as pass a function around.He...

Juhana Rasanen's Blog: Using MongoDB with CodeIgniter

Juhana Rasanen's Blog: Using MongoDB with CodeIgniter
On the Juhana Rasanen's blog today there's a new tutorial showing you how to use the popular NoSQL database MongoDB with an application written in the CodeIgniter framework.Considering using MongoDB instead of a SQL DB in your next CodeIgniter project? Well, we were and decided to take a stab at it, and fairly soon discovered that it is pretty straightforward. Even more so, if you don't try to use CI Active Record, but use native PHP Mongo interface to store and query your data. That suits our case, as...

Mashable: 10 Intermediate and Advanced Tips from PHP Masters

Mashable: 10 Intermediate and Advanced Tips from PHP Masters
Following up on their tips for PHP beginners they posted a little while back, Mashable has a a new article with a few more advanced tips from the same group.Well, if you happen to be one of those more seasoned PHP developers, this post is for you. Our expert panel has returned to offer helpful hints and suggestions for those of you who have long since passed the "beginner" milestone and are on your way to becoming true masters of the art and science of PHP. Feel free to ask questions and leave your own...

O'Reilly Broadcast: Getting Drupal and mod_security to Play Nicely Together on Red Hat 5.x Servers

O'Reilly Broadcast: Getting Drupal and mod_security to Play Nicely Together on Red Hat 5.x Servers
One of the ways you can help to secure your web application is to use the Apache module mod_security. It allows you to specify extra rules and settings to help prevent issues that would normally pass on through. Unfortunately, it may not play nicely with all web-based applications. In this new article on the O'Reilly Broadcast, Caitlyn Matrin describes some of the steps she took to get mod_security and Drupal to cooperate.Deploying Drupal on an Apache web server with mod_security or adding mod_security...

PHPBuilder.com: Four Sane Solutions for PHP Debugging

PHPBuilder.com: Four Sane Solutions for PHP Debugging
On PHPBuilder.com today there's a new article from Jason Gilmore sharing what he calls "four sane solutions" to help you debug your PHP applications better than just an echo or var_dump.Few tasks are more tedious and frustrating than debugging a Web application. [...] Fortunately, PHP developers have a number of powerful debugging solutions at their disposal. Whether you're merely inspecting array contents or attempting to determine the status of an Ajax-driven POST response, these four solutions are...

Site News: Popular Posts for the Week of 11.05.2010

Site News: Popular Posts for the Week of 11.05.2010
Popular posts from PHPDeveloper.org for the past week:SitePoint PHP Blog: Speed Up Your Website with PHP Buffer Flushing Web Builder Zone: 5 features of PHP that seem hacks, but save your life OnStartups.com: Why PHP Is Fun and Easy But Python Is Marriage Material Brian Swan' Blog: Determining Azure Drive Letter with PHP Re-Cycled Air Blog: PHP Dark Arts: Daemonizing a Process Site News: Blast from the Past - One Year Ago in PHP Agile Toolkit News: Yin and Yang of modern PHP UI Frameworks Project:...

Notes about Developers Shame Day

Notes about Developers Shame Day
Note: this article was supposed to be released on November 3rd, but I was not able to finish and release it in time. So don't wonder if the tense in the article is not correct. Some days ago Cem Derin proposed the idea of the Developers Shame Day. As his blog entry is German only here is a short summary of what this is about: basically, a developer should look into old source code of him/her and present a piece of code which is stupid in some kind, be it obvious errors, bad structure or security flaws -...

Jose de Silva's Blog: Speeding up your application with Cache_Lite

Jose de Silva's Blog: Speeding up your application with Cache_Lite
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...

DZone.com: From Doctrine 1 to Doctrine 2

DZone.com: From Doctrine 1 to Doctrine 2
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...

Vanessa Vasile's Blog: Simple Way to Parse an x509 Certificate with PHP

Vanessa Vasile's Blog: Simple Way to Parse an x509 Certificate with PHP
In a new post to her blog, Vanessa Vasile has a reminder about a built-in PHP function that can help quite a bit when you're working with SSL certificates - openssl_x509_parse.PHP has a nifty little function for parsing an x.509 SSL certificate into an array to easily pull out the elements: openssl_x509_parse. Essentially, all you need to do is load up the contents of the certificate, either through a file or POST value, and enclose it in the array.She includes a code snippet that pulls in the...