Be your own host or install Apache on the Windows platform.


or install a bunch of servers yourself

Tested on Windows Vista SP1, Vista Ultimate, Windows 7

Your actions:

  1. Download the following distributions for free from official websites:

    Setting up the PHP interpreter

    1. Open double click php.ini file from the C:\server\php\ folder.
    2. In the "Paths and Directories" section there should be a line extension_dir ="C:\server\php\ext" .
    3. In the "Dynamic Extensions" section, find; Be sure to appropriately set the extension_dir directive. , at the bottom of this line place:
      extension=php_gd2.dll
      extension=php_mbstring.dll
      extension=php_mysql.dll
      extension=php_mysqli.dll
      extension=php_pdo.dll
      extension=php_pdo_mysql.dll
      extension=php_sqlite.dll
    4. Somewhere at the end of the file, find the line; End: and delete everything that follows it.

    Save the modified file there.

    Once you've finished editing the files, create a www folder in the server folder and a cgi-bin folder in the www folder. Restart your computer. As a result, a green triangle appeared in the tray, in the server status instead of a red square; if not, and an error warning window is displayed, then the change in the httpd.conf file was inaccurate and you will have to carefully check everything, slash slopes, quotes, and so on.

    www is the root directory of the local server, this is where you should save all documents (folders, pages, images, scripts and other files) of your site.

    Testing the PHP interpreter

    Create new file in an editor (Notepad2 or Notepad+) and write the code:

    echo phpinfo();
    ?>

    Save the file in the C:\server\www\ directory as index.php . In your browser, type http://127.0.0.1 or http://localhost/ ⇒ the table should be shown:


    I succeeded! If you have any questions or suggestions, please write to the blog.

    We have local server in conjunction with an interpreter and now you can learn PHP.

    Testing the connection to the MySQL database server

    Small script:

    $dblocation = "127.0.0.1" ;
    $dbname = "test" ;
    $dbuser = "root" ;
    $dbpasswd = "" ; /* Enter the password you entered when
    MySQL installation */
    $dbcnx = @mysql_connect ($dblocation, $dbuser, $dbpasswd);
    if (! $dbcnx )
    {
    echo "MySQL server is not available";
    exit();
    }
    if (!@
    mysql_select_db ($dbname, $dbcnx))
    {
    echo "Database not available";
    exit();
    }
    $ver = mysql_query("SELECT VERSION()" );
    if(!$ver)
    {
    echo "Error in request";
    exit();
    }
    echo mysql_result ($ver, 0);
    ?>

    Save the script in the C:\server\www\ folder as mysql.php and type http://localhost/mysql.php in the browser ⇒ it will be shown serial number MySQL servers:

    5.5.12
    1. Download the database management manager distribution package for free from the official website php-myadmin.ru, the latest stable version, file with the extension all-languages.zip.
    2. Unpack the archive into the phpmyadmin folder, and place it in the www folder.
    3. Download config.inc.php, extract from the archive and copy it to the phpmyadmin folder.
    4. Open config.inc.php , find the line $cfg["Servers"][$i]["password"] = "pass"; ⇒ instead of pass, specify the root password that you used when installation MySQL server ⇒ save the file.
    5. In your browser, type http://localhost/phpmyadmin/ ⇒ will be shown Title page manager:

    Having installed the above components, we received a complete local web server and everything necessary for organizing further work.

    Materials were used from the sites: dev.mysql.com | php.net | php-myadmin.ru

03/19/17 5.8K

The Apache project does not provide binary versions software, but only source. However, they can be obtained from third party sites:

  • ApacheHaus;
  • Apache Lounge.

Download Apache Windows 32-bit ( httpd-2.4.20-win32-VC14.zip) or 64-bit version ( httpd-2.4.20-win64-VC14.zip). Check if you have installed 64-bit OS version. To determine this, you can use msinfo32.exe. This tool helps you gather information about your computer, diagnose problems, or can be used to access other tools.

To run it, run the command Run > msinfo32 > press Enter.

After you find the required version, download the Zip archive and then extract its contents to the C:Apache24 folder.

Before starting the Apache server, if you need to change the listening port to 8181:

  • Open the file C:Apache24confhttpd.conf in a text editor;
  • Find the following line: Listen 80 ;
  • And change it to: Listen 8181.

Save your changes.

Now you can start the Apache Windows 7 server:

Open command line as administrator and go to the bin subdirectory:

Type httpd.exe and press Enter.

If a dialog box appears on the screen stating that the MSVCR140.dll file is missing, you need to install Visual C++ Redistributable for Visual Studio 2015 (select vc_redist.x64.exe if you have installed Windows 64-bit).

Now open your browser and enter http://localhost:8181 into the address bar to launch the demo site.

Installing PHP 7 on Windows

PHP 7 is an important update for server language PHP web development. Download the VC14 x64 Thread Safe zip archive (2016-Apr-29 00:38:19) . If you have downloaded 32-bit version of Apache, you need to install PHP x86.

Create a folder named " php7", extract the contents of the php-7.0.6-Win32-VC14-x64.zip archive into it, and then place the folder in the root of drive C:

Configuring Apache to Use PHP

Open the installation configuration file Windows Apache C:Apache24confhttpd.conf.

Copy following lines to the beginning of the file:

  • AddHandler application/x-httpd-php.php;
  • AddType application/x-httpd-php .php .html;
  • LoadModule php7_module "c:/php7/php7apache2_4.dll";
  • PHPIniDir "c:/php7" .

In chapter add the line index.php and place it before index.html :

DirectoryIndex index.php index.html

Save the Apache file PHP Windows. Now rename the file C:php7php.ini-development to C:php7php.ini.

Enabling mod_rewrite to rewrite URLs

Open the configuration file Apache C:Apache24confhttpd.conf;
Find the line in it #LoadModule rewrite_module modules/mod_rewrite.so and remove the hash symbol "#";
Find all occurrences of the string " AllowOverride None" and change them to " AllowOverride All".

Setting up PHP with MySQL

Edit the php.ini file and uncomment the extensions directory. Remove the "; " at the beginning of the lines:

; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir; extension_dir = "./" ; On windows: extension_dir = "ext"

Activate the following lines, this will allow you to run MySQL modules:

extension=php_mysqli.dll extension=php_pdo_mysql.dll

And also the lines below if you are using Apache PHP MySQL Window s installation in a development environment:

extension=php_curl.dll extension=php_fileinfo.dll extension=php_gd2.dll extension=php_mbstring.dll extension=php_openssl.dll

Uncomment error_log to enable file logging:

; Log errors to specified file. PHP's default behavior is to leave this value ; empty. ; http://php.net/error-log ; Example: error_log = c:php7php_errors.log

Save your changes.

IMPORTANT! Set Windows PATH to find PHP

  • Click right click mouse on the shortcut My Computer - Properties - Advanced - Environment Variables;
  • In chapter " System Variables"Find the item "Path", click on it and select "Change";
  • Add the path to the end php folder (must be after the semicolon ";"). For example: ";C:php7 ";
  • Click "OK".

How to check if PHP is installed

Create a file at C:Apache24htdocsphpinfo.php and add the following code to it.

There are quite a lot of articles on the Internet where the authors give detailed instructions with screenshots, thanks to which not a single user was able to install the Apache server for PHP and DBMS MySql. But most of them leave the user with many questions to which he cannot find an answer for a long time. Let's look at what Apache, MySql, PHP are, what they are needed for and how to install these products.

A little theory

Apache is a free http server named after the North American tribe of Apache Indians. It is widely used on all platforms, including Windows, and has become a de facto standard in the development of web applications and services. In addition to it, we will need to install the MySql DBMS, which is also a standard in its field, and one of the most common and universal scripting languages ​​- PHP.

Apache (as users call it) differs from other servers in that all applications and services are guaranteed to run on it, without requiring the user to perform additional settings. Compared to its analogues, Apache is not characterized by high performance and low consumption of computer resources, but any application is guaranteed to function on its basis. Here you can also add ease of setup, work on virtually everything modern platforms and excellent documentation.

Now let's look at how to install Apache on a computer running Windows control 7 (in later editions the process is almost identical), so that the server is installed on a real hosting.

Installation Apache

In fact, there is practically no difference between the versions of the product for the developer, unless the old Apaches are supported by the latest versions of the PHP scripting language.

  • Run the downloaded installation file.
  • We fill out the first two fields as in the screenshot: enter “localhost” in both lines.

  • We set absolutely any mailbox.
  • the first is responsible for installing the product as a Windows service, which will use port number 80;
  • the second will connect the server to port number 8080, after which you will have to automatically start it every time.

Product developers recommend choosing the first option, so let’s look at it a little lower. When installing Apache, pay attention to the path where its files are stored. It is best to install in the “public” directory located in the “users” folder on system partition your hard drive.

After closing the installation wizard, make sure Apache is running. To do this, go down to the tray and check for the presence of the icon shown below.

If it doesn't work, run the command line. This is done by entering “cmd” into the text form of the command interpreter (Win + R).

On the command line we write “net start Apache2.2” to start the server.

This entry is valid only for product version 2.2; in other versions the numbers will be corresponding.

The server is stopped by typing a command with the following parameters: “net stop Apache2.2”.

Let's look at a few more methods for starting, shutting down, and rebooting Apache. At regular work Using the command line to manage the server is ineffective and time consuming. The way out of the situation is to use the context menu of the tray icon: right-click on it and select what action needs to be performed.

The same is done by managing the service of the same name through the appropriate utility that provides access to Windows services, or the Services snap-in. It starts through search bar or “Administration” in the “Control Panel”.

Setting up Apache

When choosing the first server installation method, you can specify the method for starting it. At regular use and if you have free resources on your PC, use Apache autostart. Otherwise, select it manual start through context menu services.

After manual or automatic start opening the servers convenient browser and go to the address: //localhost. will appear empty page with the same address.

To get started, do the following.

  • We go to the “htdocs” directory, located in the folder with the software product files.
  • We delete the html file from it and create a directory with the name of the site (mysite).
  • You can go to the future site by entering //localhost/mysite.
  • Go to the “conf” folder and open the “httpd.conf” file in a text editor (preferably with syntax support).
  • Go to line number 227 and replace “none” with “all”. The resulting value should be “AllowOverride All”.

Doing this will allow the "htaccess" document to be used. It is an advanced Apache configuration file.

  • We look for the line with the text “#LoadModule rewrite_module modules/mod_rewrite.so” and remove the “#” symbol.

This action activates the module responsible for the creation and operation of CNC links.

Installing PHP

  • Go to the page PHP downloads and download the latest stable version of the scripting language.

Attention! No need to download executable file msi or exe format, and biz archive.

  • We create a directory and decompress the archive into it using 7zip or Winrar.
  • Open “httpd.conf” if you closed it and add next text In the end:

"LoadModule php5_module "C:\Users\Public\php\php7Apache2_2.dll"

AddType application/x-httpd-php .php"

The numbers in the first line and the address will change depending on the versions of the products used and the directory paths and PHP.

  • Again, save the changes and restart Apache.

When an information dialog box appears indicating an error during the operation, restart Windows.

All PHP configuration parameters, when installed, are stored in the "php.ini" file. Instead, there are documents whose name begins with “php.ini”.

  • Rename any one to “php.ini” to create a configuration file.
  • Then copy this document to the Windows directory, for example, “C:\Windows”.
  • We restart the server through the context menu of its icon.

This is the installation and PHP setup completed. All that remains is to check the functionality of the server. Go to “htdocs” and create a file in the folder with any name (preferably Latin) and php extension(for example file.php). We open it with text editor and enter the following piece of code:

Now open or maximize the browser window and enter the path to the created file in the address bar. In our case it is: //localhost/mysite/file.php

If everything went well and without errors, you will see a similar image.

Pay attention to the line “Loaded configuration file”. The path to the “php.ini” configuration file should be specified there.

This completes the installation of Apache with PHP on a Windows computer. If you need to install any CMS, the DBMS is installed.

DBMS installation

  • Loading the current one MySql version for your version and bitness of Windows.

  • After clicking on the “Download” button, click on the link highlighted in the screenshot to download MySql without registration.

  • We launch the installer, the functioning of which will require the .NET Framework library version 4.5.
  • We accept the terms using MySql on Windows.
  • Move the switch to the “Server only” position.

  • Click on the “Execute” button to start the MySql installation after checking the requirements.

  • We set a password for MySql, which will be used to provide access to the database.

  • Click “Next”.

Server installation from script language and MySql is complete. All that remains is to connect the last two components so that they can interact.

For this we are already opening known file configuration “php.ini” and remove the “;” symbol in lines with the following data:

extension=php_mysql.dll

extension=php_mysqli.dll.

Find the text “; extension_dir = “ext”” and replace it with the following “extension_dir = “C:\Users\Public\php\ext””, where after the “equals” sign we set the path to the directory with PHP.


This article - step-by-step instruction on creating a local web server. It describes the installation Apache web server 2.4 on the Windows OS platform. The installation was tested on Windows XP SP3.

Web server composition:

  • Apache 2.4 (version 2.4.10);
  • PHP 5.4 (version 5.4.34);
  • MySQL 5.5 (version 5.5.23).

This working environment suitable:

  • experienced webmasters to test their projects;
  • for beginning webmasters to create their first websites.

Apache 2.4 and PHP 5.4 distributions are compiled in VC9 (Visual Studio 2008).

Apache 2.4 VC9 version works with almost all current versions Windows (7/8/Vista/XP SP3).

For VC9 applications to work, you first need to update the Visual C++ libraries.

Installing the Visual C++ library update package

Download the vcredist_x86.exe update distribution from the Microsoft website, run the file and perform the update.

Installing and configuring Apache 2.4 server

The Apache distribution does not have an installation file. Therefore, the installation will be done manually.

Create a folder and unpack the archive httpd-2.4.10-win32-VC9.zip.

In the configuration file httpd. conf default routes are C:\Apache24. Therefore, there will be much fewer edits in the configuration file if you unpack the archive into this folder.

We will unpack the distribution into the C:\TestServer folder.

We make changes to the configuration file C:\TestServer\Apache24\conf\httpd. conf. When writing paths, instead of the "\" (backslash) character, use the "/" (forward slash) character. This is how the paths are written in operating systems Linux and Unix. But Apache was originally developed specifically for these operating systems.

We perform a group replacement of the text C:/ Apache24 with C:/ TestServer / Apache24.

Set the value of the ServerName parameter.
ServerName localhost:80

Set the value of the ServerAdmin parameter (administrator's e-mail).
ServerAdmin [email protected]

Set the value of the DocumentRoot parameter (location of site documents).
DocumentRoot C:/TestServer/Apache24/htdocs

You may want to store site documents separately from the server. For example, in the C:\MySites folder. Then this parameter can be changed.
DocumentRoot C:/ MySites

The Apache executables are located in the C:\TestServer\Apache24\bin folder. Add this value to environment variable PATHWindows.
PATH = C:\TestServer\Apache24\bin ;

Install Apache as a service.
httpd.exe -k install

If , then when installing the service a message will appear indicating that the program is blocked from external connections. For the service to work, you must give permission to unlock.

Let's start the Apache server.
httpd.exe -k start

We check the performance of the server. In the browser command line, type the address: http://localhost. If the Apache installation was successful, the text It works! . Otherwise we will see a blank screen.

If the server does not start, you should check whether port 80, which Apache uses by default, is busy.

This is done using the command
netstat –anb

Most often this port is used by Skype or Firefox. In this case, you should either release the port or move Apache to port 8080.

To do this, in the httpd file. conf we change the values ​​of the ServerName and Listen parameters. ServerName localhost:8080
Listen 8080

After this, restart the service with the command
httpd.exe -k re start

and again we try to go to http://localhost

To make it easier to work with the Apache server, you can install a shortcut in the menu pointing to C:\TestServer\Apache24\bin\ ApacheMonitor.exe

Installing PHP 5.4

We go to the developer’s website http://windows.php.net/download/. Find the PHP 5.4 distribution in the VC9 x86 Thread Safe section and download the php-5.4.34-Win32-VC9-x86.zip archive.

Create a folder on local computer, let it be C:\TestServer\PHP54, and unpack the archive.

We return to the site with the Apache distribution kit. In the Additional + VC9 section we find the archive php5apache2_4.dll-php-5.4-win32.zip with Apache PHP modules and download it.

In the archive we find the folder with the latest version of the php5apache2_4.dll module and place it in the C:\TestServer\PHP54 folder.

In the httpd configuration file. conf add the lines:

LoadModule php 5_ module « C :/ TestServer / PHP 54/ php 5 apache 2_4. dll"
AddHandler application / x - httpd - php . php
# configure the path to php . ini
PHPIniDir "C:/TestServer/PHP 54/php"

In folder C:\TestServer\Apache54\htdocs create a file test.php.

echo "Hello Apache!";
?>

Restart Apache.

IN address bar browser, type http://localhost/test.php. If the text Hello Apache! , then the PHP installation completed successfully.

Setting up php.ini

To work with the MySQL database, we need to configure php. ini – PHP configuration file.

In the C:\TestServer\PHP54 folder there are two templates: development and php.ini-production.

Rename the php.ini-production template to .

Libraries for working with the MySQL database are located in the folder C:\TestServer\PHP 54\ext. This path must be specified in the extension_dir directive of the php.ini configuration file.

We find this parameter, remove the comment character at the beginning of the line (this is a semicolon) and write the path.
extension_dir = "C:/TestServer/PHP 54/ext"

There are two libraries for working with the MySQL database in PHP: php_mysqli. dll is newer and is recommended to be used in work; php_mysql. dll is old, but most sites use it.

It is better to include both libraries in the php.ini file.
extension = php_mysql. dll
extension = php_mysqli. dll

After completing the edits, be sure to restart the Apache server.

Installing and configuring MySQL

Go to the page http://www.mysql.ru/download/. Select the version for Win32 or Win64. We will upload installation package mysql-5.5.23-win32.msi .

Run the file mysql-5.5.23-win32.msi.

We agree to license terms, select the installation type Typical.

Let's move on to MySQL setup server.

Select Detailed Configuration – detailed configuration settings.

Select the server type with minimum requirements to memory – Developer Machine.

Now we need to decide which databases (InnoDB, MyISAM) our server will work with.

Multifunctional Database – InnoDB and MyISAM are supported.
Transactional Database Only - InnoDB supported.
Non-Transactional database Only- myISAM is supported.

When choosing InnoDB support, the next step is choosing where to store the InnoDB tables.

Maximum number simultaneous connections It's better to choose Manual Setting ( manual installation) and accept the default value (15 ).

At this step, the Enable TCP/IP Networking parameter enables support for TCP connections and selects the port through which these connections will be made. The Enable Strict Mode parameter is also set – the mode of strict compliance with the MySQL standard.

Now you need to select the default encoding. The best option- UTF-8 encoding. Therefore we choose Best Support For Multilingualism.

In order for MySQL to start as Windows service- install Install as Windows Service. If you need to autostart this service, install Launch the MySQL Server automatically.

Now set the administrator password and turn off the Modify Security Settings option.

After clicking the Next and Execute buttons MySQL installation can be considered completed.

To check the functionality of MySQL, click the Windows Start button, find the utility for working with MySQL (MySql Server 5.5 MySQL Server Command Line) and run it.

After entering the administrator password, we are taken to the MySQL command line.

Enter the command
show databases;

If we see a list of databases, this will mean that the server is working correctly.

Exit command line mode:
exit;

This completes the server installation. Good luck!

Choose latest version(at the time of writing this article - 2.2.17) and go to the list of distributions. On your home computer you are unlikely to need SSL, so download the version Win32 Binary without crypto (no mod_ssl) (MSI Installer).

Now run the installer (the user must have administrator rights). At the beginning there is nothing interesting - just a welcome screen:

The second stage is to agree to the license terms:

The third stage is a few introductory words from the developers. Immediately click Next:

Fourth stage. Here you need to enter data in all three text fields. You can enter a non-existent domain like test.test or example.com. This data is needed to create a basic configuration file. Below the text fields is one of the most important settings- install Apache as a service or as regular program. Select “for All Users, on port 80, as a Service - Recommended” - install as a service:

Type of instalation. Select Custom:

Sixth stage. Selecting components and installation location. I left all the default values:

Seventh stage. Everything is ready for installation. Click Install:

We complete the installation (Finish):

Installation completed. An Apache icon will appear in the tray, with which you can quickly stop/start the service:

We check the functionality. Open your browser and enter http://localhost/ in the address bar. If everything is correct, a page should open that says It works!

In order for the server to be accessible not only on the local computer, but also from outside, you need to open the input TCP port 80 in Windows Firewall.

Opening a port in Windows Firewall

Open Start -> Control Panel -> System and Security -> Windows Firewall. In the left column, click on the link “ Extra options" In the window that opens, also in the left column, click on “Rules for incoming connections” and then in right column“Create a rule...”:

The Create Rule Wizard will open. Select the rule type “For port”:

Protocols and ports. TCP protocol. Below, select the “Specified local ports” option, and enter the port number - 80 - in the text field on the right:

Action. Select “Allow connection”:

Profile. Leave it as default (all three options are checked: domain, private, public):

Finally, enter the name of the created rule. For example Apache Web Server:

That's all. Click Finish. Now you can try connecting from another computer.

I remind you that for connections to the server not only from local network, but also from the Internet, on the router (if you have one) you need to configure forwarding of port 80 (port forwarding or this is often called a virtual server).

PHP installation (manual)

Download the latest PHP version(5.3.5 at the time of writing) from the site: http://windows.php.net/download/. There are several versions available here:

  1. VC9 x86 Non Thread Safe - for installation on IIS in FastCGI mode.
  2. VC9 x86 Thread Safe - ???
  3. VC6 x86 Non Thread Safe - for installation on Apache in CGI/FastCGI mode.
  4. VC6 x86 Thread Safe- for installation on Apache in module mode - our choice.

Because We started the installation manually, download the zip archive.

We unpack the contents of the archive into the installation directory. I selected C:\Program Files\PHP.

Let's go to this directory. In the installation root you will find two files php.ini-development and php.ini-production. These files contain basic settings. The first file is optimized for developers, the second for production systems. The main difference is that the settings for developers allow errors to be displayed on the screen, while for production systems the display of errors is prohibited for security reasons.

So, select the file you need (I chose php.ini-development), open it and save it in the same folder under the name php.ini. This operation can be done in a regular notepad, but it is still better to use a more convenient editor, for example notepad2.

Now you need to make a few changes to php.ini:

  1. Find the extension_dir option (use CTRL+F search) and change the path to the ext folder according to the path PHP installations. For me it looks like this: extension_dir = “c:\program files\php\ext”
  2. Find the upload_tmp_dir option. Here you need to specify the path to the temporary folder. I chose c:\windows\temp. All together: upload_tmp_dir = “c:\windows\temp”
  3. Find the session.save_path option. Here you also need to specify the path to the temporary folder: session.save_path = “c:\windows\temp”
  4. Go to the Dynamic Extensions section. Here you need to uncomment the lines (remove the semicolon at the beginning) corresponding to PHP modules, which you need for work. Basic set modules may look something like this: ;extension=php_bz2.dll ;extension=php_curl.dll ;extension=php_fileinfo.dll extension=php_gd2.dll ;extension=php_gettext.dll ;extension=php_gmp.dll ;extension=php_intl.dll ;extension= php_imap.dll ;extension=php_interbase.dll ;extension=php_ldap.dll extension=php_mbstring.dll extension=php_exif.dll ; Must be after mbstring as it depends on it extension=php_mysql.dll extension=php_mysqli.dll ;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client ;extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client ;extension=php_openssl.dll ;extension=php_pdo_firebird.dll ;extension=php_pdo_mssql.dll ;extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll ;extension=php_pdo_odbc.dll ;extension=php_pdo_pgs ql.dll ;extension =php_pdo_sqlite.dll ;extension=php_pgsql.dll ;extension=php_phar.dll ;extension=php_pspell.dll ;extension=php_shmop.dll ;extension=php_snmp.dll ;extension=php_soap.dll extension=php_sockets.dll ;extension=php_sqlite. dll extension=php_sqlite3.dll ;extension=php_sybase_ct.dll ;extension=php_tidy.dll ;extension=php_xmlrpc.dll extension=php_xsl.dll extension=php_zip.dll

Now let's move on to Apache settings.

Open the Apache installation folder (by default C:\Program Files\Apache Software Foundation\Apache2.2\). Open the conf folder. Open the httpd.conf file.

Go to the end of the file and add the following lines there:

# Charset AddDefaultCharset windows-1251 # PHP LoadModule php5_module "c:\program files\php\php5apache2_2.dll" PHPIniDir "c:\program files\php" AddType application/x-httpd-php .php

The path to the php folder is the one you chose during the installation process.

In the same file we find the following lines:

DirectoryIndex index.html

Before index.html we add index.php separated by a space. The result is:

DirectoryIndex index.php index.html

For the changes to take effect, restart the Apache service. If the service restarts, this is a good sign. If not, look for errors in configuration files. Check all paths especially carefully.

To make sure PHP is working, open the Apache installation directory, then open the htdocs folder (this contains the default website files). Create an index.php file in this folder with the following content:

Now open http://localhost/ in your browser. If everything is fine, you will see a page similar to this:

If you see a page that says "It works!", try refreshing the page using CTRL+F5.

Installing MySQL

Moved into a separate article.







2024 gtavrl.ru.