Installing Php In Apache 2.2 Programs

Posted on
Installing Php In Apache 2.2 Programs Average ratng: 5,0/5 7552 votes
  1. Apache Php Windows

How to install Apache 2.x web server on WindowsApache is the most popular web server. This article illustrates how to install it on Windows (XP, Vista, Windows 7) as part of aWAMP (Windows, Apache, MySQL, PHP) web development environment.The order of installation for WAMP environmentTo make installation a smooth process for a WAMP development environment, we want to install thesecomponents in the following order.1.2. Install Apache 2.x3.For older versions of WAMP, here are the articles.1.2.3.Steps to install Apache on Windows as development machineHere is a list of Apache HTTP server related pages:.Step 1: Download Apache 2.2In this article, we use Apache 2.2.14 to demonstrate the installation process. Other 2.x versions have very similar installation steps.(1) Go to Archived Win32 binaries download page here(2) Download Apache 2.2.14 msi installer.Here is the direct download linkStep 2: Verify the downloaded file for integrityApache download comes with a MD5 hash value. This hash value is athat can be used to verify data and file integrity. File to verify: apache2.2.14-win32-x86-nossl.msi.

Link from Apache to obtain the MD5 hash of this file:MD5 hash obtained from Apache.org for this file: e41bf079b88265d733a559f33c559ce6Screenshot below shows the Apache installation file was verified by freeware.Checksum calculated by HashCalc:As we see above, the MD5 checksum value by Apache.org is the same as the one calculated by HashCalc, which meansthe file is in good shape and can be trusted.Step 3: Start installationDouble click the installation file. The installation should start straight away.Here are 9 screenshots.3.1 Welcome3.2 License Agreement3.3 Read First3.4 Server InformationThis step needs a bit explanation. Add localhost to both Network Domain and Server Name box. Administrator's Email Address can be anything you like.

These info are used for Apache configuration file but you can change them after the installation.Next, select the first radio button as recommended. This way, Apache will be running as a Windows Service.

See Step 6 below for more info about how to start, stop, restart Apache.3.5 Setup TypeChoose Typical as the setup type.3.6 Destination FolderYou can leave the default installation folder as is.3.7 Ready to install3.8 Installing in progress3.9 Completed successfullyStep 4: Test your installationAfter install, open web browser and type either of the following URLs into your browser's address bar and hit Enter key. or 192.168.0.1 (eg. Local network IP address)If Apache has been installed correctly, you should see a success message opened in your web browser, as shown below.The text actually comes from the index.html file in this directory C:Program FilesApache Software FoundationApache2.2htdocs which is thedefault document root directory after Apache is first installed.

The document root directory can be changed in Apache configuration file. See Step 5 below.Note: could be your local machine's auto assigned IP that Microsoft has reserved (addresses 169.254.00 to 169.254.255.255).If you use a router which sets up a LAN (Local Area Network), the router can assign an internal IP. For example,Linksys assumes a default internal IP address of 192.168.0.1To find out your computer's IP address, open a command line window and run ipconfig command:. Click Start. Click Run. In the Run command box, type cmd and hit OK.

Php apache

When command line window is opened, type ipconfig and hit Enter key.Step 5: Edit the Apache httpd.conf Configuration FileApache Configuration File is located at C:Program FilesApache Software FoundationApache2.2confhttpd.conf. It can also be opened from the Start menu as below.Make sure you change the httpd.conf file according to the screenshots shown in the following section.5.1 Change your document root directory to a more meaningful one.Inside the configuration file, DocumentRoot is the directory out of which Appache executes web documents, eg. PHP, HTML, etc. It's the directorywhere your PHP or other web page files are placed into.1. Commented out DocumentRoot 'C:/Program Files/Apache Software Foundation/Apache2.2/htdocs'2. And then added DocumentRoot 'C:/test'So, all my php files will be located in a folder named as test on my C drive.3. Commented out 4.

Apache

Apache Php Windows

And then added 5.2 Add PHP file type into DirectoryIndexAdd the default document file names that Apache will run if we don't type its filename in web browser.Note: for this article series, we will install PHP next.Edit the line as below shows, ie., DirectoryIndex index.html index.htm index.php5.3 If you need to rewrite URLs on your site, enable the modrewrite module.Web pages can pass variables in URLs and this is known as dynamic URLs. To make these URLs search engine and user friendly, we often changedynamic URLs to static URLs.