APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

© January 2005 Tony Lawrence

PHP 5 Power Programming

Amazon Order (or just read more about) PHP 5 Power Programming  from Amazon.com

More Books

I've really been meaning to get into PHP. I can see the advantages, but as usual, lack of time to learn enough to be comfortable has kept me mired in my old cgi includes. I was happy to see this book, and hoped it wouldn't be too far over my head.

One small problem: I didn't have anything running anything newer than PHP 4.3.8. Even the new RedHat server that I had just run "up2date" on only had 4.3.2. I didn't want to mess with my real web server, so I downloaded source to the RedHat and tried compiling it there. I had to add bison and flex before configure even wanted to get started, and finally I had to do it as:

./configure --disable-pear --disable libxml

"Pear" is the PHP Extension and Application Repository, kind of like CPAN for PHP. I suppose I'll want that eventually, but for now I'm probably far away from needing to add anyone else's code. I felt I could definitely live without XML extentions for a while also, and without these two, php5 happily compiled on RedHat 2.4.21-4.EL.

Now, with a working PHP5, it was time to take a look at the book. It begins with a description of new features, but chapter 2 is an overview of PHP in general, which is what I really needed. PHP is very comfortable for a Perl user like me, but it was helpful that this chapter pointed out things that I needed to know, like PHP's different ideas concerning global variables (there aren't any), and the "superglobals". Things like string offsets ($str{2}) are going to look like hashes to me, but I'll just have to get used to that.

Chapter 3 jumps into the new object oriented features. For those who have some managed to avoid any prior exposure to OOP, there's a light overview with simple examples. I like that much better than the more typical case where some OOP evangelist goes off into a complex example of inherited objects. This does get to the more complicated stuff (and especially in Chapter 4) , but at least they started simply.

Chapter 5 is "How to write a Web Application with PHP" and I was glad to see that ten pages of it dealt with security issues. After that, hooking PHP to databases, and then error handling. PHP5 has try, catch and throw - if you have missed these in other languages, you'll learn about them here. This was all followed by chapters about PEAR and XML - I skipped by those for now, and was more interested in the long chapter on performance. As my cgi scripts have become more complex, performance is a hot-button, so I found this part quite interesting. The book finishes with how to write PHP extensions (I'm a long way from that!) and using PHP for shell scripts, which is something I will be doing while learning. There's also an appendix on Zend Studio, and the back inside cover has a 90 day eval license printed on it, but again that's far beyond my current need or ability.

Overall, I probably need something more basic to get going here. I do have some other PHP books kicking around, so I'll dig those out and then come back to this again.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> PHP 5 Power Programming

Inexpensive and informative Apple related e-books:

Take Control of Numbers

Sierra: A Take Control Crash Course

Take Control of Automating Your Mac

Take Control of the Mac Command Line with Terminal, Second Edition

iOS 10: A Take Control Crash Course

More Articles by © Tony Lawrence

Are you sure that that is the correct title of Chapter 5? There's an entire chapter on programming in Perl?

Evan "JabberWokky" E.

---January 19, 2005

Sorry :-)

Fixed it..


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

There is no programming language, no matter how structured, that will prevent programmers from making bad programs. (Larry Flon)

Linux posts

Troubleshooting posts

This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode

SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)