Webdigity.com: Caching your pages with PHP
606961
On the Webdigity.com forums, there's this new tutorial posted showing how to create a simple caching system with PHP for your site (using cached files).    A problem that this process creates is the server overhead. Every time we execute a query in the database, the instance of our script will call the DBMS, and then the DBMS will send the results of the query. This is time consuming, and especially for sites with heavy traffic is a real big problem.    There are two ways to solve this if you want to make your site faster. First is optimizing the queries Visit through proxy, but we will not talk about this at the present article. The second and most valuable is using some kind of custom caching technique.    Their code, contained in an easy-to-use class, makes it simple to cache the contents of a page just by setting the stop to start the caching from (and where to end).
634435
Andrei Zmievski has posted something new to his blog today about a feature of PHP6 that's finally been hammered down - HTTP input (request) decoding.   There have been no fewer than 4 different proposals floated before, but this one combines flexibility, performance, intuitiveness, and minimal architectural changes, and has only a couple of small drawbacks. Let's take a closer look.   He details the functionality - what it is, what's been decided on, and the advantages of the method. The basic approach is a "lazy" one where PHP will only store the request when it comes in, no filtering or anything, until you want to do something with it (i.e. get it via $_GET, $_POST, etc). When the request for data is made, PHP looks at the encoding settings and formats the data accordingly.   Advantages he mentions for this method include removing the guess-work on PHP's part for which encoding the request is and that it removes some of the overhead by not processing the data until it's actually needed.
388816
Popular posts from PHPDeveloper.org for the past week:Dave Dash's Blog: nginx and symfonyZend Developer Zone: The ZendCon Sessions Episode 6: Project Management Methods to Maintain IT StandSitePoint PHP Blog: Tokenization using regular expression sub patternsIT Jobs Watch: Results for PHP Developers in LondonJob Posting: Digital River Seeks PHP Developer (Eden Prairie, MN)Dan Scott's Blog: Oooh...looks like I've got (even more) work cut out for meLeon Chevalier's Blog: Improve website load time by 500% with 3 lines of codePHPWomen.org: elePHPantsPhil Thompson's Blog: 7 PHP functions that saved my lifeStuart Herbert's Blog: Using suphp To Secure A Shared Server
641738
In a new post to his blog, Robert Swarthout about a PHP frontend he's been developing for working with Subversion repositories:   The frontend needed to be designed in such a way that each developer could access their working copies and make the full range of actions against them. I decided to also use an AJAX setup so that pages would be quickly loaded and updated by a single toggle of a folder.   A few issues popped up, including tracking edits correctly through the interface. His solution revolved around an Apache MPM that could serve different pages to different users and groups. With this solution in place, the functionality could be built up, a list of which he provides including:  create working copy from repository (svn checkout) svn blame svn delete search files (via a grep/find combination, omitting .svn folders) svn rename
214608
If you run a site that has tons of files for your users to download (or even just a few) that you want to keep safe from a direct link, this new article from the O'Reilly PHP DevCenter might be just what you're looking for.
692223
Jim Plush has posted an offifical release announcement about his latest contribution to the PHP community - a debugging tool combining PHP (through the myBIC framework) and the Firefox FireBug extension.   I put together a couple pieces of technology to give the PHP community a debugger/profiler that should make life easier in the "web2.0" world. Are you tired of echo'ing print statements in your ajax calls? Writing to log files? Firing up big ol debuggers just to see what the value of some array is? Well look no further than the new MyBic PHP Debugger.   The tool is a smaller part of his larger MyBIC framework and can do things like writing log files, echo information back out to the screen, and communicate information back out to the Firefox user. There is a standalone version of FireBug that will be posted for those that don't want to have to install an entire framework to use it.   Keep an eye out (here and on his blog) for the links to the release when it's posted. In the meantime, you can check out a screencast [mov] of the package in action or just the screenshots in the blog entry.
434276
DynamicWebPages.de has their latest PHP Usage Statistics posted today. Things just keep looking up for PHP usage - this month it gained a good chunk of domains from last month.
576895
Here's what was popular in the PHP community one year ago today:Symfony Project: Book preview: read the Unit Tests chapterWebCheatSheet.com: Secure File Upload with PHPMichi Kono's Blog: The Best PHP Book Out ThereThe Bakery: Basic User Authentication in (CakePHP) 1.2.xPHPBuilder.com: Dynamic XML with PHPDavid Coallier's Blog: Zend_Db Without PDO part #3 (SVN Repository)?Community News: PHPLondon Conference 2007 AnnouncedMatthew O'Phinney's Blog: Overloading arrays in PHP 5.2.0Ilia Alshanetsky's Blog: 5.2.1 RC3 Released for testingJob Posting: Telio Telecom AS Seeks Senior Web Developer (Oslo, Norway)The Bakery: LightTPD and CakePHP setup in subdirectoriesJob Posting: Yahoo! Seeks Address Book Front-End Engineer (Sunnyvale, CA)HowTo Forge: PHP Programming BasicsJob Posting: Blue State Digital Seeks PHP/AJAX developer for politcal/tech consulting (Boston, MA)Zend Developer Zone:  AJAX Chat Tutorial Part 7 : Usability Improvements
636915
Popular posts from PHPDeveloper.org for the past week:RefreshinglyBlue Blog: PHP vs Ruby - Practical Language DifferencesAndreas Gohr's Blog: Determine StumbleUpon RankingsPHP.net: PHP 5.2.4 ReleasedThe Bakery: Five New Posts - Custom Views, CSS, ViewInFile, ActsAs and Email ValidationPHPBuilder.com: File uploads made easyStefan Mischook's Blog: Turning on display_errors in WAMP - Video Tutorialphp|architect: Pro::PHP Podcast - Newscast for August 2007MT-Soft Blog: Creating a secure PHP production environment from Source CodeCommunity News: Andi Gutmans to Present at AjaxWorld 2007HowTo Forge: How To Set Up A Facebook RSS Feed Reader
345464
php|architect has a new note about a few PHP vulnerabilities:
89086
With the third posting in his "Crouching Javascript, Hidden PHP" series, Harry Fuecks has a new script server that allows you to comingle PHP and Javascript in a very interesting way.
84867
Tobias Schlitt has a great (long) post responding to a proposal made on the php.internals mailing list for the inclusion of "taint mode" in upcoming PHP versions.   Tobias starts with an overview of what "taint mode" is so that everyone's on the same page. His example involves the incoming and outgoing data usually involved in an application and how the incoming can be the most problematic when it comes to the values inside. This is where taint mode can come to the rescue. At its most basic level, it's a method for, assuming everything coming in is "tainted", creating a mechanism to automatically clean the data before it's even touched.   With the basics down, Tobias looks back to the proposal for a few additional comments. He considers the proposal a great way to introduce the functionality to the language. There are some draw backs he mentions, though, including the additional overhead of working through every inputted value.   Overall, I think this whole thing would be a great addition to PHP and I hope this could come for 6.0. What do you think?   You can also check out some other opinions on the matter:  "Tainted mode" pour php on the Kamelot Blog
154380
Paul Reinheimer, one of two behind the funcaday website (providing details on one PHP function each day and special content on the weekends) has posted a supplement to this weekend's posting covering escaping.   The disadvantage with the escape for now, not for later approach is simple. If you save a user's post to the database, then that user's post is displayed 2,000 times there will be some serious differences. [...] You will need to balance your security concerns with performance needs.   The comments on his post back up his suggestions (and include other tips like a recommendation to cache on an even higher level - page blocks).
90155
Based off of a previous article from Mike Willbanks, Stuart Herbert has posted some of his own thoughts on tuning and tweaking your applications for the best performance you can get out of them.   There's some good advice in there, and I thought it'd be a good idea to quickly add a bit more detail about the separate approaches that Mike raises.   He goes over the APC caching, memcache, the "gzip trick", the "Not Modified" header and optimized SQL statements.   He also mentions one thing that Mike didn't mention - a split between static files (no PHP needed) and their dynamic cousins. Having a more pure Apache (no PHP installed) can help give a minute jump in speed that, depending on the size of the site, could really add up from a user's perspective.
723192
Here's what was popular in the PHP community one year ago today:Yet Another Web Development Blog: A PHP Developer Spends a Week with PythonZend Developer Zone: AJAX Chat Tutorial Pt 5: Javascript, Sending Chat Messages, Screen Name ChangesWebDevLogs: ClickHeat - PHP+JS heatmapTemplora.com: Basic PHP Script SecurityVinu Thomas' Blog: Modifying your MySQL databases to be UTF-8 compliantJeff Moore's Blog: PDO versus MDB2AnyExample.com: PHP password generationJason Palmer's Blog: Zip Code To LocationThe Bakery Blog: A gift for all to enjoySara Golemon's Blog: PHP-2006: A look backMatthew O'Phinney's Blog: Overloading arrays in PHP 5.2.0Davey Shafik's Blog: A Year in Review (2006)Jacques Marneweck's Blog: Smarty tip for including multiple javascript filesphp|architect: Final days of our iPod Training Promo!Alexander Netkachev's Blog: About Eclipse PHP IDE php.ini location
273337
Here's what was popular in the PHP community one year ago today:Job Posting: National Auto Warranty Seeks MySQL DBAJob Posting: National Auto Warranty Seeks PHP Web App Developer (Wentzville, MO)DevShed: Creating a Login Script for a PHP Invoicing SystemZak Greant's Blog: The eZ partner program (response to Seth Gottlieb's Commercial O/S business post)php|architect: Application-level Logging with the Zend FrameworkPaul Reinheimer's Blog: Object-Oriented PHP, Concepts, Techniques, and CodeRyan Malesevich's Blog: Fight Spam Comments with Bad Behavior and AkismetZend Developer Zone: SQLite: Lean, Mean DB MachineBuilderau.com.au: Cache PHP scripts with APC modulePro-PHP Podcast: Interview With Cal EvansSitePoint PHP Blog: PHP extension for Cairo graphics libraryTechnobabbler.com: making a radar loop with PHPDevShed: Working with MySQL Result Sets and the Decorator Pattern in PHPJob Posting: exhibit-E Seeks Interactive Developer (New York, NY)Jacob Santos' Blog: Patterns for PHP: Page Controller Draft
407458
PHP Magazine has a new pointer today to an article talking about how to track your visitors using PHP.