 | News Feed |
Sections
Community Events
Don't see your event here? Let us know!
|
| feed this: |  |
Developer Tutorials Blog: Running background processes in PHP
posted Friday July 18, 2008 @ 11:18:21
voice your opinion now!
BY CHRIS CORNUTT
New on the Developer Tutorials blog today is this look at handling background processes from your PHP script:
You've checked and double checked the integrity of user input, and you're doing some serious processing. There's only one problem: it's too slow. There's a simple solution: forking your processing script, and running the code as a background process asynchronously. It can email your user when it's done: they'll wait. In this tutorial, I'll show you how to get started with background processes in PHP.
Akash gives examples of the three keys to background processes - starting the script via an exec, talking to the process by passing additional parameters and including code to monitor the state of the background process via something like a MySQL "sessions" table that the script writes to.
tagged with: process background exec parameter mysql session track
Zend Developer Zone: Mastering phpMyAdmin for Effective MySQL Management - Marc Delisle
posted Wednesday July 09, 2008 @ 16:13:36
voice your opinion now!
BY CHRIS CORNUTT
The Zend Developer Zone has posted a new book review (from Ivo Jansch) about a recently release offering from Packt Publishing - "Mastering phpMyAdmin for Effective MySQL Management" (by Marc Delisle).
I mainly use phpMyAdmin for 2 things: browsing the data in the database, and changing the structure of a database. Those are pretty straightforward features, so when packt publishing asked me to review a book on phpMyAdmin, I initially wondered how they could write an entire book on phpmyadmin.
Ivo was pleasantly surprised at the features of the popular database management tool the book covered and notes that it does a great job of explaining the features a config options the tool has to offer. He notes that there's a pretty broad target audience for the book - everyone from the beginner out to the experienced developer wanting to know know about this popular application.
tagged with: book review marcdelisle ivojansch packt phpmyadmin mysql management
Doug Brown's Blog: Zend_Cache is Saving me Money!
posted Friday July 04, 2008 @ 07:55:01
voice your opinion now!
BY CHRIS CORNUTT
Doug Brown has posted a new entry to his blog about how the Zend_Cache component of the Zend Framework has saved him some money.
He and his site were taken offline by his own hosting company because of one little detail - the limit on usage for the shared server was 3% and his site was using 30%. Going through his logs, he found the culprit - a "too many connections" message from MySQL due to the number of requests.
I'll admit, I was in a huge hurry to get this project done, so I wasn't thinking about the long term effects. Needless to say, I wasn't caching my MySQL query results. I know, tisk tisk.
He added a new private method to his class (using Zend_Cache to store the date) and dropped the call into his controller to pulled the cached info whenever it needed it.
tagged with: zendcache zendframework hosting shared mysql connection usage cache
Stefan Priebsch's Blog: Mastering phpMyAdmin Book Review
posted Monday June 30, 2008 @ 12:55:10
voice your opinion now!
BY CHRIS CORNUTT
Stefan Priebsch has posted a book review of Packt Publishing's "Mastering phpMyAdmin" (by Marc Delisle of the phpMyAdmin team).
Kshipra Singh of Packt Publishing was kind enough to send me a copy of Mastering phpMyAdmin 2.11 For Effective MySQL Management to review. The author is Marc Delisle, phpMyAdmin developer and one of the project administrators since 2001. You probably can't get a better author for that kind of book.
Stefan talks about a few of the chapters - the introductory material, one on exporting database structure and data, a look at the relational system and a look at bookmarks (a way of storing statements for later use). He does recommend the book, though, noting that it's crammed with enough information to make it worth the price.
tagged with: book review phpmyadmin packt publishing mysql
Mike Willbanks' Blog: PHP Performance Series Maximizing Your MySQL Database
posted Thursday June 19, 2008 @ 12:01:24
voice your opinion now!
BY CHRIS CORNUTT
Mike Willbanks has posted another part in his "PHP performance" series today. In his previous article, he talked about caching techniques including things like opcode caching and database memory tables. This time he talks about getting the most out of your MySQL database.
Application level SQL performance is much different than the performance of the SQL query itself but rather how it has been designed to work in the application. Many of the items I will be addressing in this area is designing your application to make less queries thus improving scalability and likely performance. However, performance does not always equal scalability as the same with scalability does not always equal performance.
He looks at a few different topics like lazy connections, iterating queries, need-based selects, normalization and a few simple things that you can apply to every SQL your application uses to optimize it as much as possible.
tagged with: performance series maximize mysql database tip sql query
PHPFreaks.com: Basic Pagination
posted Thursday June 19, 2008 @ 08:47:56
voice your opinion now!
BY CHRIS CORNUTT
A new tutorial has been posted on the PHPFreaks.com site today dealing with paginating your data (in their example, info from a database).
It makes way more sense to break up your list into page-sized chunks, and only query your database one chunk at a time. This drastically reduces server processing time and page load time, as well as gives your user smaller pieces of info to digest, so he doesn't choke on whatever crap you're trying to feed him. The act of doing this is called pagination.
They include the full script for those that want to jump right in and the detailed info in the rest of the tutorial for those that need a little more insight. The script gets a count of the results first then uses the LIMIT format for MySQL to restrict the number of rows returned each time and where to start those returned rows from.
tagged with: pagination tutorial mysql database limit
Mark Kimsal's Blog: Addslashes() don't call it a comeback
posted Thursday June 12, 2008 @ 13:36:20
voice your opinion now!
BY CHRIS CORNUTT
As Michael Kimsal points out, there's a new posting on his brother Mark's blog talking about alternatives to addslashes() in your applications.
I've seen a lot of people talking about mysql_real_escape_string() vs addslashes() vs addcslashes(). There seems to be a lot of real confusion about what these functions do (even with the php.net manual around), especially when it comes to character sets. [...] So, I've decided to lay it all out in a few charts so there is no confusion about what each function does and how each can help protect against SQL injection attacks.
He ran some tests based on what the function does to see if it helps with certain things like "escapes with single quotes instead of backslash" and "prevents multi-byte attacks". He compares the speed and testability of the functions as well as provides a multi-byte breakdown oh how the mysql_real_escape_string function works with different character sets.
tagged with: addslashes compare escape string mysql addcslashes multibyte
PHPImpact Blog: BBC's New Infrastructure Java and PHP
posted Tuesday June 03, 2008 @ 11:15:01
voice your opinion now!
BY CHRIS CORNUTT
As mentioned in This new post by Federico Cargnelutti on the PHP::Impact blog today, the BBC website is about to get a pretty radical make over - a move from Perl and static files out to a fully dynamic site made with PHP and Java.
Like most organizations the BBC has its own technical ecosystem, the BBC's is pretty much restricted to Perl and static files. The good news is that they are planning to build a new infrastructure for bbc.co.uk and roll out a new Identity platform on it. This was announced on May during the XTech 2008 presentation that took place in Dublin, where BBC's plans to reinvigorate its technical platform were revealed.
The BBC wanted to upgrade their aging platform to something a bit newer and more flexible and wanted to be able to use things like the Zend Framework for the presentation layer and a MySQL backend to power the site.
tagged with: bbc infrastructure java platform mysql zendframework opensso spring
|