1 / 11

1. Check the operation system of the equipment you are planning to install the programs

Apache and PHP installation under Windows. 1. Check the operation system of the equipment you are planning to install the programs Must be Windows NT or higher with network support.

ornice
Download Presentation

1. Check the operation system of the equipment you are planning to install the programs

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. Apache and PHP installation under Windows • 1. Check the operation system of the equipment you are planning to install the programs • Must be Windows NT or higher with network support. • Provided that Microsoft does not support older versions of Windows (Win9X), Bireme will also consider those versions unsupported. • 2. Download the required software • Apache: • http://www.apache.org/ - only 1.3.xx versions. NOTE: 2.x versions are unsupported; • - PHP: • http://www.php.net/ - only 4.3.x up to 4.4.0. NOTE: 4.4.1 or greater and 5.x versions are unsupported.

  2. Apache and PHP installation under Windows • 3. Apache installation • Double click the Apache installer package

  3. Apache and PHP installation under Windows b. follow the instructions on the screen until the installation program ask for the domain name, servername and administrator e-mail; Sample fill in for a local domain: i. domain: localhost ii. servername: localhost iii. administrator's e-mail: me@somewhere.net Apache will be set up as localhost. That means you can browse the server homepage at the URL: http://localhost/ in your internet navigator.

  4. Apache and PHP installation under Windows Server execution mode. “service mode” is the standard mode and starts automatically by the operating system. This is the most common, safe and practical mode. Select "Run as service for all users". After pressing “Next” select "Complete" and click on the "Continue" button. The installer displays the default location for installing the Apache software. Default directory is: "C:\Program Files\Apache Group". The user may change it to “C:\Apache” or other location as desired.

  5. Apache and PHP installation under Windows 4. Test the server with the URL provided by the step 3 E.g.: http://localhost/ (it is also available at the IP 127.0.0.1) If the result page is not similar to the one showed on left, review the installation steps. Notice that if a web server was installed prior to the current installation (IIS or even Apache), Apache setup may have set up itself to a different port, e.g.: 8080 (instead of standard http port, 80). Try the URL http://localhost:8080/ or check the httpd.conf file.

  6. Apache and PHP installation under Windows 5. PHP Installation a. Locate the place where the PHP zip package has been saved and double click on it to start installing. This step requires either WinZip or a ZIP compatible software to unpack the PHP package; b. Change PHP base directory to c:\php in case WinZip unzips the contents to a different location; c. Verify the "use folder names" option is set before unzipping.

  7. Apache and PHP installation under Windows 6. Configure PHP All information required to install PHP is available at: c:\php\install.txt It basically means: a. Copy php.ini-dist file to c:\Windows or c:\Winnt (it depends on the operating system you are using) and rename it to php.ini; b. Edit php.ini file, enabling and/or changing the values of the following lines: register_globals = On default_charset = "iso-8859-1" extension_dir = "c:\php\extensions" extension=php_xslt.dll c. Copy php4ts.dll file to c:\Windows\system32 or c:\Winnt\system32 (it depends on the operating system you are using); d. Copy all DLL files from c:\php\dlls to c:\Windows\system32 or c:\Winnt\system32 (it depends on the operating system you are using);

  8. Apache and PHP installation under Windows • 7. Configure Apache with PHP • The file httpd.conf must be edited • (Use: Start -> Programs -> Apache HTTP Server -> Configure ... -> Edit httpd.conf ...); • Requires the inclusion of the following 3 lines: • A line to add the PHP API module to Apache: • # Add to VHL • LoadModule php4_module c:/php/sapi/php4apache.dll • A line to add the Apache support interface to PHP; • # Add to VHL • AddModule mod_php4.c • A line to include the PHP in the MIME types table: • # Add to VHL • AddType application/x-httpd-php .php • NOTE: In some cases, the inclusion of the second line (AddModule mod_php4.c) causes an execution error in Apache. If this happens, just remove it from the file. • It is presumed PHP is installed at c:\php. Notice there is a space here

  9. Apache and PHP installation under Windows 8. Test Apache with PHP Apache standard install sets htdocs directory as the DOCUMENT_ROOT (root directory to the web server pages) Therefore, it depends on the location of your web server installation, c:\program files\apache group\apache\htdocs c:\Apache\htdocs a. Restart Apache; b. Create a file named info.php in the \htdocs directory containing: <? phpinfo(); ?>

  10. Apache and PHP installation under Windows c. open a web navigator and type in at the URL field: http:// localhost /info.php In case everything is working fine, a page similar to the one displayed at the left of the page will display información about PHP, Apache and the operating system used.

  11. Questions

More Related