How do I install PHP on Windows 7. Php install Windows 10

Installing PHP 8.1. Windows

This documentation will walk you through the steps necessary to install PHP 8.1, Apache 2.4, and Scriptcase manually. When performing this type of installation, you are responsible for configuring your entire environment as well as database extensions.

Listed below are all the supported operating systems as well as the libraries that are required to function on a particular system.

Check the list of supported operating systems:

  • Windows 7 SP1 or Higher
  • Windows Vista SP2 or Higher
  • Windows Server 2012 or Higher
  • Windows Server 2012 R2 SP1 or Higher

For Windows 7 SP1, you must verify if the system has the following items installed: Visual C Redistributable Packages for Visual Studio (2008, 2010, 2012, 2013, 2015) x86 and x64.

Prerequisites

If you already have a Web Server with Apache and PHP 8.1 configured, just go to How to Enable SourceGuardia Loader and proceed to manual installation.

To proceed with the installation, you need to download some files.

Check below for the files you will need:

  • PHP 8.1 NTS (x86 or x64): Click Here
  • Apache 2.4 (x86 or x64): Click Here
  • mod_Fcgi (x86 or x64): Click Here
  • SourceGuardian Loader 13.0.3 for Windows (x86 or x64): Click Here
  • Scriptcase (.zip): Click Here

NOTE: Before proceeding with the installation, it is recommended not to have any other web environments installed (such as WampServer, XAMPP, Zend Server, etc.) on your operating system.

Below are the actions required after downloading the items specified above::

Unzip the PHP and Apache files in separate folders on your operating system’s C: drive.

Rename the PHP folder to php. The result should be like this:

Unzip the mod_Fcgi file, copy the mod_fcgid.so file to the C:\Apache24\modules folder.

Configure the Apache environment

Listed below are the steps required to configure apache manually. Follow the steps correctly to avoid problems installing and starting the service.

NOTE: Since PHP and Apache folders are at the same directory level (C:) You do not need to enter the root folder in directives that require you to enter isolated paths or points to a specific file.

Add the content below after the #LoadModule xml2enc_module modules/mod_xml2enc.so line:

LoadModule fcgid_module modules/mod_fcgid.so FcgidInitialEnv PHPRC “/php” FcgidInitialEnv PHP_FCGI_MAX_REQUESTS “100000” FcgidIOTimeout 1800 FcgidBusyTimeout 1800 FcgidConnectTimeout 1800 FcgidMaxRequestLen 1073741824 FcgidMaxRequestsPerProcess 10000 FcgidOutputBufferSize 4000 FcgidProcessLifeTime 3600 Timeout 1024 KeepAlive On KeepAliveTimeout 50 MaxKeepAliveRequests 500 AddHandler fcgid-script.php FcgidWrapper “/php/php-cgi.exe”.php

Search for #ServerName www.example.com:80 and change this line to ServerName localhost:80.

In this tutorial apache is configured with port 80. To define another port it is necessary to change the value informed in ServerName, for example (localhost:8092). Also, you will need to change the Listen. for example (Listen 8092). Before changing you must make sure that the port is not being used by another service

Change the contents of the DirectoryIndex directive by adding the following contents to the directive line:: index.php index.phtml.

DirectoryIndex index.html index.php index.phtml

Set the variable with your Apache folder path:

Search for the Define SRVROOT and edit it as follows:

Add the Options ExecCGI command below the Require all granted line in the /htdocs” directive.

# Require all granted Options ExecCGI

Search for the directive and add the content below above this directive:

“/php” # AllowOverride None Options None Require all granted #

After performing all these procedures, save the httpd.conf file to proceed with Apache installation and startup and PHP configuration.

Install and start Apache

Now that you have set up your apache service, all you have to do is install and start it. Below are the steps that must be followed to successfully complete this process.

Run the Command Prompt (CMD) with Administrator privileges:

Go to the Apache bin folder to install the httpd.exe executable file:

Install Apache with the command below:

Wait for the message “The ‘Apache2.4’ service is successfully installed.” to proceed.

Start the Apache service and verify if it is working.

Use the httpd.exe.k start to start your Apache service.

Grant execution permission to Apache on your Firewall:

Select the two options available to grant permission, so Apache can function properly.

Check if Apache is active.

To verify that the service is active, simply visit the Apache test page in your browser. You can do it in two ways:

Configure the PHP 8.1

With Apache active and functional, you now need to define and configure the PHP.ini file so those database extensions and libraries are available for use by Scriptcase.

Access the PHP folder in C:\ and rename the php.ini-development file to php.ini.

Access the php.ini file with a text editor using Administrative privileges and search for the ;extension_dir = “ext” directive.

Assign value “C:\php\ext” to this directive and remove ;.

Enable the extensions listed below, by uncommenting them (Remove the semicolon ; at beginning of line).

Default Extensions

  • extension=bz2
  • extension=curl
  • extension=gd2
  • extension=gettext
  • extension=imap
  • extension=ldap
  • extension=fileinfo
  • extension=mbstring
  • extension=openssl
  • extension=exif
  • extension=xsl
  • extension=soap

Database Extensions:

Extensions Driver enabled in Scriptcase
extension=mysqli MySQLi
extension=odbc DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, MS SQL Server ODBC, Oracle ODBC, Progress
extension=pdo_mysql MySQL PDO
extension=pdo_odbc DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC
extension=pdo_pgsql PostgreSQL PDO
extension=pdo_sqlite SQLite PDO
extension=pgsql PostgreSQL 6.3 or below, PostgreSQL 6.4 or above, PostgreSQL 7 ou Acima

NOTE: Some database extensions will depend on third party drivers to be enabled. Click here to access configuration instructions for your desired database.

Set the recommended minimum value of these PHP directives listed below for Scriptcase to work proprely. Search for the directives and assign the value according to this example:

  • max_execution_time = 3600
  • max_input_time = 3600
  • max_input_vars = 10000
  • memory_limit = 1024M
  • post_max_size = 1024M
  • upload_max_filesize = 1024M
  • max_file_uploads = 200
  • short_open_tag = On

IMPORTANT: By default PHP can disable some functions that are important for Scriptcase to function properly. Search for the disable_functions directive and make sure it is as follows: disable_functions=. Click here to access the list of functions required for Scriptcase to function properly.

Set up PHP TimeZone according to your region. You must use the value available in PHP documentation. Search for the date.timezone line, uncomment it and edit it according to the selected TimeZone:

Set the folder where temporary files will be stored. Search for the ;session.save_path line, uncomment it, and enter the path to your temporary folder.

Save all changes made to the php.ini file.

Restart the Apache service using the Command Prompt (CMD) with Administrator privileges the following command:

C:\Apache24\bin\httpd.exe.k restart

Verify changes made through the info.php file. You need to create this file and place it in the C:\Apache24\htdocs directory with the following content:

After this, check the generated page in your browser by going to the URL 127.0.0.1/info.php.

NOTE: For more information about the phpinfo function, check the documentation do PHP.

Enabling the SourceGuardian Loader

Before you start the Scriptcase installation, you need to enable the loader responsible for encrypting Scriptcase in PHP. Follow the steps below to perform this action successfully.

Extract the SourceGuardian Loader file downloaded at the beginning of this documentation.

If you haven’t downloaded it yet click here and download the file according to the architecture used.

Copy the ixed.8.1.win file and paste it into the PHP extensions directory C:\php\ext.

Edit the php.ini file and below the last line enter the path to the extension within the zend_extension parameter:

Restart the Apache service using the Command Prompt (CMD) with Administrator privileges the following command:

C:\Apache24\bin\httpd.exe.k restart

Manual Scriptcase Installation

Listed below are the steps needed to do a Scriptcase manual installation. To do the steps, it is needed that you have a web server configured in your machine.

Download the Scriptcase (.zip) directly from the download page from our website.

Extract the zip file and rename the extracted folder to scriptcase.

Move the scriptcase to your server root. Depending of your operating system and the installation the path can be different from the example. However, by default the paths are:

Windows Server
C:\Apache24\htdocs\ Apache
C:\inetpub\wwwroot\ IIS
Linux Server
/var/www/html/ Linux Local
/home/(whoami)/public_html/ Linux Server
macOS Server
/Library/WebServer/Documents Apache

Access the Scriptcase using your browser:

Check the extensions required for Scriptcase to function and database connection modules that are enabled.

Typical Installation

Check the steps below to complete the manual installation of Scriptcase in a typical way.

NOTE: By selecting this installation, Scriptcase will set your environment by default. Defining the installation database and the login user in Scriptcase.

After clicking proceed, you will be redirected to the Scriptcase Login page.

User

In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin.

Password

In this field, you must enter the password to login to Scriptcase. By default, the password is admin.

Keep me connected

This option keeps the user logged in until they log out through the Scriptcase interface.

Forgot your password?

By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps.

Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here.

Custom Installation

Check the steps below to complete the manual installation of Scriptcase in a custom manner.

NOTE: By selecting this installation, you will be responsible for setting up your environment. Defining the installation database and the login user for Scriptcase.

1- Verify that the directories required by Scriptcase have the correct permissions. If any directory listed does not have the active check icon. correct permission for this directory.

Click proceed to proceed with the installation process.

2- Choose the database where the Scriptcase database will be installed. By default, Scriptcase recommends that it be installed with the SQLite database.

  • You can change the default database by clicking the Change Database button. By clicking this option you will need to set the following options:

DBMS

In this option, you will select the Driver to connect to your database.

Server

In this option, you will inform the server to connect to the desired database.

User

You need to inform a user who has access to the database you want Scriptcase to be installed on.

Password

You must enter the authentication password corresponding to the entered user.

Database

You must enter the name of the database where Scriptcase will be installed.

install, windows

Clique em prosseguir para avançar no processo de instalação.

Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso na lateral.

Click proceed to proceed with the installation process.

_4. Set the default user who will have access to Scriptcase.

Login

In this option, you will enter the default Scriptcase User Login.

Password

In this option, you must enter the password that will correspond to the user informed.

Confirmation

You must repeat the previously entered password for successful user creation.

Click proceed to proceed with the installation process.

Complete Scriptcase custom installation on your web server.

After clicking proceed, you will be redirected to the Scriptcase Login page.

User

In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin.

Password

In this field, you must enter the password to login to Scriptcase. By default, the password is admin.

Keep me connected

This option keeps the user logged in until they log out through the Scriptcase interface.

Forgot your password?

By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps.

Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here.

How do I install PHP on Windows 7?

Installing PHP on Windows 7 is quite a simple affair. If you follow the steps exactly as described in this tutorial you will have PHP up and running without any problems. However, as experienced developers know, you first need to have a web server running on the system. Here are instructions on how to install Apache on Windows 7 operating system – the world’s most popular web server.

Also, if you are a budding PHP programmer, you would soon like to use it with MySQL database. So once you are through with this page, check out the detailed step by step instructions on how to install MySQL on Windows 7.

Which PHP download file should you use?

The aim of this tutorial is to set up PHP so that you can learn the language and start developing web applications. PHP is available for download in many forms. There are the Thread Safe and Non Thread Safe versions and each comes as a zip, installer and debug pack.

To make things simple we shall install PHP from the zip archive. Point your browser to the ‘Windows binaries and sources Releases’ page or click this link – http://Windows.php.net/download/. Scroll down a little and locate the VC9 x86 Thread Safe section and download the zip file [Slide 1].

Create a folder to install PHP

The first thing is creating a folder to which we would extract the PHP files from the zip archive. Since I like to keep things segregated and yet accessible, I’ll be installing PHP in its own directory under the C: drive and recommend you do the same. So go ahead and create a folder called PHP on the C drive [Slide 2].

Move to the folder in which you have downloaded the PHP zip file and double-click on it to reveal its contents. Select and copy all the files in the archive (Tip: use the Ctrl-A and Ctrl-C keyboard shortcuts). Now paste all the files ( Ctrl-V ) in the empty C:\PHP folder.

You’ll see a file called php.ini-development. Right-click on this file and choose Copy – [Slide 3]. Now paste the file in the same directory – [Slides 4 and 5]. Rename this file to php.ini [Slide 6]. Windows will tell you that changing the extension will make it unusable – answer ‘Yes’ [Slide 7].

Note #1: Your computer might not display the file extensions, in which case I suggest you read how to get the file extension on Windows 7.You can also try your hand with DOS commands to change the file extension on Windows 7; definitely a more geeky way to get things done!

Note #2: The newer PHP versions come with two files: php.ini-development and php.ini-production. The former is more suited for a developer machine such as yours, while the latter is for web servers that host ‘live web sites’ where security is of paramount importance. Thus, use php.ini-development instead of php.ini-production.

Configuration Apache 2.2 web server for PHP installation

Though you have been able to put PHP on your computer, it’s still not “installed” in the true sense of the word. We have to help the Apache web server communicate with PHP. This is done by editing the Apache configuration file, httpd.conf.

Go to All Programs. Apache HTTP Server 2.2. Configure Apache Server. Edit the Apache httpd.conf Configuration File [Slide 8]. This opens httpd.conf file in Notepad [Slide 9].

Gear up to make some changes to this file and please check the screenshots in the slideshow as you go along.

  • Locate the “LoadModule section” (Tip: Use the Find feature – the Ctrl-F key combination). Add the following line [Slide 10] LoadModule php5_module “c:/PHP/php5apache2_2.dll” Note: If you have chosen to install PHP in a different folder than C:\PHP, please change the path in the above line accordingly.
  • Find the “AddType” section and put in the line below [Slide 11]. AddType application/x-httpd-php.php Note: Make sure that you put this before the line. You can also use other file extensions for PHP like.php3 or.php4 ; simply add these at the end of the above line separated by a blank space.
  • Move to the end of the httpd.conf file and add the line below [Slide 12] PHPIniDir “C:/PHP” Note: This tells the Apache web server the location of the PHP configuration file, php.ini.
  • If you’ve read my instructions on installing Apache on Windows 7, you know that all web site files are to be kept in the htdocs folder located under the Apache install directory. This means when you load http://localhost. Apache checks the htdocs folder; for instance, the “It works” file that’s displayed the first time you test Apache installation is actually the index.html file in this folder. In accordance to my habit of having things organized, I like to keep web site files in their own folder away from Apache program and configuration files… something like C:/websites. The good news is that Apache allows you to make such a change pretty easily and to do this you need to specify this new directory path as the document root. First create a folder for your web site files – C:/websites is what I use and suggest you do the same. Find the DocumentRoot “C:/Apache/htdocs” in the Apache configuration file and change it to DocumentRoot “C:/websites” [Slides 13 and 14].
  • Change to [Slides 15 and 16].
  • Save the Apache configuration file. Go to the File menu and select Save or use the Ctrl-S keyboard shortcut [Slide 17]. Close the Notepad window.

Edit php.ini – PHP configuration file

error_reporting = E_ALL | E_STRICT
error_reporting = E_ALL ~E_NOTICE

Tip: instead of typing it out, simply copy-n-paste. Also make sure display_errors is set to On. Thus, hunt for it and ensure the line reads [Slide 21]:

Testing the PHP installation

It’s now time to test whether PHP was properly installed on Windows 7. Open a blank Notepad window and type in the line below exactly as it appears – you can copy-paste if you want.

Save this file as phpinfo.php in the document root folder which should be C:/websites if you have followed my suggestion.IMPORTANT: By default, Notepad will save the file as.txt. So you need to select “ All Files ” from the “ Save as type ” drop down and enter the full file name in the “ File name ” field. Confused? Check the screenshots [Slides 23 and 24].

Open a browser window and load http://localhost/phpinfo.php. A long page with details of the installed PHP version should display [Slide 25]. If you see the PHP code instead, you’ve probably not saved the file with a.php extension.

You can also have index.php instead of index.html as the web server index file. Read that article for details.

This completes the instructions on how to install PHP on Windows 7. Your next step should be installing MySQL – keep reading.

Problems in installing PHP and Apache set up

Problem #1 – Cannot load php5apache2_2.dll: The installation of Apache web server and PHP should go pretty smoothly if you’ve followed my instructions to the T. However, some people have mentioned getting a “ Cannot load php5apache2_2.dll ” error. This message is displayed because the web server cannot find the PHP dll file. For a detailed solution, please refer Apache cannot load php5apache2_2.dll – file not found blog post.

Problem #2 – Requested URL not found: Not Found – The requested URL /phpinfo.php was not found on this server. Assuming, you had followed the steps exactly as detailed above, the only reason you are getting this error is because you haven’t restarted the computer after modifying the Apache configuration file. The web server has to be restarted properly for the changes in the httpd.conf to take effect.

How to install PHP 8 on Windows 10

PHP 8 is on the way. In this tutorial, I will show you how to install PHP 8 on your Windows 10 machine using Apache as a webserver.

Download the necessary files

You can download PHP binaries from the URL: https://Windows.php.net/download/. Currently, the final version of PHP 8 has not been released, therefore, it cannot be found on the main page. Select the “QA Releases” from the top menu or navigate directly to https://Windows.php.net/qa/.

Download the thread-safe, 32, or 64-bit version depending on your Windows type. As all versions have been compiled with VisualStudio 16 (2019), so later, you need a suitable Apache binary and a “Microsoft Visual C 2019 Redistributable” package installed on your PC.

Prepare PHP location

I like the programs to be in the Program Files folder. Besides this, over time, you will install several different versions of PHP. Therefore, I create the following directory structure:

For the sake of ease of use, I make some sacrifices in the security of my development machine. I give local users full permission to the PHP directory on my machine.

Once you have created the directory, copy the contents of the downloaded zip file.

Check if PHP works

As I mentioned earlier, PHP 8 was compiled with Visual Studio 2019. Thus, if the appropriate Redistributable is not installed on your machine, you will get the following error: VCRUNTIME140.dll was not found

If all went well, you can use PHP from the command line. You can check the installation with the command: php.v and the result should be something similar:

To make working with PHP more convenient, you can put the PHP directory on the path. Click on start and just type env. From the list click on “Edit the system environment variables” and the System Properties dialog will appear. Click the “Environment Variables. ” and select “Path” from the System variables block. Add the new PHP folder to the list.

Configure PHP

Now PHP is running but not yet configured properly. Configuring PHP 8 at the base level is no different from older versions. The PHP folder contains 2 example configuration files:

Copy the development version to the same directory as php.ini and open this for editing. What you need to set is the location of the extensions and session data.

You have to set the extension_dir parameter to the valid location: extension_dir = “c:\Program Files\PHP\php-8.0.0RC2\ext”

extension_dir = “c:\Program Files\PHP\php-8.0.0RC2\ext”

You also have to uncomment the required extensions from the list. Usually, the curl, gd, mbstring, mysqli, pdo_mysql extensions are required for complex php apps.

extension=curl extension=gd extension=mbstring extension=mysqli extension=openssl extension=pdo_mysql

Finally, you need to set the location where to save the session data: session.save_path = “w:/tmp”

Installing Apache

Even if PHP has a built-in web server, production systems use Apache, Ngnix, Lightspeed, and so on. For a Windows development environment, Apache is the easiest choice.

You can download the latest Apache webserver from the ApacheLounge website. Download the 32 or 64-bit version depending on your OS type.

As I mentioned before, I don’t like everything in the C: root, so I also create a directory for Apache in the Program Files folder. Don’t forget to allow permissions for the users.

Now you can copy the content of the Apache24 folder of the zip file to the new location. Pay attention to the exact directory structure.

As with PHP, you can add Apache to the path, but in this case, you need to add the bin folder.

Basic Apache configuration

Apache configuration files are located in the conf directory. The main config file is the httpd.conf. To start the webserver you need to set the server root ( SRVROOT ) parameter in the config file to the correct location as follows:

Define SRVROOT “c:/Program Files/Apache/httpd-2.4.46″ ServerRoot ” ”

It is a good idea to set the ServerName explicitly to prevent problems during startup. As we will use virtual hosts later, you can simply set it to localhost:80

An optional step. but usually required by most PHP applications. to enable Apache modules. For example, the mod_rewrite module is disabled by default but almost always required. Just uncomment the line and you are done.

LoadModule rewrite_module modules/mod_rewrite.so

Install Apache as a service

To install Apache as a Windows service, you have to open a command prompt as an administrator. Navigate to the Apache bin directory and execute the command: httpd.k install Then you can start the webserver using httpd.k start

How to Download & Install PHP 8 on Windows 10/8/7

If everything is correct, then you get the prompt back without any message.

Open a browser and type http://localhost as the URL. You should get a welcome page similar to this:

Setup virtual hosts

The default document location is the htdocs folder in the installation directory. However, this is not optimal. If you are a developer, you probably work on multiple web projects. So it would be nice to have a dedicated folder and URL for each project. For example, if site1.com and site2.com are the production sites, then you probably want a site1.local and site2.local URLs with a dedicated target folder for your development.

Virtual hosts are the solution to this problem. Again, it is a good idea to store your code separated from drive C. For example, you can create a directory structure like this:

Now you have to configure virtual hosts and enable it. First, open the httpd.conf file and uncomment the line that includes the httpd-vhosts.conf file.

# Virtual hosts Include conf/extra/httpd-vhosts.conf

Then, open the httpd-vhosts.conf file that is in the extra folder. Add one entry for each project you want. The ServerName. DocumentRoot. and ErrorLog are the important parameters, you can skip the others.

ServerName site1.local DocumentRoot “w:/Websites/site1.local” ErrorLog “w:/Websites/site1.local/error.log”

Besides this, you have to allow access to these folders so add a common Directory block with the following content before the VirtualHosts entries.Your final virtual host config file should look like this:

Options FollowSymLinks AllowOverride All Require all granted ServerName site1.local DocumentRoot “w:/Websites/site1.local” ErrorLog “w:/Websites/site1.local/error.log” ServerName site2.local DocumentRoot “w:/Websites/site2.local” ErrorLog “w:/Websites/site2.local/error.log”

You also need to extend the Windows hosts file that is located in c:\Windows\System32\drivers\etc\hosts. Open the file for editing with administration privileges and add the server names used before to the file pointing to the local 127.0.0.1 IP address.

# localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 127.0.0.1 site1.local 127.0.0.1 site2.local

Put a simple index.html file in the site roots with different content for testing purposes.

Now you can restart Apache using httpd.k restart. If everything is correct, then no error message is displayed. Navigate to site1.local and site2.local, and your browser should display the corresponding Html content.

Setup Apache to use PHP 8

The setup is almost done, but we haven’t configured PHP and Apache to work together. First, we have to add the php extension to the known mime types. To do this, add the following line at the end of the mime.types config file: application/x-httpd-php php

To execute the index.php automatically if a directory is requested, extend the DirectoryIndex property with index.php in httpd.conf.

DirectoryIndex index.php index.html

After that, the most important step is to load the php module. To do this, specify the PHP install directory and the appropriate module in the httpd.conf file. Just insert the lines at the end of the httpd.conf :

# PHP 8.0 PHPIniDir “c:/Program Files/PHP/php-8.0.0RC2” LoadModule php_module “c:/Program Files/PHP/php-8.0.0RC2/php8apache2_4.dll”

Now you can restart apache and check for any error. If everything is fine then create a small inf.php file in the server document root with a simple phpinfo like this:

Visiting site1.local/info.php should result in a PHP information page in your browser.

Troubleshooting

The “Can’t locate API module structure ‘php8_module’ in file. ” error message is a common problem. Verify that exactly php_module is in the LoadModule line. Neither the old php7_module nor the expected php8_module is good.

How to setup Apache, PHP and MySQL on Windows 10

In this tutorial, you will learn about how you can setup Apache, PHP and MySQL server on Windows 10.

If you are planning to install Apache, MySQL and PHP on Windows 10, you have two options:

  • you can download and install a free web development environment (WampServer, XAMPP)
  • you can create your own environment by installing Apache, PHP and MySQL manually

Установка PHP на Windows 10

install, windows

For beginners I recommend the first option. For the second option you have to decide as to which version of each application will be installed. In this tutorial I am going to setup

Download the installation packages:

Apache 2.4 setup on Windows 10

#ServerName www.example.com:80 ServerName localhost

  • You are ready to go. I recommend to change the following lines too:
  • Change AllowOverride None to AllowOverride All to enable.htaccess files in your projects:

# # AllowOverride controls what directives may be placed in.htaccess files. # It can be “All”, “None”, or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride None
#LoadModule rewrite_module modules/mod_rewrite.so

and remove the # from the beginning to enable the module:

LoadModule rewrite_module modules/mod_rewrite.so

  • To serve index.php file automatically if a directory is requested append index.php to the DirectoryIndex variable

DirectoryIndex index.html index.php

To test the installation, open up the command prompt, go to C:\Apache24\bin and run Apache by typing httpd.exe:

If there is no error, open up a browser of your choice and go to http://localhost where you will see this page:

To run Apache automatically on startup, register it as a service. Open the Command Prompt as administrator (right click. Run as administrator) and type in these lines:

Check Apache service in Services and click Start the service:

PHP 7.4 installation on Windows 10

PHPIniDir “C:/PHP74” AddHandler application/x-httpd-php.php LoadModule php7_module “C:/PHP74/php7apache2_4.dll”

  • To test the installation, create a file named phpinfo.php in C:\Apache24\htdocs directory and copy these lines to the file:
  • Open a browser of your choice and open http://localhost/phpinfo.php

MySQL 5.7 installation on Windows 10

  • Download and install Microsoft Visual C 2013 Redistributable Package if you don’t have it already
  • After installing Microsoft Visual C 2013 Redistributable Package click Next again
  • If you downloaded the smaller package, click Execute in the third step and wait while the download ends
  • Click Next, the next step is Product Configuration
  • In the Product Configuration window click Next and pick the Standalone MySQL Server option in the first step
  • Click Next
  • In the Type and Networking step you can leave everything as it is (Config Type: Development Computer, Port: 3306), click Next again
  • Set your MySQL Root Password and go to the next step
  • Leave everything as it is in the next two steps (Next, then execute)
  • The installation is done, click Finish
  • Open Services and verify that the service named MySQL57 is running
  • If you are not comfortable with the command line, you can download and install MySQL Workbench, or install phpmyAdmin to manage your databases through a graphical user interface
| Denial of responsibility | Contacts |RSS