DevShed: Using Unbuffered Queries and More with SQLite with PHP 5
453770
Continuing with their look at PHP5 and SQLite, DevShed has posted part two of the series - "Using Unbuffered Queries and More with SQLite with PHP 5".   Taking into account the group of characteristics that I mentioned [a few lines above], in this second tutorial of the series, I'll be taking a look at some of them. This will give you a clearer idea of how to use them as part of your existing and -- why not? -- future PHP applications.   They take a look at the hows and whys of working with the unbuffered queries and well as some examples - counting rows and fields in a database table and looking at the use of more "row-processing methods" to get different sorts of data out.
619098
DevShed concludes their series looking at the use of PDO objects in PHP5 with this last tutorial focusing on the use of prepared queries in your PHP application.   In this last tutorial in the series I'm going to show you how to run prepared queries, but in this case we're going to include named parameters into them. Additionally, I'm going to take a quick look at some additional methods bundled with this extension. These new methods can be really useful for working with transactions, in case you want to use this feature with the database system of your choice.   They start with a simple approach to using prepared queries before moving on to an alternate method - binding parameters to the query via bindParam. They wrap up the article with a look at using transactions, both commits and rollbacks.
562776
A different sort of abstraction layer project has been started up and has already seen a few releases - Forage. As mentioned on Rob Young's blog:    Recently I've been working on a search abstraction library for PHP called Forage. The idea is to bring to search what we've had for relational databases for quite a while, abstraction.    On Friday I put up a preview release with three backends; Solr, Xapian and Zend Search Lucene. At the moment it has the bare minimum of features but there will be more soon. In this post I'm going to talk a little about the motivation for the project and then walk through a short example.    He talks about the need for search abstraction (integration and resilience to change) before getting into an example of some code that grabs the data from an RSS feed, passes it in to the Xapian search engine and stores it before looking it over for thier search terms ("yahoo microsoft").   You can download the library if you'd like to try it out for yourself.
675185
In a new entry on his blog today, Marco Tabini introduces us to 5 PHP Performance Tips that we "probably don't want to hear".   I thought it might be interesting to write an article about the performance-enhancing tips you probably don't want to hear about - that is, those that are most likely to produce measurable (and durable) results but do require some effort on your part.   His list consists of:  You Don't Need To Plan Ahead In Order To Have A Plan Combat Database Abuse Do You Really Need A Database Anyway? Scale Horizontally Refactor To Scale Vertically  For each, he explains the title and gives a bit of validation to the point. There's some great mentions of tools that you can use to help accomplish them too - a profiler, the Lucene and Xapian full-text databases, and Lustre.
155453
Popular posts from PHPDeveloper.org for the past week:PHPBuilder.com: AJAX and PHP Part 1Developer.com: Threads Versus The Singleton PatternNick Halstead's Blog: Google Gears Caching of WordPress in PHPDevShed: PHP, MySQL and the PEAR DatabaseDave Dash's Blog: Installing a PHP that can do symfony+doctrine on DreamhostChristopher Jones' Blog: Upgrade PHP with Oracle Application Server on LinuxPHP.net: PHP 5.2.3 ReleasedPro::PHP Podcast: Newscast for May 31st, 2007Secunia.com: PHP Integer Overflow Vulnerability and Security BypassPHPBuilder.com: PHP and Regular Expressions 101
709851
On Developer.com today, Jason Gilmore has written up a tutorial that introduces one of the handy features that came with upgrading to PHP5 - SQLite support:   One such solution is SQLite, a fully-featured relational database that, at just 250KB, is by itself able to easily fit on a floppy disk yet is capable of managing terabyte-sized databases. [...] In this tutorial, I'll introduce SQLite, showing you how this database can offer you maximum return with minimal investment.   He introduces the library by showing how it can be used from the command line (along with an example database) and how to turn on support for it in PHP and make queries in the normal SQL syntax.
165694
Christopher Jones talks today on his blog about a bug he's just corrected and integrated into the release of the Oracle Instant Client that lets PHP correctly take advantage of the temporary LOBS functionality.   When PHP is done with the temporary LOB, it needs to tell Oracle to destroy it. If this isn't done, then the temporary LOB will hang around using DB space until the connection is closed. I just merged a fix worked on by Krishna Mohan and myself for bug 43497.   Example code is included showing two instances of its use - a normal use that frees the memory correctly and the other showing how to create the temporary lob to hold the data as needed.
686373
DevShed has started a small series today that seeks to guide you through the world of SQLite as is interfaced through PHP5.   If you use PHP 5 to build web-based applications that access a database, you might want to consider SQLite. A "lighter" option than MySQL, this database may still suit your purposes if you don't need all of MySQL's bells and whistles. This three-part series covers many of SQLite's most useful features.   Their post today, part one talks about the basics of the protocol and how to get started with it in PHP5. Since it's enabled by default, the chances of it being on your installation are great. They only really look at grabbing data from the database in this part, saving pushing data back in for another time.
638724
Latest PHPClasses.org Releases:pop3-streamUserActionMySQLWrapperPHP AjaxOutput Buffering handlerSite Map GeneratorRandom HTML GeneratorPaginationsGoogle GraphProcess ImagesgCurlRobots_txtProgressODBC-ABMNewsletter QueueProgress ODBC ABM
135369
A quick post from janschneider.de talks about questions regarding the PHP5 compatibility of Horde, IMP, or other applications on the Horde mailing list
123912
This  is very interesting:  "As large MediaWiki deployments may gain performance using Memcached, at some level cost of RAM to store all objects becomes too high. In order to balance resource usage and take more use of Apache server disks, Tugela, the distributed cached on-disk hash database, has arrived."  So Tugela  is like memcached but backed by a disk-based btree.  Since most memcached installs are usually backed by MySQL we would just be duplicating some of the work that MySQL already does. Of course this is probably being a bit unfair.  There wouldn't be any locking in this situation.  I'd like to see benchmarks though.  I'm pretty sure it wouldn't be able to beat an InnoDB install.   ...
444001
Those in the New York area might want to check out a new post Daniel Krook has concerning his talk he'll be giving on native XML databases at next week's New York PHP User Group meeting.   The presentation follows a mailing list thread and resulting blog post that generated a lot of interest and discussion on the topic. It should be a great talk for database administrators, application developers and content producers alike.   According to the summary of the talk, he'll be discussing what XML databases are good for and why you might choose them over a normal database. For more information on attending, check out the NYPHP User Group website.
450911
Mike Lively shares some info about a project he's been working on in a new post to his blog today - a port of Java's DBUnit functionality over to PHP to work happily with PHPUnit:   For those of you not familiar with DBUnit, it is a framework that allows you to easily and quickly test php code that modifies and works with database data. [...] With database code this [testing] is somewhat difficult because you have to ensure that your database is in a known state prior to running your tests.   He gives two examples, the first illustrates the difficulty that can come up when trying to test the database information with a normal unit test and the second an example of the same, but using his port of PHPDBUnit to delete information from the database. It uses two XML files in the test - one to seed the database and the other to give the expected export information.   Check out his post for more details on the port from Java and keep an eye out for a beta release of the library as soon as July.
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.
635920
Popular posts from PHPDeveloper.org for the past week:Padraic Brady's Blog: Complex Views w/Zend Framework - The Final Chapter: ZFE & Zend_Layout in Core!php|architect: Stuff your stockings: single issues 30% offDeveloperTutorials.com: How to Install PHP 5 on LinuxStoyan Stefanov's Blog: Fancy FormattingSymbianOne.com: Your S60 Web server gets a boostAndreas Gohr's Blog: MySimple.php - A lightweight PHPMyAdmin substituteNessa's Blog: Working with Permissions in PHPSymfony Blog: Symfony 1.0.10 is OutMatthew Turland's Blog: Web Scraping Article PublishedJan Lehnardt's Blog: REST Controller for PHP Applications
241556
Cody Caughlan has created a project that brings one of the popular features of Ruby on Rails to the world of PHP5 - database migrations.   One of the cool things I like about Ruby on Rails is the use of "migrations" for maintaining your DB. Migrations have proven to be pretty handy in keeping a local database in sync with the work of other developers. [...] Because migrations are incremental and they are done in a structured manner, it is a great way of pushing out new DB changes to the production database servers.   His framework, Ruckusing Migrations, is a modular framework that makes use of some of the more advanced features of PHP5. It's portable (via an adapter interface) and uses a generic task interface (task files) to load functionality into the framework. There's also plenty of API hooks to allow for a developer to easily create their own custom operations.   Check out the project homepage for more information.
660571
DevShed is starting up a new series this morning with this new tutorial, part one in the creation of a simple blogging system using PHP and MySQL.   In this three-part tutorial we are going to be creating an open blogging system. We are also going to provide scripts that will make it possible to switch to a closed blogging system. This article, which is the first part, will cover the creation of the login scripts for a closed system.   They start with a definition, the difference between an open blogging system and a closed one (if users have to register or not). They start with the creation of the database to store the users in followed by the PHP code for the simple login page. It uses sessions to keep track of which user is logged in. Of course, where there's a log in, there needs to be a log out and they give the simple code for that. Finally, they include a "forgot your password" script to help users when they can't remember the info they'd signed up with.