Following are the key steps/points described later in this article:
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, http://httpd.apache.org, you are taken to download page for win32 binaries. 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 Apache HTTP Server 2.4.2 x86 and x64 Windows Installers. Take the first one, apache_2.4.2-x64-openssl-1.0.1c.msi (Mirror 1) (Mirror 2).
For PHP 5.6 version, go to Windows Binaries page and you would see binaries, thread-safe or non-thread safe for both 32-bit and 64-bit WIN platform. As this article is about 64-bit, go ahead and download zip file user “VC11 x64 Thread Safe”.
Once downloaded, unzip it and place it in appropriate folder within C:\ or D:\ directory.
So far so good. It’s time to configure Apache Http Server. Even before you configure, open a command prompt, go to <Apache Root>/bin and start the server by executing httpd command. If it starts without issue, access http://localhost:8080 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 <Apache Root>/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:
<IfModule dir_module> DirectoryIndex index.php index.html </IfModule>
You are just one step away. Go to <Apache Root> folder and save php.ini-development as php.ini file. Uncomment extension_dir = “ext”. Go ahead and uncomment one or more extensions that you would like to be loaded. For example, extension = php_mysql.dll, extension = php_mysqli.dll etc.
You are all set!!! Go to <Apache Root>/htdocs folder and create an index.php file. Write following code in that file. Open a browser and access http://localhost:8080. You should be able to see Hello World!!! printed with bold letters.
<?php echo "Hello World!!!"; ?>
In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…
Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…
With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…
Anxiety is a common mental health condition that affects millions of people around the world.…
In machine learning, confounder features or variables can significantly affect the accuracy and validity of…
Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…
View Comments
Hello, i have an issue with apache, for some reason when i try to restart it i get an error message
"the requested operation failed "
I have the same problem.
php5apache2_4.dll from php version 5.6 is not compatible with Apache 2.4
Very useful article!
I'm getting an error message “the requested operation failed “, while starting apache.
Before installing php it was working fine.
I spend lots of time with this problems.
Thanks!! this is really worked!