Archive for October 27th, 2006
PHP Developer - October 27th, 2006
In his latest post on the ThinkPHP blog, Andreas Uhsemann stes through a simple conversion he made from using a MySQL database with his application to using PDO on an Oracle system.
At first, one would notice that nothing was happening at all. Just a white screen, and no entries in the error log. Even if one turns on error messages explicitely (you never know the current php.ini settings) with error_reporting(E_ALL), nothing is changing.
He had the connection all set up (manual tnsnames entry and all), but there was something wrong and he couldn’t see it. After changing the error reporting level (to no avail), he went for PDO’s error handling. The result was an “invalid character” error from the extra semi-colon on the end of the statement.
Continue Reading ·
PHP Developer - October 27th, 2006
Greg Beaver shares his excitement today about his book from Packt Publishing, The PEAR Installer, will be released and headed out to shelves next week.
This book originally started as two chapters in the recently released PEAR Book. After receiving the first chapter, a 70-page behemoth on the features available in package.xml version 2.0, the publisher decided this was too exciting and should be its own book.
Greg tals more about the contents of the book, all six chapters/270 pages, including some interesting ideas like using the PEAR Installer to maintain a live website. He also includes a link to be able to order it with a twenty percent discount (pre-order).
Continue Reading ·
PHP Developer - October 27th, 2006
Wez Furlong wants a bit more out of his PHP script, naemly the ability to be able to process things in the background without tying up or immediately using the script that’s running.
In my recent talk on sending mail from php I mention that you want to avoid sending mail directly from a web page. A couple of people have asked me how to implement that, and one of the suggestions I have is to queue your mail in a database table and have some other process act on that table.
He gives a solution that’s a bit more optimized for this solution than just polling the same information over and over - using PDO and LISTEN/NOTIFY processing along with transactions to make the CLI script only grab information when there’s something new.
Continue Reading ·
PHP Developer - October 27th, 2006
It seems the “PHP Women” group is getting support from all over, including from this post on the PHPClasses.org site.
This post lets you know about a new initiative to bring together the women that work with PHP throughout the world.
It explains how spreading the word is vital for the success of communities of specific interests. The article also tells what you can do to help.
Manuel Lemos talks about the group, the formation of it, and who it tries to appeal to. He also gives a suggestion or two of how to help the group really get started (spread the word). There’s also a link to the user group information on the PHPClasses.org site, as well as a link to the “Delegations” section of the official PHP Women site.
Continue Reading ·
PHP Developer - October 27th, 2006
In his continuing effort to redesign his blog, Shiflett.org, he’s been working on one of the things that really makes a blog useful - the commenting system. Specifically, he wants site visitors to be able to add their own code listings to the comments they post. He gives more detail in this new post.
I’ve been playing with this tonight. Feel free to follow along as I go. The first thing you want to do is create an ordered list from the code you want to format ($code in these examples).
He gives an example of a listing using his system and explains how it all works. It’s a mixture of:
- PHP for parsing the data inside the ‘code’ tags
- CSS to correctly style the information, whitespace and all
- Some ini settings to set parameters for…
- …the use of highlight string on the PHP code contents
A little str_replace magic later and you have list items styled as code blocks on your page. Check out his demo for an example.
Continue Reading ·