Install Apache 2.4 This step looks to be obvious. However, after I am done with the entire installation, it looked to be a bit tricky especially when you got 64-bit Windows. If you go to website,, you are taken to If you have 32-bit machine, well and good. However, if you have 64-bit machine, and you downloaded the install-able from this page, you would end up installing 32-bit apache server which would create issues while configuring 64-bit PHP. What you need is 64-bit Apache 2.4.2 Http server. There are different pages on web from where you could get it. I downloaded it from. Take the first one, apache_2.4.2-x64-openssl-1.0.1c.msi (Mirror 1) (Mirror 2). Configure Apache 2.4 for PHP So far so good. It’s time to configure Apache Http Server. Even before you configure, open a command prompt, go to /bin and start the server by executing httpd command. If it starts without issue, access and it should display a page saying “It works!”. Add the following command at the end of httpd.conf file which could be found within /conf folder. Following command assumes that PHP is installed within D:/php LoadModule php5_module 'D:/php/php5apache2_4.dll' AddHandler application/x-httpd-php.php # configure the path to php.ini PHPIniDir 'D:/php' In addition to above, go ahead and add index.php to DirectoryIndex variable in following manner: DirectoryIndex index.php index.html. Now download php 5.5 binaries from official php website. To download php 5.5. On website click on download link Similar to Apache, you have to extract PHP to a directory on your computer, say “C:PHP”. WATCH VIDEO • go to “C:PHP”, there is a file named php.ini-development, make a copy of it and rename that copy to “php.ini” in same directory. Now you have to enable short open tag. Open the php.ini in notepad and find (press ctrl + f) • short_open_tag = Off • now make this • short_open_tag = On • PHP as an Apache module Here we configure Apache to load PHP as a module to enable the web server parse your PHP scripts. Open the Apache configuration file, “httpd.conf” in notepad. That should be in C:Apache24confhttpd.conf. FInd (ctrl+f) the section of the file that has a series of “LoadModule” statements. add a new LoadModule statement for php5apache2_4.dll. Don’t make it prefixed by # symbol. It regarded as inactive. • LoadModule php5_module 'C:/php/php5apache2_4.dll' now search again document for “addtype” and add the following after the last addtype statement. AddType application / x - httpd - php. Php • Configuring the default index file In most servers when a directory is requested, the web server returns the index.php or index.html files. To change this behavior on our web server, we need to update the “httpd.conf” file in notepad. Look for (ctrl+f) following line. DirectoryIndex index. Html and replace it with DirectoryIndex index. Html • Restart Apache to make this settings changed you have to restart the Apache server. To restart that install Apache as windows service (for that watch my previous ). LAMP (Linux, Apache, MySQL and PHP ) Stack is the most popular environment in PHP website development and hosting. Linux is the operating system, Apache is the popular web server developed by Apache Foundation. Now run (hit Win + R) and enter “services.msc”. In this list you will see Apache 2.4 listed. Restart it from there. Php is installed in your system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2018
Categories |