PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 41 to 60 of 304

Eran Galperin's Blog: Database Optimization Techniques You Can Actually Use

Eran Galperin's Blog: Database Optimization Techniques You Can Actually Use
Eran Galperin has posted a few helpful tips (ones you can "actually use") for optimizing your database and how your application uses it.I understand the need for simplicity because of the wide audience of Smashing Magazine, but I'd wish they'd give something more than the absolute basics you could find in almost any other site out there [in their recent tutorial]. I also didn't like some of the methods mentioned there for profiling (or the code itself), so I here is my starter guide to optimizing...

Working With Non-Namespaced Components

Working With Non-Namespaced Components
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components. A component-based approach works well with the new namespace support added to PHP 5.3, and indeed I'm making full use of this in the components I'm building for this tutorial. But not...

php|architect: Looking for a simpler MySQL library? Try MeekroDB

php|architect: Looking for a simpler MySQL library? Try MeekroDB
On the php|architect site today John Mertic has a new post looking at a simpler MySQL library - MeekroDB.I remember fondly back in the day, when PHP 4.0 was all the rage, that if you wanted to interface with MySQL there was one choice: the PHP mysql extension. Then came database abstraction layers (such as ADODB and PEAR_DB) and newer extensions (namely PDO and mysqli), all with the goal of simplifying the code needing written to be able to get data successfully out of a database. But even then, it still...

Stuart Herbert's Blog: Dealing With PEAR Dependency Quirks

Stuart Herbert's Blog: Dealing With PEAR Dependency Quirks
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...

Matthew Weier O'Phinney's Blog: Code Generation with ZendCodeGenerator

Matthew Weier O'Phinney's Blog: Code Generation with ZendCodeGenerator
Matthew Weier O'Phinney has put together a beginners guide to code generation with the help of the Zend_CodeGenerator component of the Zend Framework (v2):Zend Framework has offerred a code generation component since version 1.8, when we started shipping Zend_Tool. Zend_CodeGenerator largely mimics PHP's ReflectionAPI, but does the opposite: it instead generates code. [...] ZendCodeGenerator in the ZF2 repository is largely ported from Zend Framework 1, but also includes some functionality surrounding...

Chris Shiflett's Blog: PHP Session Debugging

Chris Shiflett's Blog: PHP Session Debugging
In a new post to his blog today Chris Shiflett takes a look at something a lot of PHP developers take for granted, the language's session handling, and some things you can do to help debug them when things go wrong.For many PHP developers, calling session_start() and using $_SESSION for stuff you want to persist from page to page is all there is to know about sessions. This is understandable, because PHP's native session support is so simple and reliable. But, what if something goes wrong?He points to...

Gonzalo Ayuso's Blog: Performance analysis fetching data with PDO and PHP.

Gonzalo Ayuso's Blog: Performance analysis fetching data with PDO and PHP.
Gonzalo Ayuso has a new post to his blog today with the results of some performance analysis he ran when fetching data with PHP and PDO.Fetching data from databases is a common operation in our work as developers. There are many drivers (normally I use PDO), but the usage of all of them are similar and switch from one to another is not difficult (they almost share the same interface). In this post I will focus on fetching data.He includes his sample scripts - one using just fetch() and the other using...

Community News: Latest PEAR Releases for 03.28.2011

Community News: Latest PEAR Releases for 03.28.2011
Latest PEAR Releases: HTTP_Request2 2.0.0beta2

Xdebug 2.1.1

Xdebug 2.1.1
Xdebug 2.1.1 London, UK Monday, March 28th 2011, 09:40 BST I've just released Xdebug 2.1.1. It is a bug fix release that primarily addresses issues in the debugging and profiling functionality of Xdebug. Among the bug fixes is a fix that solves an issue with newer versions of the KCacheGrind profiling GUI. The newer versions are more strict with input which causes an issue with Xdebug profiler's files. Xdebug 2.1.1 solves this. As an experiment I set up a pledge system to allow myself to work on this...

Dealing With PEAR Dependency Quirks

Dealing With PEAR Dependency Quirks
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components. Last week, I began work on a simple component to talk to the Repustate semantic analysis API. To save myself a bit of effort, I thought it would make sense to make my API client reuse...

Beyond Frameworks: The Page

Beyond Frameworks: The Page
I've put together a page on my blog to collate my Beyond Frameworks series of articles about building PHP components into one convenient place. If you're enjoying the series, you might find it a handy reference page to bookmark. And if you missed the beginning of the series, why not head on over and see what I'm up to? PS: Thank you to everyone who has left comments or pinged me on Twitter so far. The feedback is excellent to have - more please

Code Generation with Zend\CodeGenerator

Zend Framework has offerred a code generation component since version 1.8, when we started shipping Zend_Tool. Zend_CodeGenerator largely mimics PHP's ReflectionAPI, but does the opposite: it instead generates code. Why might you want to generate code? You can use it as an assistive form of "copy and paste" for common tasks (as an example, it's used in zf.sh to generate controller classes and action methods). You might want to generate code from configuration, to remove the "compile" phase of generating...

How To Run Your Component's Unit Tests

How To Run Your Component's Unit Tests
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components. Earlier today, I created some very basic unit tests for my repustateApi component. Unit tests are an essential part of developing your component, but how do you run them? Running Your...

Load Balancing with Apache

Load Balancing with Apache
At last night's Burlington, Vermont PHP Users Group meeting a gave a presentation on Load Balancing with Apache: Load Balancing with Apache View more presentations from Bradley Holt I've posted the example configuration files for reference. Basic load balancing: Sticky sessions in PHP: Create your own sticky sessions: Route based on HTTP method: Distributed load testing with Tsung: I cover load balancing and distributed load testing in more detail in my upcoming book, Scaling CouchDB.

Where To Put Your Component's Unit Tests

Where To Put Your Component's Unit Tests
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components. I've started work on creating the components for my simple app. The first component is repustateApi, which will be a PHP client for Repustate.com's semantic analysis API. With the...

Voices of the ElePHPant

Voices of the ElePHPant
ElePHPant alliance by DragonBe, on Flickr Cal Evans, PHP community member extraordinaire, has started a new podcast called Voices of the ElePHPant. The podcast is a series of short aointerviews with the people that are making the PHP community special.a So far, Cal has interviewed ten different members of the PHP community: Jeremy Kendall, Anna Filina, Matthew Turland, Paul M. Jones, Kathy Reid, Ian Barber, Pablo Godel, Ivo Jansch, me, and David Coallier. You can subscribe to the podcast feed with iTunes...

Slawek's Blog: Efficient file serving in PHP application with nginx

Slawek's Blog: Efficient file serving in PHP application with nginx
In a quick new post to his blog today Slawek looks at a method he's come up with to more efficiently serve up files in a PHP application using the nginx web server.Sometimes we need to serve files directly from application, especially when file access is restricted by account permissions. Using readfile() to achieve this can successfully kill our web server - even without huge load. To avoid performance problems we can use nginx X-Accel-Redirect feature, and serve files from application through nginx...

PHP Community webinars by Zend (and others)

PHP Community webinars by Zend (and others)
See that button over there on the right that looks like a TV getting ready to escape? If you've never clicked it DON 'T IT NOW . Wait, read this article and THEN click it. It's not going anywhere, you've got time.

Propel Blog: The End of Autoloading

Propel Blog: The End of Autoloading
On the Propel blog there's a recent post talking about how the age of autoloading might be ending and how namespacing could be the next logical step (or could it).Autoloading in PHP is a great time saver. It lets you write concise scripts without the knowledge of the exact directory structure of the libraries you use. But with the arrival of namespaces in PHP 5.3, and the influence of Java over new generation PHP frameworks, autoloading is changing. In the near future, explicit autoloading will be...

Sean Coates' Blog: PHP Community Conference

Sean Coates' Blog: PHP Community Conference
Sean Coates has posted a new entry to his blog today looking at some of his past experiences in the PHP community (from php|architect to OmniTI and now Gimmie Bar) and how knowing people in the community helped him be in the "right place at the right time". Because of this, he recommends the PHP Community Conference as a way to get your own foot in the door and meet the wider community.Nearly everyone I know and have had a long-term relationship with, in the PHP community, I met at a conference. Sure,...