HP là một ngôn ngữ rất linh hoạt và đi kèm với vô số các tùy chọn. PHP hỗ trợ các API vài trăm và giao diện công cụ lập trình khác. Vì vậy, nó sẽ là đáng giá để xem xét những gì bạn muốn PHP để làm và cài đặt các module bạn cần. Bạn sẽ được cấu hình các thông dịch viên PHP với một mô-đun thêm vài, | This page intentionally left blank CHARTER 2 Waging the Configuration Waf The Platforms Building and Installing PHP on UNIX Installation on Windows for IIS Apache Testing Your Installation PHP is a very versatile language and comes with a myriad of options. PHP supports several hundred APIs and interfaces to other programming tools. So it would be worthwhile to consider what you want PHP to do and install only the modules you need. You will be configuring the PHP interpreter with a few extra modules one of which is Boutell s GD library GD SDK . The GD SDK allows you to generate and manipulate images on the fly which I consider to be very important in the development of games. If you would like to install other modules feel free. The majority of the installs are very similar. Let s get to it The Platforms Since PHP is not OS dependent we will be installing and configuring PHP for UNIX and Windows. When you talk about UNIX the Web server of choice is Apache. You can configure PHP in two different ways when you install on Apache. As a CGI Interpreter. As a Apache module. 23 24 Chapter 2 Waging the Configuration War Note You can only configure PHP as an Apache module with the Apache server. When PHP is compiled as an Apache module it runs in the same memory space as the Apache server. This means two things to you 1 you get a performance boost when interpreting pages but 2 you get screwed if a page goes haywire. If one of your PHP pages goes haywire when running in the same memory space as the Apache server the Apache server will halt. This means you are dead in the water no pages will be served up until it is restarted. However if you configure PHP as a interpreter you avoid the whole issue altogether. The disadvantage is obviously a minor performance hit but it is negligible. On the other side of the coin is Microsoft Windows with IIS Internet Information Server or PWS Personal Web Server . Distributions of PHP are available from IIS 3 up to IIS 5 I have included the