Date: Wed, 07 Jun 2000 13:11:34 -0700 From: "Sara L. Killingsworth" <firstname.lastname@example.org> To: SaraLK@Home.Com Subject: PHP Update and Case Study PHP Server-Side Scripting Language Update-June * There are now more than two million PHP sites. * PHP remains the most popular module for Apache servers, with a greater than 30 percent share of all Apache servers running PHP. * Since May 22, when the final release of PHP 4.0 occurred, tens of thousands of users have downloaded PHP 4.0, which is driven by the Zend Engine. Because some of you have asked how PHP is used, Zend will send a series of application case studies to you over the next few months. The case study for this month relates how Lycos used PHP in its MP3 application and why. Should you be interested in an expanded article or an exclusive case study article, please contact me. Case Study # 1 is below. Have a great Summer! Best, Sara Killingsworth Zend Technologies USA V: 1-480-961-1515 F: 1-480-961-2126 SaraLK@Zend.Com ZEND PHP CASE STUDY # 1 Case Study: Lycos MP3 Site Running PHP To get a comprehensive web search of MP3 files, visit http://mp3.lycos.com. This site, powered by PHP, is a large commercial site providing downloads of music on MP3, download of an MP3 player, message boards, chat rooms, and full web FTP searches of various media types. MP3 currently displays up to 1.4 million-page views daily (that is, the number of ads served), and is expected to reach as many as two million per day. We spoke to the siteís developer, Stig Bakken of FAST (http://www.fast.no). The basic considerations for selecting a development environment for the site were the Lycos specifications, ease of development, and ease of maintenance. In fact, for maintenance reasons, parts of the site, which were originally developed in Perl, are now being ported to PHP. According to Bakken, the work involved in the conversion is justified, considering the great savings in time and money for maintaining a much simpler PHP script to perform the same functions. On the MP3.lycos site, PHP performs a number of tasks. * The common layout elements of the pages are stored in a PHP library. This allows separation of the content and the style information, contributing consistency to the site and allowing the siteís data to be stored in database tools more suited to content storage and retrieval. * Advertisements are fetched from an ad server using PHP. The site uses an HTTP-based protocol specified by Lycos to communicate with the separate ad-serving process. * A customized PHP extension is used to communicate with the search engine and to send the results to the server for displaying in the specified format. * Content is retrieved from a MySQL database using PHP. The PHP script allows for maintenance and update of the database content. * The PHP code enables maintenance of dataset information, the list of indexed sites, stored in a MySQL database. The site accesses a small MySQL database used for content and site maintenance. The data search is done with an FTP search engine, which indexes more than a million files. Communication with the search engine is done using an UDP-based protocol, prospero. Communication with the prosper client is implemented as a separate extension to PHP 4.0. MP3 search began as a hybrid of Apache/PHP, mod_rewrite and a custom web server (ftpsearch-gateway). Since then, FAST has been moving toward making it a pure PHP site. The last porting to PHP is of the FTP search, which is expected to be complete by January 2000. Bakken cites the following reasons for using PHP as the coding language behind the site: * Quick development time. The first version of mp3.lycos.com was developed in approximately two weeks. * Simplified code maintenance. Because PHP is designed for dynamic web site design, implementing PHP solutions means fewer lines of code, as well as code which is easier to read. * Very good compatibility with Apache servers, the most common Internet server used today. * Flexibility in porting to other servers. FAST is interested in trying out Zeus when it becomes viable, and the PHP code requires no adaptation to make the change to another servers. In addition to these benefits, Bakken cites several major improvements that PHP 4.0 added to the previous PHP 3.0 technology. The major benefits are in the areas of speed and flexibility. PHP 4.0 makes it simple to build your own dynamically loadable extensions, says Bakken, which simplifies the maintenance of the site. PHP 4.0 is now in pre-release and is freely available. Bakken is also running an alpha release of the Zend technology, ZendCache, set for release in mid-2000. For the Lycos site, which has more than 500 Apache processes running simultaneously, ZendCache provides huge savings in CPU use. The site has a five-star reliability rating for MP3 server availability. This is the highest rating available; meaning that there is a very high probability of the userís being able to download the file. The Lycos Richmedia search allows visitors to search for images, video, streams and sounds using the FAST Search technology, the same as used for Alltheweb.com, one of the fastest search engines on the Internet. FTP Search and MP3 Search use the FTP Search technology. The FTP site is currently being ported to PHP coding rather than the custom solution previously implemented.