Chapter 1 - 4 1 .pdf - Lesson 1 Installing and Configuring...

Doc Preview
Pages 64
Identified Q&As 19
Solutions available
Total views 22
1Lesson 1 Installing and Configuring PHP, Installing PHP Files on Windows Structure 1.0 Introduction 1.1Objectives 1.2General Installation Considerations 1.3How to Install and Configure PHP 5 to Run with Apache on Windows 1.4How to configure Apache for PHP 5 1.5Summary 1.6Model Questions 1.7References 1.0 Introduction PHP and MySQL are usually associated with LAMP (Linux, Apache, MySQL, PHP). However, most PHP developer are actually using Windows when developing the PHP application. We need to understand the configuration /working of Apache (will be covered in this chapter) and MySQL for us to get hold of PHP, so lets start. 1.1 Objectives This chapter explains about installing PHP on Windows. It also covers modifying Apache configuration and PHP configuration so the two can work together.
21.2 General Installation Considerations Before starting the installation, first you need to know what you want to use PHP for. There are three main fields you can use PHP Websites and web applications (server-side scripting) Command line scripting Desktop (GUI) applications For the first and most common form, you need three things: PHP itself, a web server and a web browser. You probably already have a web browser, and depending on your operating system setup, you may also have a web server (e.g. Apache on Linux and MacOS X; IIS on Windows). You may also rent webspace at a company. This way, you don't need to set up anything on your own, only write your PHP scripts, upload it to the server you rent, and see the results in your browser. In case of setting up the server and PHP on your own, you have two choices for the method of connecting PHP to the server. For many servers PHP has a direct module interface (also called SAPI). These servers include Apache, Microsoft Internet Information Server, Netscape and iPlanet servers. Many other servers have support for ISAPI, the Microsoft module interface (OmniHTTPd for example). If PHP has no module support for your web server, you can always use it as a CGI or FastCGI processor. This means you set up your server to use the CGI executable of PHP to process all PHP file requests on the server. If you are also interested to use PHP for command line scripting (e.g. write scripts autogenerating some images for you offline, or processing text files depending on some arguments you pass to them), you always need the command line executable. In this case, you need no server and no browser.
3With PHP you can also write desktop GUI applications using the PHP-GTK extension. This is a completely different approach than writing web pages, as you do not output any HTML, but manage windows and objects within them. For more information about PHP-GTK. From now on, this section deals with setting up PHP for web servers on Unix and Windows with server module interfaces and CGI executables. You will also find information on the command line executable in the following sections.
Course Hero Badge

Want to read all 64 pages?

Previewing 4 of 64 pages Upload your study docs or become a member.
Course Hero Badge

Want to read all 64 pages?

Previewing 4 of 64 pages Upload your study docs or become a member.
Course Hero Badge

End of preview

Want to read all 64 pages? Upload your study docs or become a member.