1 / 20

Installing and Configuing php MIS 4530 Dr. Garrett

Installing and Configuing php MIS 4530 Dr. Garrett. Understanding Binary and Source Code Installations. Binary format (or binaries ) refer to compiled files, such as executable installation programs Source code is the original programming code in which an application was written

chione
Download Presentation

Installing and Configuing php MIS 4530 Dr. Garrett

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Installing and ConfiguingphpMIS 4530Dr. Garrett

  2. Understanding Binary and Source Code Installations • Binary format (or binaries) refer to compiled files, such as executable installation programs • Source code is the original programming code in which an application was written • Source code must be compiled, or processed, and assembled into an executable format before it is used • Compiled programs only need to be recompiled when their code changes

  3. Installing and Configuring a Web Server • Apache is the most popular Web server software used on the Internet • Microsoft IIS for Windows is the second most popular server software • In Windows, a service refers to a program that performs a specific function to support other programs

  4. Installing and Running Apache on Windows • Go to http:/httpd.apache.org/download.cgi • Download the apache_2.0.52-win32-x86-no_ssl.msi installation file • Navigate to the installation file and from the Welcome screen, click Next • Accept the terms of the License Agreement, click Next • Read the contents of the Read This First screen, click Next

  5. Installing and Running Apache on Windows (continued) • Accept the default values, click Next • Select a Typical installation, click Next • Accept the default Destination Folder directory, click Next • Click Back to make changes or click Install to finish • Click Finish

  6. Installing and RunningInternet Information Services on Windows • Open the Control Panel from the Start menu • If using Windows XP, select Switch to Classic View • Select the Add or Remove Programs icon • Click Add/Remove Windows Components • Click the check box next to Internet Information Services (IIS), click Next

  7. Installing and RunningIIS on Windows (continued) • After the installation is complete, click Finish • If prompted, restart Windowsotherwise close the Control Panel

  8. Testing Your Web Server • Open your Web browser • Type http://localhost/ in the Address box, click Enter Figure 2-2 Apache’s default Web page

  9. Testing Your Web Server (continued) • Type http://127.0.0.1/ in the Address box, click Enter Figure 2-3 Web page informing you that IIS is running

  10. Configuring Apache • To configure ports and other settings you must edit the httpd.conf file • For UNIX/Linux • /usr/local/apache2/conf • For Windows • C:\Program Files\Apache Group\Apache2\conf • Lines that begin with the pound sign (#) are informational comments • Lines without pound signs contain directives

  11. Configuring Apache (continued) Figure 2-4 httpd.conf PHP Programming with MySQL

  12. Configuring Apache (continued) • Directives define information about how a program should be configured • The DocumentRoot directive identifies the default directory from where Apache serves Web pages • The Alias directive identifies other directories that Apache can use to serve Web pages

  13. Configuring Internet Information Services Figure 2-5 Default Web Site Properties dialog box

  14. Installing PHP on UNIX and Linux Systems Running Apache • Go to http://www.php.net/downloads.php • Run the gunzip command: gunzip php-5.0.3.tar.gz • Run the tar command:tar xvf php-5.0.3.tar • Change to the php-5.0.3 directory:cd php-5.0.3 • Run the configure command:./configure

  15. Installing PHP on UNIX and Linux Systems Running Apache (continued) • Compile the PHP source code with the make command • Run the make install command in the php-5.0.3 directory • Specify which configuration file you want to use with PHP:cp php.ini-dist /usr/local/lib/php.ini

  16. Installing PHP Windows Running Apache or IIS • Go to http://www.php.net/downloads.php and download the latest Windows binary installer • Navigate to the installation file and from the Welcome screen, click Next • In the License Agreement screen, click I Agree • In the Installation Type screen, select Standard, then click Next • Accept the default destination location, click Next

  17. Installing PHP Windows Running Apache or IIS (continued) • In the Mail Configuration screen, accept the default values of localhost, click Next • In theServer Type screen, select the type of Web server that you want to use with PHP, click Next • In the Start Installation screen, click Next to begin installation • Click OK to close the dialog box of the Web server you selected

  18. Configuring Apache for PHP on UNIX/Linux Platforms • Open the httpd.conf file from the /usr/local/apache2/conf directory • Search for the LoadModule directive:LoadModule php5_module libexec/libphp5.so • Add the AddType directive to the end of the file:AddType application/x-httpd-php .php • Save and close the httpd.conf file • Restart Apache with the command:/usr/local/apache2/bin/apachectl restart

  19. Configuring Apache for PHP on Windows • Click the Start menu and point to All Programs • Select the Edit the Apache httpd.configConfiguration File command • Add the following to the end of the file:ScriptAlias /PHP/ “C:/PHP/”AddType application/x-httpd-php .phpAction application/x-httpd-php “/PHP/php-cgi.exe” • Save and close the httpd.conf file • Restart Apache and select the Restartcommand

  20. Configuring PHP Figure 2-6 The php.ini configuration file PHP Programming with MySQL

More Related