home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Web Database Applications with PHP \& MySQLWeb Database Applications with PHP \& MySQLSearch this book

E.2. Middle Tier Resources

This section lists resources that contain more information on the Apache web server, web performance tuning, networking, PHP programming, and third-party PHP add-ons including Integrated Development Environments (IDEs), script optimization tools, and commercially supported installation packages.

E.2.1. Web Server and Web Technology Resources

More information on the Apache web server can be found in the following resources:

More information on web servers, web performance tuning, and web performance modeling and traffic characteristics can be found in the following resources:

  • Web Performance Tuning, P. Killelea (O'Reilly).

  • Capacity Planning for Web Performance: Metrics, Models, and Methods, D. A. Menascé and V. A. F. Almeida (Prentice-Hall).

Here are some good background books that cover a range of topics in the middle tier, focusing on web servers and web technology, but are slightly out of date:

  • How to Set Up and Maintain a Web Site, L.D. Stein (Addison Wesley).

  • Web Server Technology: The Advanced Guide for World Wide Web Information Providers, N.J. Yeager and R. E. McGrath (Morgan Kaufmann Publishers).

E.2.2. Networking and Web Resources

  • The W3C web site:http://www.w3.org/History.html. This URL provides a good starting point that includes pages containing many links, time lines, growth statistics, and other useful resources.

  • Internet Core Protocols, E. Hall and V. Cerf (O'Reilly). This book offers a good introduction to the protocols of the Web.

  • The HTTP/1.0 specification is contained in RFC-1945 and is found on the IETF web site at http://www.ietf.org/rfc/rfc1945.txt.

  • The HTTP/1.1 specification is contained in RFC-2616 and is found on the IETF web site at http://www.ietf.org/rfc/rfc2616.txt.

  • The Uniform Resource Identifiers (URI): Generic Syntax specification is contained in RFC-2396 and is found on the IETF web site at http://www.ietf.org/rfc/rfc2396.txt.

  • RFC-1180: TCP/IP Tutorial, T. Socolofsky and C. Kale. This RFC provides a tutorial on how data is passed through a TCP/IP network and can be found at: ftp://ftp.rfc-editor.org/in-notes/rfc1180.txt.

E.2.3. More About PHP

This book can't replace an introductory programming book or any of the excellent PHP resources that are available in add-on products or from the Web. This section is a brief overview of those resources.

E.2.3.1. Books

There are now more than 20 books covering PHP, and many of these also introduce interaction with the MySQL DBMS. We recommend the following books—in no particular order—as offering good coverage of PHP scripting topics:

  • A Programmer's Introduction to PHP 4.0, W. Gilmore (Apress Publishing). Designed for moderately experienced programmers who are new to PHP.

  • Beginning PHP4, C. Lea, W. Choi, A. Kent, G. Prasad, and C. Ullman (WROX Press). Recommended for novice programmers.

  • PHP Essentials, J. Meloni (Prima Publishing). Recommended for novice developers who are interested in introductory web database topics as well as PHP.

  • PHP Bible, T. Converse and J. Park (Hungry Minds, Inc.). Recommended for novice programmers. More than half the 689 pages cover PHP programming.

  • PHP Fast & Easy Web Development, J. Meloni (Prima Publishing). Recommended for beginners.

  • PHP3: Programming Browser-Based Applications with PHP, D. Medinets and D. Medinets (McGraw-Hill). Recommended for intermediate programmers, but the book is written about PHP3 and doesn't include many of the new features that are core to development in PHP4

  • Programming PHP, by R. Lerdorf and K. Tatroe (O'Reilly). A good introduction to PHP.

Many books omitted from this list are also excellent books, but they may focus more on web database topics than on PHP, or they overlap significantly with the content of this book. A detailed and frequently updated list of all PHP and related books can be found at: http://www.php.net/books.php.

E.2.3.2. Web resources

The best place to start is to check the list of links at the official PHP site, http://www.php.net/links.php.

Here are some resources we frequently use:

The annotated online PHP manual at the official PHP site. Includes many comments for each library and function and tips on use and common problems encountered.

Site of the commercial company held by long-term developers of PHP. Includes articles, resources, free code, and tutorials.

Articles, tips, tutorials, and scripts; includes many tutorials on installation in a variety of environments.

Scripts, code fragments, and documentation.

Articles, documentation, and code fragments.

Tutorial-style articles on a range of PHP topics.

A simple, low-bandwidth site that contains PHP code fragments and some complete applications.

Julie Meloni's site that supports her two books described in the last section. Includes code and tutorials, some of which aren't covered in the books.

E.2.3.3. Libraries

PHP has many libraries available for most common tasks in web database applications. In this section, we list most of the PHP libraries and point to other chapters in which selected libraries are discussed in more detail. For most libraries, we provide brief or only partial information.

The following is an alphabetically sorted list of the libraries:

Apache HTTP server functions
Includes a function to retrieve all HTTP headers, getallheaders( ).

Array functions
There are almost 50 functions to sort, merge, split, iteratively process, and return information about arrays. We discuss many of these functions in detail in Chapter 2.

BCMath arbitrary precision mathematics functions
A library of functions to perform high-precision calculations with large numbers.

Bzip compression functions
Tools to read and write files compressed with Julian Seward's highly effective compression algorithm; however, it's a bit slow compared to gzip.

Calendar functions
For conversion between various calendars, including the Jewish and Gregorian calendars, and for finding the date of Easter.

CCVS API functions
RedHat's solution for credit card transaction processing.

Character type functions
Additional string functions to check what characters are contained within a string. These can be used as a replacement for or in addition to the validation methods described in Chapter 7.

ClibPDF function library
Requires purchase of a license if used for commercial applications: The ClibPDF library accesses a set of C functions for creating Adobe PDF documents. The C library ClibPDF is available from http://www.fastio.com along with a licensing agreement.

CURL (client URL library) functions
Functions that communicate with resources using the FTP, gopher, HTTP, LDAP, Telnet, and other protocols.

Database functions
The MySQL library functions are discussed in detail in Chapter 4, with additional information on some functions in Chapter 5 and Chapter 6. Techniques for using the other DBMS libraries to connect to selected DBMSs are discussed briefly at the end of Chapter 4. Many other DBMS libraries are also available and detailed in the PHP manual; we don't discuss them here.

Date and time functions
The basics of date and time functions are described in Chapter 2. Examples are also discussed in Chapter 7.

Direct IO functions
A function library that accesses a file descriptor. The library is C-like in functionality, and C programmers will feel at home with the functions.

Directory functions
Changes directories in the filesystem, list files in a directory, etc.

Error handling and logging functions
Functions to change error reporting. Controlling the severity of PHP errors that are detected for debugging purposes is discussed in Chapter 2, and custom error handlers are discussed in Chapter 10.

Encryption functions
Selected encryption functions for producing cipher-text from plain text—and reversing the process—are discussed in Chapter 9.

eXtensible Markup Language (XML) functions
XML is a data format for structured document interchange, and this library provides tools to parse and retrieve components of XML documents.

Filesystem functions
Retrieves information about files, creates and modifies attributes of files, reads and writes files, and performs many other low-level file operations.

Forms Data Format functions
Tools to handle form data sent using the Forms Data Format (FDF) that's part of Adobe's PDF standard.

Functions that implement the File Transfer Protocol.

Functions functions
Seriously! A set of functions that inspects whether a function exists and returns details, such as the number of parameters to a function.

GNU teletext
A GNU project to internationalize programs by making substitution of program output messages in different languages easier.

GMP functions
More math functions for arbitrary-length integers using the GNU MP library; an alternative to the BCMath library described earlier in this section.

HTTP functions
The header( ) function creates HTTP headers in a response to a web browser. It is discussed and used in examples in Chapter 5 to Chapter 13. The function setcookie( ) sets a cookie in a web browser and is discussed in Chapter 8.

Hyperwave functions
This library offers functions to access the Hyperwave information system or document database. Use of the library requires purchase of the enterprise Hyperwave Information Server.

Image and graphics functions
Contains over 50 functions to draw images and render true-type fonts using the GD library.

IMAP, POP3, and NNTP functions
Network-oriented functions that use these protocols to retrieve and process email messages and Internet news postings.

IRC gateway
Functions to access an Internet relay chat (IRC) gateway. IRC is an Internet-base chat room.

Lightweight Directory Access Protocol (LDAP) functions
Tools to connect to and retrieve information from servers that store hierarchical directory information using LDAP.

Mail functions
Really one function, mail( ), to send an email to a destination; discussed in Chapter 12.

Mathematical functions
Functions to do just about anything to a number, but not to very large numbers (for those, use the BCMath or the GMP library); for example, the mathematical library includes trigonometry, random number generation, logarithm, and exponential functions. Many of these are discussed in Chapter 2.

Modular Calendar Access Library (MCAL) functions
Tools to access and manage an event calendar, such as a desktop diary, that is managed the underlying MCAL C library.

Ming functions for Flash
Tools that allows creation of Flash format movies.

mnoGoSearch functions
Functions that access the freely available text search engine mnoGoSearch.

Network functions
Networking libraries for high- and low-level network communications; for example, includes functions to check if a domain name exists, and convert numeric IP addresses to domain names and vice versa. A short background on networking can be found in Appendix B

Output control
Manages the buffering of output by PHP, allowing control of the PHP script engine's output.

PDF functions
Functions that create and manipulate Adobe Portable Document Format (PDF) documents.

POSIX functions
Functions that get information about processes, users, and other system-oriented aspects of functions defined in the IEEE 1003.1 (POSIX.1) standards document.

Program execution functions
These are discussed briefly in the context of securing a web database application in Chapter 5.

Pspell functions
Spelling functions that can not only check spelling but also make suggestions for corrections.

GNU Re-code functions
Functions that convert strings from one character set to another.

Regular expressions
Along with the string functions, an introduction to regular expression functions is covered in Chapter 2. (We cover only the native regular expression library that conforms to the POSIX 1003.2 standard, not the Perl-compatible regular expressions functions).

Satellite CORBA client extension functions
Functions that can access and use CORBA distributed objects.

Semaphore and shared memory functions
Functions based on Unix System V semaphores that allow multiple users controlled access to shared resources such as global variables in shared memory.

Session management functions
These functions are covered in detail in Chapter 8; an alternate session management module is discussed in Appendix D.

SHMOP shared memory functions
These functions duplicate the functionality of the System V shared memory tools described previously, but without some of the overheads in creating and managing shared memory spaces.

Simple Network Management Protocol (SNMP) functions
Functions that interact with SNMP agents to find available objects and to set those objects.

SWF Shockwave Flash functions
Another function library to create and use Flash format movies, with overlapping functionality to the Ming library described earlier.

Socket functions
Low-level network libraries to open, send, and receive data, and close network sockets (sockets are often loosely referred to as ports, which are discussed in Appendix B). Has some overlap with the network library, but the socket library is more concerned with low-level networking tasks.

String functions
The popular string functions are discussed in detail in Chapter 2.

URL (Uniform Resource Locator) functions
Tools that encode and decode MIME base64 encoded data used in HTTP and email, that encode and decode special characters from URLs, and that parse a URL and return its components.

Variable functions
Variable functions for determining and setting types are covered in Chapter 2.

Web Distributed Data eXchange (WDDX) libraries
Tools that process the XML-like format used in the open standard WDDX format, a standard that permits interchange of data between web-scripting languages such as PHP, ASP, and ColdFusion. More information about the WDDX Software Development Kit (SDK) can be found at http://www.openwddx.org.

XSLT (eXtensible Stylesheet Language Transformations) functions
XSLT is a language for transforming XML documents from one standard XML format to another.

YAZ functions
A library that implements the Z39.50 protocol for information retrieval. Z39.50 can be used, for example, to issue a remote search on a text database and to return results in a standard format.

YP/NIS functions
Tools that manage network functions remotely, such as password files.

Zlib compression functions
A set of functions to read and write gzip files compressed using the algorithms of Jean-Loup Gailly and Mark Adler.

Several of these function libraries are immature and are dynamically being improved and changed. New libraries emerge every month. Some libraries are outdated, and the projects that underlie them are inactive. However, for most libraries, several successful installations and uses have been reported, and the latest details can usually be found along with example code at the PHP web site in the annotated manual, http://www.php.net/manual/.

We have omitted any discussion of wholly redundant libraries, those used exclusively with Microsoft Windows, very new libraries, unstable libraries, and those libraries that aren't used in web applications.

E.2.3.4. Third-party products

Zend Optimizer
A freely available code optimizer that improves the performance of the intermediate code generated by the Zend scripting engine. The Zend web site is http://www.zend.com.

DBG: PHP Debugger
A free interactive debugger for PHP that includes a code profiler that finds code bottlenecks. Available for Microsoft Windows and Linux, and licensed under the same license as PHP. Available from: http://dd.cron.ru/dbg/.

BWare have recently released this free caching tool that caches PHP precompiled scripts in the web server for fast execution when a script is run a second or subsequent time. The afterBurner source code is available from http://afterburner.bware.it.

Alternative PHP Cache (APC)
An alternative free PHP script caching tool that is covered by the same license agreement as PHP itself. The APC source is available from http://apc.communityconnect.com.

Zend is a company held by long-term developers of the PHP script engine. Their web site, http://www.zend.com, sells several commercial PHP-specific products:

Zend Cache
Tool that integrates with the Zend engine to better cache scripts, prevent some scripts being cached, and reduce latency. If high-throughput of a web database application is required, Zend Cache is a useful tool.

Zend Encoder
Tool that converts text scripts to an intermediate format that can be distributed, offering reasonable protection of copyright and the intellectual property in scripts.

Zend IDE
New integrated development environment for PHP that includes a customizable editor, syntax highlighting, and a debugger.

Zend Launchpad
Tool that allows systems administrators to maintain their PHP installation through upgrades. It also guides administrators through the PHP installation process and assists in selecting tools

NuSphere market several products that include and support PHP through their web site http://www.nusphere.com. NuSphere products have optional additional email, web, and phone support. Here's a list:

  • NuSphere MySQL and NuSphere MySQL Advantage are commercial products that bundle together Apache, MySQL, and PHP with installation tools and other supplementary products. As discussed in Appendix A, a free package is available for download.

  • NuSphere PHPEd Advantage is a commercial package that includes PHP, MySQL, and Apache as well as PHPEd, a PHP integrated development environment (IDE) for Microsoft Windows, and other supplementary products.

ActiveState offer an IDE for Microsoft Windows and Linux called ASPN Komodo. Komodo can be used for free under the Linux operating system or for free under the Microsoft Windows environment by students, home users, and nonprofit organizations. A commercial license for Microsoft Windows is required for other uses. Komodo is available from http://www.activestate.com. There are several other IDEs for PHP available including the PHPub development environment, K PHP Develop, tsWebEditor, PHP Coder, and BBEdit.

E.2.3.5. Open source PHP applications

The following are popular examples of open source web database applications. Most either provide good solutions to common application requirements, or make excellent starting points for developing components or systems. The list isn't intended to be comprehensive but instead are representative examples of different application types.

A URL bookmarking management system, http://www.renaghan.com/pcr/bookmarker.html

Web site content management system for managing small- to medium-size web sites, http://www.basitonline.com/en/

Web-based news and announcement system, http://bplog.blackplasma.net

dev/coin online shop
For building simple online stores, http://www.devcon.net/software/shop/

A system to automatically send out emails about birthdays and other events, http://sourceforge.net/projects/e-reminders/

A customer billing and payment management system, http://sourceforge.net/projects/gcdb/

The Humble Portal Engine that brings together content to build a news portal, http://sourceforge.net/projects/hpe/

The Incyte Project Manager for tracking and managing projects, http://udpviper.com/project.php?project=ipm

Les Visiteurs
A web site statistical analysis package for analyzing and producing information about site accesses, http://www.phpinfo.net/applis/visiteurs/

A software development bug tracking system, http://mantisbt.sourceforge.net

An email, calendar, contact, and event management system, http://phorecast.org

A web-based bulletin board forum, http://phorum.org

A visitor guestbook, http://www.bastian-friedrich.de/comp/guestbook/

A system to track your DVD collection, http://ugo.scarlata.it/?pid=phpdvd

A PHP-based chat room, http://www.phpheaven.net/projects/phpMyChat/

Reusable components to build an online shop, http://www.phpshop.org

A self-described rogue content management system, http://www.postnuke.com

Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.