To: Paul Fiondella who wrote (27237 ) 6/26/1999 12:48:00 PM From: EPS Respond to of 42771
SATURDAY, JUN. 19, 1999 12:01 AM PT Down to the Wire | Nicholas Petreley Treasure trove: PHP offers features that will make your Web apps sparkle I JUST DISCOVERED a hidden gem. I'm talking about a programming environment called Hypertext Preprocessor, aka PHP (www.php3.org). PHP is a Web scripting language that is the functional equivalent of Microsoft's VBScript and Active Server Pages except that PHP is more platform-agnostic. PHP runs on most free and commercial versions of Unix. It currently has limited support for Apache and Internet Information Server on Windows NT. I'm currently running PHP Version 3 (PHP3) under Linux as an integrated module for the Apache 1.3.6 Web server. Considering that PHP3 is probably one of the leading plug-ins for Apache (the most popular Web server on the planet), it's almost embarrassing to call it a "hidden" gem, or to admit that I'm only now getting familiar with it. There are already 500,000 Internet domains that use PHP3. A growing list of ISPs are offering support for PHP3. And you can find an impressive catalogue of commercial sites using PHP at www.php3.org/sites.php3. PHP3 provides myriad powerful features for your Web applications. For example, you can use PHP3 to add access to most SQL database servers. PHP can also hook into LDAP, Netscape Directory, IMAP, and SNMP; the graphics library GD; file-compression libraries; and many more resources. Perl is probably the only Web application development tool that has more plug-ins. The PHP3 language contains elements of Java, Perl, and C. Most people tend to wax rhapsodic about its similarity to Perl or Java, but I really appreciate the fact that the language syntax most resembles C. It's not that there's anything special about C syntax, but I'm more familiar with it than any other language. So I found it remarkably easy to be productive with PHP3 almost immediately. I was able to tinker together a crude Web interface to a MySQL contact database in just a few minutes. PHP3 is sometimes compared to CGI, but such a comparison does not do PHP3 justice. The reason you can be productive so quickly is that its programming integrates right into your HTML like VBScript and JavaScript do. In other words, unlike CGI, you don't have to write programs that spit out HTML as their output. You simply integrate your programs into the HTML pages themselves, shifting back and forth between PHP3 and HTML as needed. Integrating forms in PHP3 is a cinch. If you want to see a good example of PHP3 and MySQL on Linux in action, check out the site www.zcentral.com by SDN Online. Zcentral is a brilliantly conceived free Web-based suite of groupware applications. In fact, it was Zcentral that got me interested in investigating PHP3. One reason this site is so brilliant is that SDN Online figured out a way to motivate people to get others to join Zcentral. Each person who signs up gets a unique Zkey (my Zkey is npetreley). If you want to exchange e-mail or set up meetings with other people, all you have to do is tell them your Zkey and ask them to join Zcentral. They use your Zkey to add you to their address book, e-mail you, and invite you to appointments. But the best thing about Zcentral is that it is a secure site and gives you surprisingly granular control over the secrecy of your personal data. I can grant or deny access to any of my personal data on an individual basis. That means I can give one person my home address, and the next person my work number. And because this is a Web-based system, any changes I make to either are immediately reflected in their address books. Here are some more cool features that I found: If I allow people to see my home address, they not only get my address, but Zcentral offers them a map and written directions to my home. I can also grant others the ability to see only the free time in my schedule, to see all the current appointments I have scheduled, or give them the ability to read and write to my calendar. These are the kinds of features we take for granted in dedicated group schedulers, but I'm not used to seeing them in free Web-based calendars. If it wasn't for Zcentral, I'd still be ignorant about PHP3. Should I have known about it all along, or are you just discovering this jewel yourself? Let me know. infoworld.com