{"id":7703,"date":"2024-09-18T08:42:10","date_gmt":"2024-09-18T08:42:10","guid":{"rendered":"https:\/\/miloserdov.org\/?p=7703"},"modified":"2024-10-03T03:03:21","modified_gmt":"2024-10-03T03:03:21","slug":"how-to-install-a-web-server-apache-mysql-php-and-phpmyadmin-on-windows-11","status":"publish","type":"post","link":"https:\/\/miloserdov.org\/?p=7703","title":{"rendered":"Web Server on Windows 11 (Apache, MySQL, PHP and phpMyAdmin): step-by-step installation guide"},"content":{"rendered":"<div class=\"0b20205ac99e89c6cabdb919fd9d1a8a\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block; text-align:center;\"\r\n     data-ad-format=\"fluid\"\r\n     data-ad-layout=\"in-article\"\r\n     data-ad-client=\"ca-pub-7219829351026140\"\r\n     data-ad-slot=\"9942251718\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\r\n\r\n\n<\/div>\n<p style=\"text-align: justify;\">\n\t<span style=\"background-color:#FFFF00;\">The instructions have been checked and corrected to work with the latest components (Apache 2.4.62, PHP 8.3.11, MySQL 9.0.1, and phpMyAdmin 6.0).<\/span>\n<\/p>\n<h2 style=\"text-align: justify;\">\n\tTable of contents<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t<a href=\"#1\">1. What is a web server for Windows<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#2\">2. Download web server (Apache, MySQL, PHP and phpMyAdmin) for Windows 11<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#3\">3. Create the structure of the web server<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#4\">4. Installing Apache 2.4<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#5\">5. Installing and configuring MySQL 9.0<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#6\">6. Installing and configuring PHP 8<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#7\">7. Installing and configuring phpMyAdmin<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#8\">8. Server usage and data backup<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#9\">9.&nbsp;PHP tweaking<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#10\">10. Additional configuration of phpMyAdmin<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#11\">11. Setting up the mail plug<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#12\">12. Adding PHP Directory to PATH on Windows<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#13\">13. Setting up cURL in Apache Web Server on Windows<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#14\">14. How to back up Apache data (websites and databases) on Windows<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#15\">15. How to update the web server on Windows<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#16\">16. How to protect the Apache web server from hacking in Windows<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#delete\">How to uninstall the web server<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#mysql_native_password-is-not-loaded\">ERROR 1524 (HY000): Plugin &#39;mysql_native_password&#39; is not loaded<\/a>\n<\/p>\n<hr \/>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"1\" name=\"1\"><\/a>1. What is a web server for Windows<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tThe web server itself is Apache &ndash; it can process requests from the user and send him the requested files, such as static HTML pages, pictures, files with CSS and JavaScript. Since this functionality is usually not enough and most users need support for dynamically created pages, PHP is connected to Apache as a web server module for these purposes. To store data, one or another database management system (DBMS) is used, usually MySQL or MariaDB. The DBMS is not an Apache or PHP module, it is a separate network service to which various programs can connect, it is important for us that PHP can work with MySQL.\n<\/p>\n<p style=\"text-align: justify;\">\n\tThese three components are the most typical of what is commonly referred to as a &ldquo;web server&rdquo;, although, again, the actual web server is just Apache. Quite often, phpMyAdmin is added to these three components. At its core, phpMyAdmin is a set of PHP scripts designed to make working with databases easier. phpMyAdmin is a web interface for working with databases.\n<\/p>\n<p style=\"text-align: justify;\">\n\tIn fact, you can add\/enable other scripting languages to the web server, for example, Python, Perl, Ruby and others &ndash; the corresponding links will be given at the end of the article.\n<\/p>\n<p style=\"text-align: justify;\">\n\tThis is a step by step guide for installing a web server on Windows. Here it will be shown in detail how to install, configure and run Apache, MySQL, PHP and phpMyAdmin without using extraneous assemblies. This approach will allow you to have the latest versions of components and not worry about the security of running programs. After understanding how Apache modules work and connect, you can add any components you need, as well as customize it exactly to your needs.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"2\" name=\"2\"><\/a>2. Download web server (Apache, MySQL, PHP and phpMyAdmin) for Windows 11<br \/>\n<\/h2>\n<ul>\n<li style=\"text-align: justify;\">\n\t\t<strong>Apache<\/strong>: <a href=\"https:\/\/www.apachelounge.com\/download\/\" rel=\"noopener\" target=\"_blank\">https:\/\/www.apachelounge.com\/download\/<\/a>. Pay attention to the 64-bit and 32-bit versions.\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/apachelounge.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7713\" height=\"573\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/apachelounge.png\" width=\"1201\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/apachelounge.png 1201w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/apachelounge-1000x477.png 1000w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/apachelounge-768x366.png 768w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/a>\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\t<strong>PHP<\/strong>: <a href=\"https:\/\/windows.php.net\/download\/\" rel=\"noopener\" target=\"_blank\">https:\/\/windows.php.net\/download\/<\/a>. Choose the <strong>Thread Safe<\/strong> version, pay attention to the 64-bit and 32-bit versions.\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/windows-php.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7712\" height=\"787\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/windows-php.png\" width=\"1200\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/windows-php.png 1200w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/windows-php-1000x656.png 1000w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/windows-php-768x504.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a>\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\t<strong>MySQL<\/strong>: <a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" rel=\"noopener\" target=\"_blank\">https:\/\/dev.mysql.com\/downloads\/mysql\/<\/a>. This page has an executable installer, but I recommend downloading the ZIP file.\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/dev-mysql.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7711\" height=\"795\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/dev-mysql.png\" width=\"772\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/dev-mysql.png 772w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/dev-mysql-768x791.png 768w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tOn the download page, we are prompted to register or log into an existing account &ndash; this is optional. Just click on the link &ldquo;<strong>No thanks, just start my download<\/strong>&rdquo;.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/dev-mysql-2.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7710\" height=\"681\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/dev-mysql-2.png\" width=\"707\" \/><\/a>\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\t<strong>phpMyAdmin<\/strong>: <a href=\"https:\/\/www.phpmyadmin.net\/downloads\/phpMyAdmin-latest-all-languages.zip\" rel=\"noopener\" target=\"_blank\">https:\/\/www.phpmyadmin.net\/downloads\/phpMyAdmin-latest-all-languages.zip<\/a>\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\tWe also need Visual C++ Redistributable for Visual Studio 2015-2022 (or any other later one), you can download it on the official Microsoft website at the link (direct download link for the <a href=\"https:\/\/aka.ms\/vs\/17\/release\/VC_redist.x64.exe\" rel=\"noopener\" target=\"_blank\">64-bit version<\/a>; direct download link for the <a href=\"https:\/\/aka.ms\/vs\/17\/release\/VC_redist.x86.exe\" rel=\"noopener\" target=\"_blank\">32-bit version<\/a>).\n<\/p>\n<p style=\"text-align: justify;\">\n\tSo, I have downloaded the following files:\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\thttpd-2.4.52-win64-VS16.zip\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tphp-8.1.2-Win32-vs16-x64.zip\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tmysql-9.0.1-winx64.zip\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tphpMyAdmin-5.1.2-all-languages.zip\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tVC_redist.x64.exe\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\tInstall the <strong>VC_redist.x64.exe<\/strong> file.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<u>An important note when working with file extensions<\/u>. If you use Windows Explorer to create and rename config files, remember that it doesn&#39;t show the file extension by default, so you may see <strong>my.ini<\/strong>, but it&#39;s actually <strong>my.ini.txt<\/strong>. Therefore, the server does not see this file and does not apply the settings from it, which leads to errors.\n<\/p>\n<p style=\"text-align: justify;\">\n\tSo when creating files:\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\tor use <a href=\"https:\/\/suay.site\/?p=715\" rel=\"noopener\" target=\"_blank\">Double Commander (Free alternative to Total Commander)<\/a>, this program always shows file extensions, and generally a very good cross-platform, open source two-window file manager\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tor turn on the display of file extensions in Explorer\n\t<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"3\" name=\"3\"><\/a>3. Create the structure of the web server<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tLet&#39;s create the directory structure of our server. The main idea is to separate executable files and site files from databases. This is convenient for server maintenance, including backup.\n<\/p>\n<p style=\"text-align: justify;\">\n\tAt the root of the <strong>C:\\<\/strong> drive, create the &ldquo;<strong>Server<\/strong>&rdquo; directory. In this directory, create 2 subdirectories: &ldquo;<strong>bin<\/strong>&rdquo; (for executable files) and &ldquo;<strong>data<\/strong>&rdquo;.\n<\/p>\n<p style=\"text-align: justify;\">\n\tGo to the &ldquo;<strong>data<\/strong>&rdquo; directory and create subfolders &ldquo;<strong>DB<\/strong>&rdquo; (for databases) and &ldquo;<strong>htdocs<\/strong>&rdquo; (for websites) there.\n<\/p>\n<p style=\"text-align: justify;\">\n\tGo to the &ldquo;<strong>C:\\Server\\data\\DB\\<\/strong>&rdquo; directory and create an empty &ldquo;<strong>data<\/strong>&rdquo; folder there.\n<\/p>\n<p style=\"text-align: justify;\">\n\tMap of important folders that are mentioned in this manual:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nC:.\r\n\u2514\u2500\u2500 Server\r\n &nbsp;&nbsp; \u251c\u2500\u2500 bin\r\n &nbsp;&nbsp; \u2502&nbsp;&nbsp; \u251c\u2500\u2500 Apache24\r\n    \u2502   \u2502   \u2514\u2500\u2500\u2500 conf\r\n &nbsp;&nbsp; \u2502&nbsp;&nbsp; \u251c\u2500\u2500 mysql-9.0\r\n &nbsp;&nbsp; \u2502&nbsp;&nbsp; \u251c\u2500\u2500 PHP\r\n &nbsp;&nbsp; \u2502&nbsp;&nbsp; \u2514\u2500\u2500 Sendmail\r\n &nbsp;&nbsp; \u251c\u2500\u2500 certs\r\n &nbsp;&nbsp; \u251c\u2500\u2500 data\r\n &nbsp;&nbsp; \u2502&nbsp;&nbsp; \u251c\u2500\u2500 DB\r\n    \u2502   \u2502   \u2514\u2500\u2500\u2500 data\r\n &nbsp;&nbsp; \u2502&nbsp;&nbsp; \u2514\u2500\u2500 htdocs\r\n    \u2502&nbsp;&nbsp;     \u2514\u2500\u2500\u2500 phpmyadmin\r\n &nbsp;&nbsp; \u2514\u2500\u2500 manage<\/pre>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"4\" name=\"4\"><\/a>4. Installing Apache 2.4<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tUnzip the contents of the downloaded archive (to be more precise, only the <strong>Apache24<\/strong> directory) to <strong>C:\\Server\\bin\\<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tGo to the <strong>c:\\Server\\bin\\Apache24\\conf\\<\/strong> directory and open the <strong>httpd.conf<\/strong> file with any text editor.\n<\/p>\n<p style=\"text-align: justify;\">\n\tIn it, we need to replace a number of lines.\n<\/p>\n<p style=\"text-align: justify;\">\n\tReplace\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nDefine SRVROOT &quot;c:\/Apache24&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\twith\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nDefine SRVROOT &quot;c:\/Server\/bin\/Apache24&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\treplace\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n#LoadModule rewrite_module modules\/mod_rewrite.so<\/pre>\n<p style=\"text-align: justify;\">\n\treplace\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nLoadModule rewrite_module modules\/mod_rewrite.so<\/pre>\n<p style=\"text-align: justify;\">\n\treplace\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n#ServerName www.example.com:80<\/pre>\n<p style=\"text-align: justify;\">\n\twith\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nServerName localhost<\/pre>\n<p style=\"text-align: justify;\">\n\treplace\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n    # AllowOverride controls what directives may be placed in .htaccess files.\r\n    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:\r\n    #   AllowOverride FileInfo AuthConfig Limit\r\n    #\r\n    AllowOverride none<\/pre>\n<p style=\"text-align: justify;\">\n\twith\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n    # AllowOverride controls what directives may be placed in .htaccess files.\r\n    # It can be &quot;All&quot;, &quot;None&quot;, or any combination of the keywords:\r\n    #   AllowOverride FileInfo AuthConfig Limit\r\n    #\r\n    AllowOverride All<\/pre>\n<p style=\"text-align: justify;\">\n\treplace\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nDocumentRoot &quot;${SRVROOT}\/htdocs&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\twith\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nDocumentRoot &quot;c:\/Server\/data\/htdocs&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\treplace\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n&lt;Directory &quot;${SRVROOT}\/htdocs&quot;&gt;<\/pre>\n<p style=\"text-align: justify;\">\n\twith\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n&lt;Directory &quot;c:\/Server\/data\/htdocs&quot;&gt;<\/pre>\n<p style=\"text-align: justify;\">\n\tand replace\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nDirectoryIndex index.html<\/pre>\n<p style=\"text-align: justify;\">\n\twith\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nDirectoryIndex index.php index.html index.htm<\/pre>\n<p style=\"text-align: justify;\">\n\tSave and close the file. That&#39;s it, Apache setup is complete!\n<\/p>\n<p style=\"text-align: justify;\">\n\tOpen a command prompt (this can be done by pressing the <strong>Win+x<\/strong> keys at the same time). Select there &ldquo;<strong>Windows Terminal (Admin)<\/strong>&rdquo;.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/win-x.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7709\" height=\"676\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/win-x.png\" width=\"419\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tand copy there:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k install<\/pre>\n<p style=\"text-align: justify;\">\n\tIf you receive a request from the firewall, then click &ldquo;<strong>Allow&nbsp;access<\/strong>&rdquo;.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/apache-windows-firewall.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7717\" height=\"404\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/apache-windows-firewall.png\" width=\"552\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tNow type in the command line:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k start<\/pre>\n<p style=\"text-align: justify;\">\n\tand press <strong>Enter<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/httpd.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7715\" height=\"287\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/httpd.png\" width=\"812\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/httpd.png 812w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/httpd-768x271.png 768w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tNow in the browser we type <a href=\"http:\/\/localhost\/\" rel=\"noopener\" target=\"_blank\">http:\/\/localhost\/<\/a> and we see the following:\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/localhost.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7708\" height=\"556\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/localhost.png\" width=\"788\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/localhost.png 788w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/localhost-768x542.png 768w\" sizes=\"(max-width: 788px) 100vw, 788px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tThis means two things:\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\tApache running\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tThere are no files in the <strong>c:\\Server\\data\\htdocs\\<\/strong> directory.\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\tYou can play with it &ndash; add any html files to the directory &ndash; a full-fledged web server works.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"5\" name=\"5\"><\/a>5. Installing and configuring MySQL 9.0<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tUnpack the MySQL files into the <strong>bin<\/strong>\u200b directory (from the mysql-9.0.1-winx64.zip archive). Rename the mysql-9.0.1-winx64 folder to <strong>mysql-9.0<\/strong>\u200b (for brevity). By the way, the unpacked mysql-9.0 folder takes up about 800 megabytes!\n<\/p>\n<p style=\"text-align: justify;\">\n\tWe go into this folder and create the <strong>my.ini<\/strong> file there. Now open this file with any text editor.\n<\/p>\n<p style=\"text-align: justify;\">\n\tAdd the following lines there:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n[mysqld]\r\n\r\nsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES \r\ndatadir=&quot;c:\/Server\/data\/DB\/data\/&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\tSave and close it.\n<\/p>\n<p style=\"text-align: justify;\">\n\tThe setup is completed, but you still need to perform initialization and installation, for this we open the command line as an administrator and sequentially enter there:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nC:\\Server\\bin\\mysql-9.0\\bin\\mysqld --initialize-insecure --user=root\r\nC:\\Server\\bin\\mysql-9.0\\bin\\mysqld --install\r\nnet start mysql<\/pre>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/mysqld.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7707\" height=\"297\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/mysqld.png\" width=\"895\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/mysqld.png 895w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/mysqld-768x255.png 768w\" sizes=\"(max-width: 895px) 100vw, 895px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tAt the end of this process, automatically generated files should appear in the <strong>C:\\Server\\data\\DB\\data\\<\/strong> directory:\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/mysql-data.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7722\" height=\"976\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/mysql-data.png\" width=\"960\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/mysql-data.png 960w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/mysql-data-768x781.png 768w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tThe MySQL service will now start every time you turn on Windows.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"6\" name=\"6\"><\/a>6. Installing and configuring PHP 8<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tIn the <strong>c:\\Server\\bin\\<\/strong> folder, create a <strong>PHP<\/strong>&nbsp;directory and copy the contents of the php-8.1.2-Win32-vs16-x64.zip archive into it.\n<\/p>\n<p style=\"text-align: justify;\">\n\tIn the <strong>c:\\Server\\bin\\Apache24\\conf\\httpd.conf<\/strong> file, add the lines at the very end\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nPHPIniDir &quot;C:\/Server\/bin\/PHP&quot;\r\nAddHandler application\/x-httpd-php .php\r\nLoadModule php_module &quot;C:\/Server\/bin\/php\/php8apache2_4.dll&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/httpd.conf_.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7706\" height=\"607\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/httpd.conf_.png\" width=\"910\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/httpd.conf_.png 910w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/httpd.conf_-768x512.png 768w\" sizes=\"(max-width: 910px) 100vw, 910px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tThen restart Apache\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k restart<\/pre>\n<p style=\"text-align: justify;\">\n\tIn the directory <strong>c:\\Server\\data\\htdocs\\<\/strong> create a file called <strong>i.php<\/strong>\n<\/p>\n<p style=\"text-align: justify;\">\n\tCopy to this file:\n<\/p>\n<pre class=\"brush:php;\" style=\"text-align: justify;\">\r\n&lt;?php\r\nphpinfo ();<\/pre>\n<p style=\"text-align: justify;\">\n\tIn a browser, open the link <a href=\"http:\/\/localhost\/i.php\" rel=\"noopener\" target=\"_blank\">http:\/\/localhost\/i.php<\/a>. If you see the same thing as in the picture, then PHP is working:\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/php-localhost.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7705\" height=\"929\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/php-localhost.png\" width=\"995\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/php-localhost.png 995w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/php-localhost-768x717.png 768w\" sizes=\"(max-width: 995px) 100vw, 995px\" \/><\/a>\n<\/p>\n<h3 style=\"text-align: justify;\">\n\tPHP 8 setup<br \/>\n<\/h3>\n<p style=\"text-align: justify;\">\n\tPHP configuration takes place in the <strong>php.ini<\/strong> file. There is no php.ini in the zip archives intended for manual installation and for updates (this is done on purpose so as not to accidentally overwrite your file with your unique settings). But there are two others, which are called php.ini-development and php.ini-production. Any of them, when manually installed, can be renamed to php.ini and configured further. On localhost we will use <strong>php.ini-development<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tOpen the <strong>php.ini<\/strong> file with any text editor, look for the line\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n;extension_dir = &quot;ext&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\tand replace it with\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nextension_dir = &quot;C:\\Server\\bin\\PHP\\ext\\&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\tNow find the group of lines:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n;extension=bz2\r\n;extension=curl\r\n;extension=ffi\r\n;extension=ftp\r\n;extension=fileinfo\r\n;extension=gd\r\n;extension=gettext\r\n;extension=gmp\r\n;extension=intl\r\n;extension=imap\r\n;extension=ldap\r\n;extension=mbstring\r\n;extension=exif      ; Must be after mbstring as it depends on it\r\n;extension=mysqli\r\n;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client\r\n;extension=oci8_19  ; Use with Oracle Database 19 Instant Client\r\n;extension=odbc\r\n;extension=openssl\r\n;extension=pdo_firebird\r\n;extension=pdo_mysql\r\n;extension=pdo_oci\r\n;extension=pdo_odbc\r\n;extension=pdo_pgsql\r\n;extension=pdo_sqlite\r\n;extension=pgsql\r\n;extension=shmop    <\/pre>\n<p style=\"text-align: justify;\">\n\tand replace it with:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nextension=bz2\r\nextension=curl\r\nextension=ffi\r\nextension=ftp\r\nextension=fileinfo\r\nextension=gd\r\nextension=gettext\r\nextension=gmp\r\nextension=intl\r\nextension=imap\r\nextension=ldap\r\nextension=mbstring\r\nextension=exif      ; Must be after mbstring as it depends on it\r\nextension=mysqli\r\n;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client\r\n;extension=oci8_19  ; Use with Oracle Database 19 Instant Client\r\nextension=odbc\r\nextension=openssl\r\n;extension=pdo_firebird\r\nextension=pdo_mysql\r\n;extension=pdo_oci\r\nextension=pdo_odbc\r\nextension=pdo_pgsql\r\nextension=pdo_sqlite\r\nextension=pgsql\r\nextension=shmop  <\/pre>\n<p style=\"text-align: justify;\">\n\tnow uncomment this group of lines:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n;extension=soap\r\n;extension=sockets\r\n;extension=sodium\r\n;extension=sqlite3\r\n;extension=tidy\r\n;extension=xsl<\/pre>\n<p style=\"text-align: justify;\">\n\tyou should get:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nextension=soap\r\nextension=sockets\r\nextension=sodium\r\nextension=sqlite3\r\nextension=tidy\r\nextension=xsl<\/pre>\n<p style=\"text-align: justify;\">\n\tWith these actions, we have enabled extensions. They may be needed in different situations for different scripts. Save the file and <strong>restart Apache<\/strong>.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"7\" name=\"7\"><\/a>7. Installing and configuring phpMyAdmin<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tCopy the contents of the phpMyAdmin-5.1.2-all-languages.zip archive to the <strong>c:\\Server\\data\\htdocs\\<\/strong> directory. Rename phpMyAdmin-5.1.2-all-languages to <strong>phpmyadmin<\/strong> (for brevity)\n<\/p>\n<p style=\"text-align: justify;\">\n\tIn the directory <strong>c:\\Server\\data\\htdocs\\phpmyadmin\\<\/strong> create a file <strong>config.inc.php<\/strong> and copy it there:\n<\/p>\n<pre class=\"brush:php;\" style=\"text-align: justify;\">\r\n&lt;?php\r\n\r\n\/* Servers configuration *\/\r\n$i = 0;\r\n\r\n\/* Server: localhost [1] *\/\r\n$i++;\r\n$cfg['Servers'][$i]['verbose'] = &#39;&#39;;\r\n$cfg['Servers'][$i]['host'] = &#39;localhost&#39;;\r\n$cfg['Servers'][$i]['port'] = &#39;&#39;;\r\n$cfg['Servers'][$i]['socket'] = &#39;&#39;;\r\n$cfg['Servers'][$i]['connect_type'] = &#39;tcp&#39;;\r\n$cfg['Servers'][$i]['auth_type'] = &#39;cookie&#39;;\r\n$cfg['Servers'][$i]['user'] = &#39;root&#39;;\r\n$cfg['Servers'][$i]['password'] = &#39;&#39;;\r\n$cfg['Servers'][$i]['nopassword'] = true;\r\n$cfg['Servers'][$i]['AllowNoPassword'] = true;\r\n\r\n\/* End of servers configuration *\/\r\n\r\n$cfg['blowfish_secret'] = &#39;AHGFGLk$2FhlerkewlHL%782@1jBFE-#&#39;;\r\n$cfg['DefaultLang'] = &#39;en&#39;;\r\n$cfg['ServerDefault'] = 1;\r\n$cfg['UploadDir'] = &#39;&#39;;\r\n$cfg['SaveDir'] = &#39;&#39;;\r\n\r\n?&gt;<\/pre>\n<p style=\"text-align: justify;\">\n\tIn the browser we type <a href=\"http:\/\/localhost\/phpmyadmin\/\" rel=\"noopener\" target=\"_blank\">http:\/\/localhost\/phpmyadmin\/<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tEnter root as the username. Leave the password field blank. If everything is done correctly, then everything should look like this:\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7728\" height=\"932\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin.png\" width=\"1271\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin.png 1271w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin-1000x733.png 1000w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin-768x563.png 768w\" sizes=\"(max-width: 1271px) 100vw, 1271px\" \/><\/a>\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"8\" name=\"8\"><\/a>8. Server usage and data backup<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tIn the directory <strong>c:\\Server\\data\\htdocs\\<\/strong> create folders and files, for example:\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\tc:\\Server\\data\\htdocs\\test\\ajax.php &ndash; this file, respectively, will be available at http:\/\/localhost\/test\/ajax.php, etc.\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\tTo create a full backup of all sites and databases, just copy the <strong>C:\\Server\\data\\<\/strong> directory.\n<\/p>\n<p style=\"text-align: justify;\">\n\tBefore updating modules, make a backup of the <strong>bin<\/strong> folder &ndash; in case of problems, it will be easy to roll back to previous versions.\n<\/p>\n<p style=\"text-align: justify;\">\n\tWhen you reinstall the server or upgrade it, you must reconfigure the configuration files. If you have copies of these files, then the process can be greatly accelerated. It is recommended to back up the following files:\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\tc:\\Server\\bin\\Apache24\\conf\\httpd.conf\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tc:\\Server\\bin\\mysql-9.0\\my.ini\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tc:\\Server\\bin\\PHP\\php.ini\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tc:\\Server\\data\\htdocs\\\\phpmyadmin\\config.inc.php\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\tAll settings are stored in them.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"9\" name=\"9\"><\/a>9.&nbsp;PHP tweaking<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tPHP is currently a very powerful, flexible, user-friendly programming language and tool. On a local computer, it can be used to perform a variety of tasks that are not necessarily related to the generation of Web pages. When solving extraordinary tasks, you can run into the restrictions set in the settings. These settings are contained in the php.ini file (c:\\Server\\bin\\PHP\\php.ini) Let&#39;s look at some of them:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nmemory_limit = 128M<\/pre>\n<p style=\"text-align: justify;\">\n\tsets the maximum amount of memory the script can use\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\npost_max_size = 8M<\/pre>\n<p style=\"text-align: justify;\">\n\tsets the maximum amount of data that will be accepted when sending using the POST method\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n;default_charset = &quot;UTF-8&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\tsets the encoding (by default, the line is commented out)\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nupload_max_filesize = 2M<\/pre>\n<p style=\"text-align: justify;\">\n\tthe maximum size of the file uploaded to the server. Initially set to a very small size &ndash; only two megabytes. For example, when uploading a database to phpMyAdmin, you will not be able to upload a file larger than 2 megabytes until this setting item is changed.\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nmax_file_uploads = 20<\/pre>\n<p style=\"text-align: justify;\">\n\tmaximum number of files to upload at one time\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nmax_execution_time = 30<\/pre>\n<p style=\"text-align: justify;\">\n\tmaximum execution time for one script\n<\/p>\n<p style=\"text-align: justify;\">\n\tIt is not necessary to change these settings, but it is useful to know about them.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"10\" name=\"10\"><\/a>10. Additional configuration of phpMyAdmin<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tWe have already set up phpMyAdmin and for most of us the basic functionality is enough. However, the phpMyAdmin start page says &lsquo;The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why.&rsquo;.\n<\/p>\n<p style=\"text-align: justify;\">\n\tNew features are:\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\tshowing relationships between (related) tables;\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tadding information about tables (since version 2.3.0 you can describe in a special table &#39;table_info&#39; which column will be shown in the tooltip when moving the cursor over the associated key);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tcreating a PDF schema (starting from version 2.3.0 you can create PDF pages in phpMyAdmin showing the relationships between your tables);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tdisplay column comments (since version 2.3.0 you can make a comment describing each column for each table. And they will be visible in the &quot;print preview&quot;. Since version 2.5.0, comments are used on native table pages and in view, showing as tooltips over columns (property tables) or embedded in the table header in view mode (they can also be shown in a table dump);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tcreate bookmarks (since version 2.2.0, phpMyAdmin allows users to bookmark queries. This can be useful for frequently used queries);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\thistory of SQL queries (starting from version 2.5.0 you can save your history of all SQL queries that were made through the phpMyAdmin interface);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tdesigner (starting from version 2.10.0, the Designer tool is available; it allows you to visually manage the relationships between tables);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tinformation about recently used tables;\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tcustomizing the interface of frequently used tables;\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\ttracking (since version 3.3.x a tracking mechanism is available. It helps you trace every SQL command that was executed by phpMyAdmin. Recording of work with data and recording of commands is supported. After enabling, you can make versions of tables);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tuser settings (since version 3.4.x, phpMyAdmin allows users to set most of the settings and save them in the database);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tcustom menus (starting from version 4.1.0 you can create user groups that will only have access to assigned menu items. A user can be assigned to a group and will see only menu items available for his group);\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\thide\/show navigation items (since version 4.1.0 you can hide\/show items in the navigation tree).\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\tother\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\tNow we will configure these additional features in full. Go to <a href=\"http:\/\/localhost\/phpmyadmin\/index.php?route=\/check-relations\" rel=\"noopener\" target=\"_blank\">http:\/\/localhost\/phpmyadmin\/index.php?route=\/check-relations<\/a> and click &ldquo;<strong>Create a database named &#39;phpmyadmin&#39; and setup the phpMyAdmin configuration storage there<\/strong>&rdquo;.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/check-relations.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7727\" height=\"362\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/check-relations.png\" width=\"1063\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/check-relations.png 1063w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/check-relations-1000x341.png 1000w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/check-relations-768x262.png 768w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tAfter that, all new features will be activated.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin-check-relations.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7726\" height=\"920\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin-check-relations.png\" width=\"859\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin-check-relations.png 859w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/phpmyadmin-check-relations-768x823.png 768w\" sizes=\"(max-width: 859px) 100vw, 859px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tSome screenshots of new features:\n<\/p>\n<p style=\"text-align: justify;\">\n\t1) Designer\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-designer.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7725\" height=\"904\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-designer.png\" width=\"1373\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-designer.png 1373w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-designer-1000x658.png 1000w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-designer-768x506.png 768w\" sizes=\"(max-width: 1373px) 100vw, 1373px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t2) Tracking\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-tracking.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7724\" height=\"906\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-tracking.png\" width=\"801\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-tracking.png 801w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/database-tracking-768x869.png 768w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/a>\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"11\" name=\"11\"><\/a>11. Setting up the mail plug<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tIn the <strong>C:\\Server\\bin\\<\/strong> directory, create a new directory called <strong>Sendmail<\/strong>. Now in this directory create a <strong>sendmail.php<\/strong> file with the following content:\n<\/p>\n<pre class=\"brush:php;\" style=\"text-align: justify;\">\r\n#!\/usr\/bin\/env php\r\n \r\n&lt;?php\r\n\/*  PHP.INI\r\n *  [mail function]\r\n *  ;SMTP = localhost\r\n *  ;smtp_port = 25\r\n *  ;sendmail_from = me@example.com\r\n *  sendmail_path = php.exe sendmail.php --dir C:\\mail --open\r\n *\/\r\n \r\n$is_windows = stristr(PHP_OS, &#39;WIN&#39;);\r\n$options = getopt(&quot;&quot;, ['open', 'prepend', 'file:', 'dir:']);\r\n$is_open = isset($options['open']);\r\n$is_prepend = isset($options['prepend']);\r\n$is_onefile = isset($options['file']);\r\n$mail_dir = isset($options['dir']) ? $options['dir'] : sys_get_temp_dir() . &#39;\/mail&#39;;\r\n$file_name = isset($options['file']) ? $options['file'] : mkname();\r\n$file_path = $mail_dir . &#39;\/&#39; . $file_name;\r\n \r\nif (!is_dir($mail_dir)) {\r\n    mkdir($mail_dir, 0777, TRUE);\r\n    if (!is_dir($mail_dir)) {\r\n        die(&#39;Mail folder [' . $mail_dir . '] not created&#39;);\r\n    }\r\n}\r\n \r\n$stream = $is_onefile ? PHP_EOL . str_repeat(&quot;-=&quot;, 10) . date(&#39;Y-m-d H:i:s&#39;) . str_repeat(&quot;-=&quot;, 10) . PHP_EOL : &#39;&#39;;\r\nwhile (false !== ($line = fgets(STDIN))) {\r\n    \/\/$stream .= ($is_windows ? str_replace(&quot;\\n&quot;, PHP_EOL, $line) : $line);\r\n    $stream .= $line;\r\n}\r\n \r\nif ($is_prepend &amp;&amp; file_exists($file_path)) {\r\n    $file_contents = file_get_contents($file_path);\r\n    $stream .= $file_contents;\r\n}\r\n \r\nfile_put_contents($file_path, $stream, $is_prepend ? 0 : FILE_APPEND);\r\n \r\nif ($is_open &amp;&amp; $is_windows) {\r\n    pclose(popen(&quot;start \/B notepad &quot; . $file_path, &quot;r&quot;));\r\n}\r\n \r\nfunction mkname($i = 0) {\r\n    global $mail_dir;\r\n    $fn = &#39;mail_&#39; . date(&#39;Y-m-d_H-i-s_&#39;) . $i . &#39;.eml&#39;;\r\n    return file_exists($mail_dir . &#39;\/&#39; . $fn) ? mkname( ++$i) : $fn;\r\n}<\/pre>\n<p style=\"text-align: justify;\">\n\tOpen the PHP configuration file, it is located here <strong>C:\\Server\\bin\\PHP\\php.ini<\/strong>. And add one line there:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nsendmail_path = &quot;C:\\Server\\bin\\PHP\\php.exe C:\\Server\\bin\\Sendmail\\sendmail.php --dir C:\\Server\\bin\\Sendmail\\emails&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\tSave the file and restart the server. Great, now all sent emails will be stored in <strong>C:\\Server\\bin\\Sendmail\\emails\\<\/strong>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/Sendmail.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7732\" height=\"568\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/Sendmail.jpg\" width=\"830\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/Sendmail.jpg 830w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/Sendmail-768x526.jpg 768w\" sizes=\"(max-width: 830px) 100vw, 830px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tEmails will have the .eml extension and they can be opened, for example, with the Thunderbird program or a text editor.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"12\" name=\"12\"><\/a>12. Adding PHP Directory to PATH on Windows<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tIf this is not done, then there may be problems with some PHP modules, including php_curl.dll, php_intl.dll, php_ldap.dll, php_pdo_pgsql.dll and php_pgsql.dll. At least when the server is started, the following appears in the logs every time:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nPHP Warning:  PHP Startup: Unable to load dynamic library &#39;curl&#39; (tried: C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\curl (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c), C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\php_curl.dll (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c)) in Unknown on line 0\r\nPHP Warning:  PHP Startup: Unable to load dynamic library &#39;intl&#39; (tried: C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\intl (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c), C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\php_intl.dll (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c)) in Unknown on line 0\r\nPHP Warning:  PHP Startup: Unable to load dynamic library &#39;ldap&#39; (tried: C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\ldap (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c), C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\php_ldap.dll (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c)) in Unknown on line 0\r\nPHP Warning:  PHP Startup: Unable to load dynamic library &#39;pdo_pgsql&#39; (tried: C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\pdo_pgsql (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c), C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\php_pdo_pgsql.dll (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c)) in Unknown on line 0\r\nPHP Warning:  PHP Startup: Unable to load dynamic library &#39;pdo_sqlite&#39; (tried: C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\pdo_sqlite (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c), C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\php_pdo_sqlite.dll (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c)) in Unknown on line 0\r\nPHP Warning:  PHP Startup: Unable to load dynamic library &#39;pgsql&#39; (tried: C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\pgsql (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c), C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\php_pgsql.dll (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c)) in Unknown on line 0\r\nPHP Warning:  PHP Startup: Unable to load dynamic library &#39;sodium&#39; (tried: C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\sodium (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c), C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\php_sodium.dll (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c)) in Unknown on line 0\r\nPHP Warning:  PHP Startup: Unable to load dynamic library &#39;sqlite3&#39; (tried: C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\sqlite3 (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c), C:\\\\Server\\\\bin\\\\PHP\\\\ext\\\\php_sqlite3.dll (\\xd0\\x9d\\xd0\\xb5 \\xd0\\xbd\\xd0\\xb0\\xd0\\xb9\\xd0\\xb4\\xd0\\xb5\\xd0\\xbd \\xd1\\x83\\xd0\\xba\\xd0\\xb0\\xd0\\xb7\\xd0\\xb0\\xd0\\xbd\\xd0\\xbd\\xd1\\x8b\\xd0\\xb9 \\xd0\\xbc\\xd0\\xbe\\xd0\\xb4\\xd1\\x83\\xd0\\xbb\\xd1\\x8c)) in Unknown on line 0<\/pre>\n<p style=\"text-align: justify;\">\n\tTo avoid these warnings, you need to add the path to PHP to the system environment variables.\n<\/p>\n<p style=\"text-align: justify;\">\n\tClick the <strong>Start<\/strong> button, start typing &ldquo;<strong>Edit the system environment variables<\/strong>&rdquo;&nbsp;and open the corresponding settings window.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7737\" height=\"811\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env.png\" width=\"810\" srcset=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env.png 810w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-768x769.png 768w, https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-150x150.png 150w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tThere, click &ldquo;<strong>Environment Variables<\/strong>&rdquo;.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-2.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7736\" height=\"474\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-2.png\" width=\"417\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tIn the &ldquo;<strong>System Variables<\/strong>&rdquo; window, find and click &ldquo;<strong>Path<\/strong>&rdquo;, then click &ldquo;<strong>Edit<\/strong>&rdquo; button:\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-3.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7735\" height=\"593\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-3.png\" width=\"625\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tIf the following window opens,\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-4.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7740\" height=\"168\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-4.png\" width=\"656\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tthen at the very beginning of the line, add\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nC:\\Server\\bin\\PHP\\;<\/pre>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-5.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7739\" height=\"170\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-5.png\" width=\"657\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tClick &ldquo;<strong>OK<\/strong>&rdquo;.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-7.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7738\" height=\"590\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-7.png\" width=\"621\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tIf a multi-line window opens, then click &ldquo;<strong>Create<\/strong>&rdquo; and enter &ldquo;<strong>C:\\Server\\bin\\PHP\\<\/strong>&rdquo; there, move the entry to the very top:\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-8.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7734\" height=\"507\" src=\"https:\/\/miloserdov.org\/wp-content\/uploads\/2022\/02\/env-8.png\" width=\"532\" \/><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\tClose all windows and save your changes.\n<\/p>\n<p style=\"text-align: justify;\">\n\tRestart the server.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"13\" name=\"13\"><\/a>13. Setting up cURL in Apache Web Server on Windows<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tIf you don&#39;t know what cURL is, then you don&#39;t need it, so feel free to skip this step.\n<\/p>\n<p style=\"text-align: justify;\">\n\tcURL is a console utility that allows you to communicate with remote servers using a very large number of protocols. cURL can use cookies and supports authentication. If the web application requires cURL, then it must be specified in the dependencies. Many popular applications do not require cURL, for example, phpMyAdmin and WordPress do not need to set up cURL.\n<\/p>\n<p style=\"text-align: justify;\">\n\tIf cURL is configured incorrectly, then you will get errors:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nFatal error: Call to undefined function curl_multi_init() in &hellip;<\/pre>\n<p style=\"text-align: justify;\">\n\tOr:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nError curl: SSL certificate problem: unable to get local issuer certificate<\/pre>\n<p style=\"text-align: justify;\">\n\tFor cURL to work in Apache on Windows you need:\n<\/p>\n<p style=\"text-align: justify;\">\n\t1) Be sure to add PHP directory to PATH (system environment variables). How to do this is said a little higher:&nbsp;<a href=\"https:\/\/miloserdov.org\/?p=7703#12\">https:\/\/miloserdov.org\/?p=7703#12<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t2) In the <strong>C:\\Server\\bin\\PHP\\php.ini<\/strong> file, the &ldquo;<strong>extension=curl<\/strong>&rdquo; line must be uncommented\n<\/p>\n<p style=\"text-align: justify;\">\n\t3) You need to download the file <a href=\"https:\/\/curl.haxx.se\/ca\/cacert.pem\" rel=\"noopener\" target=\"_blank\">https:\/\/curl.haxx.se\/ca\/cacert.pem<\/a>, then in the <strong>C:\\Server\\<\/strong> folder create a new folder called <strong>certs<\/strong> and move it to this new folder (<strong>C:\\Server\\certs\\<\/strong>) downloaded file.\n<\/p>\n<p style=\"text-align: justify;\">\n\t4) In the file <strong>C:\\Server\\bin\\PHP\\php.ini<\/strong> find the line\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n;curl.cainfo =<\/pre>\n<p style=\"text-align: justify;\">\n\tAnd replace it with\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\ncurl.cainfo = C:\\Server\\certs\\cacert.pem<\/pre>\n<p style=\"text-align: justify;\">\n\t5) Restart the server.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"14\" name=\"14\"><\/a>14. How to back up Apache data (websites and databases) on Windows<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tAll relevant information, i.e. site files and their databases are stored in the <strong>C:\\Server\\data\\<\/strong> folder. A backup copy in case the original data would become corrupted can be done in two ways.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<u><strong>The first way<\/strong><\/u> is that we simply make a copy of all files (websites + databases) to a safe place. This is a simple method and for most of us it will be the most convenient.\n<\/p>\n<p style=\"text-align: justify;\">\n\tYou need to start by stopping MySQL, because until it is stopped, some database files are open and cannot be copied correctly:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nnet stop mysql<\/pre>\n<p style=\"text-align: justify;\">\n\tNow just copy the folder <strong>C:\\Server\\data\\<\/strong> to any safe place. It already contains both databases (subfolder <strong>C:\\Server\\data\\DB\\<\/strong>) and all sites (subfolder <strong>C:\\Server\\data\\htdocs\\<\/strong>). When the copy is complete, start the MySQL service again:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nnet start mysql<\/pre>\n<p style=\"text-align: justify;\">\n\tIf you need to restore all sites, or individual sites, or only individual site files, then this can be done without stopping the web server.\n<\/p>\n<p style=\"text-align: justify;\">\n\tIf you need to restore the databases, then again you will need to stop MySQL and return the original files <strong>C:\\Server\\data\\DB\\<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tPlease note that if you completely return the original folder <strong>C:\\Server\\data\\<\/strong>, then all data is completely rolled back, i.e. all changes made after the backup was created will be gone!\n<\/p>\n<p style=\"text-align: justify;\">\n\t<u><strong>The second backup method<\/strong><\/u> is to export the databases (this is done with the MySQL service running) and back up only the sites folder <strong>C:\\Server\\data\\htdocs\\<\/strong>. This method is a bit more complicated, but you can control which databases you want to export. Also in this form (databases in the form of <strong>.SQL<\/strong> files and site files) it is convenient to transfer sites to another web server or hosting.\n<\/p>\n<p style=\"text-align: justify;\">\n\tWe need the <strong>mysqldump.exe<\/strong> utility, it comes with MySQL and is located in the <strong>C:\\Server\\bin\\mysql-9.0\\bin\\<\/strong> directory.\n<\/p>\n<p style=\"text-align: justify;\">\n\tTo use it, open the command line and go to the folder with the program:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\ncd C:\\Server\\bin\\mysql-9.0\\bin\\<\/pre>\n<p style=\"text-align: justify;\">\n\tThe program can be used with a variety of options.\n<\/p>\n<p style=\"text-align: justify;\">\n\tIf you want to backup all databases to one file, then run:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\n.\\mysqldump.exe -u root -p --all-databases &gt; all-databases.sql<\/pre>\n<p style=\"text-align: justify;\">\n\tBy the way, you need to look for the file in the folder that you see in the command line prompt.\n<\/p>\n<p style=\"text-align: justify;\">\n\tTo backup only one database (eg hackware):\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\n.\\mysqldump.exe -u root -p hackware &gt; hackware.sql<\/pre>\n<p style=\"text-align: justify;\">\n\tTo back up multiple databases, use the <strong>&#8211;databases<\/strong> option, followed by a space-separated list of the databases you want to back up:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\n.\\mysqldump.exe -u root -p --databases hackware miloserdov &gt; hackware_miloserdov.sql<\/pre>\n<p style=\"text-align: justify;\">\n\tTo backup just one table (wp_posts) from a database (wordpress):\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\n.\\mysqldump.exe -u root -p wordpress wp_posts &gt; wordpress_posts.sql<\/pre>\n<p style=\"text-align: justify;\">\n\tTo back up multiple tables, list them with a space after the database name:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\n.\\mysqldump.exe -u root -p wordpress wp_posts wp_comments &gt; wordpress_posts_comments.sql<\/pre>\n<p style=\"text-align: justify;\">\n\tThis is not usually required, but you can backup the server&#39;s binary (executable) files if you wish. All these files are located in the C:\\Server\\bin\\ folder. These are Apache, MySQL and PHP &ndash; i.e. programs that are responsible for the operation of the server, but which we can download at any time from official sites and reconfigure.\n<\/p>\n<p style=\"text-align: justify;\">\n\tIf you want to backup them (for example, before updating the server), then stop the services:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k stop\r\nnet stop mysql<\/pre>\n<p style=\"text-align: justify;\">\n\tAnd copy the folder <strong>C:\\Server\\bin\\<\/strong> to a safe place.\n<\/p>\n<p style=\"text-align: justify;\">\n\tBy the way, you can copy the entire server, ie. folder <strong>C:\\Server\\<\/strong> &#8211; in this case, you will simultaneously get a backup copy of both executable files and data (databases, sites).\n<\/p>\n<p style=\"text-align: justify;\">\n\tWhen the copy is complete, restart the services:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k start\r\nnet start mysql<\/pre>\n<h3 style=\"text-align: justify;\">\n\tDatabase import<br \/>\n<\/h3>\n<p style=\"text-align: justify;\">\n\tImport all databases:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nmysql -u username -p &lt; all-databases.sql<\/pre>\n<p style=\"text-align: justify;\">\n\tSingle database import: To import an existing database file into MySQL or MariaDB, you need to create a new database into which the contents of the dump file will be imported. Start by logging into the database as root or another user with sufficient privileges to create a new database.\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\ncd C:\\Server\\bin\\mysql-9.0\\bin\\\r\n.\\mysql -u root -p<\/pre>\n<p style=\"text-align: justify;\">\n\tThis will give you a MySQL shell prompt. Next, create a new database named <strong>new_database<\/strong>.\n<\/p>\n<pre class=\"brush:sql;\" style=\"text-align: justify;\">\r\nCREATE DATABASE new_database;<\/pre>\n<p style=\"text-align: justify;\">\n\tCreation will be confirmed.\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nOutput\r\nQuery OK, 1 row affected (0.00 sec)<\/pre>\n<p style=\"text-align: justify;\">\n\tNow exit the MySQL shell by pressing <strong>CTRL+d<\/strong>. On a normal command line, you can import a file with the following command:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\n.\\mysql -u username -p new_database &lt; data-dump.sql<\/pre>\n<p style=\"text-align: justify;\">\n\tIn this command:\n<\/p>\n<ul>\n<li style=\"text-align: justify;\">\n\t\t<strong>username<\/strong> is the username with which you can login to the database\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\t<strong>newdatabase<\/strong> is the name of the newly created database\n\t<\/li>\n<li style=\"text-align: justify;\">\n\t\t<strong>data-dump.sql<\/strong> is a dump file with data for import, located in the current directory\n\t<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\n\tSuccessful execution of the command will not display any messages. If errors occur during this process, mysql will print them to the terminal. You can verify that the database has been imported by logging into the MySQL shell again and parsing the data. This can be done by selecting a new database with the command\n<\/p>\n<pre class=\"brush:sql;\" style=\"text-align: justify;\">\r\nUSE new_database;<\/pre>\n<p style=\"text-align: justify;\">\n\tand then execute a SQL query:\n<\/p>\n<pre class=\"brush:sql;\" style=\"text-align: justify;\">\r\nSHOW TABLES;<\/pre>\n<p style=\"text-align: justify;\">\n\tor a similar command to view data.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"15\" name=\"15\"><\/a>15. How to update the web server on Windows<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tAll components that make up the web server are actively developed and new versions are released regularly. When a new version is released, you can update one component (for example, PHP), or several at once.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<u><strong>Apache update<\/strong><\/u>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/apachelounge.com\/download\" rel=\"noopener\" target=\"_blank\">Download<\/a> the archive with the new version of Apache.\n<\/p>\n<p style=\"text-align: justify;\">\n\tCopy the <strong>c:\\Server\\bin\\Apache24\\conf\\httpd.conf<\/strong> file to a safe location.\n<\/p>\n<p style=\"text-align: justify;\">\n\tStop and remove the Apache service:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k stop\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k uninstall<\/pre>\n<p style=\"text-align: justify;\">\n\tDelete the <strong>C:\\Server\\bin\\Apache24\\<\/strong> folder (this will not affect your sites and databases).\n<\/p>\n<p style=\"text-align: justify;\">\n\tUnzip the new archive to <strong>C:\\Server\\bin\\<\/strong>. Copy the httpd.conf file you saved earlier to <strong>c:\\Server\\bin\\Apache24\\conf\\httpd.conf<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tStart the Apache service:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k install\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k start<\/pre>\n<p style=\"text-align: justify;\">\n\t<u><strong>PHP update<\/strong><\/u>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/windows.php.net\/download\/\" rel=\"noopener\" target=\"_blank\">Download<\/a> the archive with the new PHP version.\n<\/p>\n<p style=\"text-align: justify;\">\n\tCopy the&nbsp;<strong>c:\\Server\\bin\\PHP\\php.ini<\/strong> file to a safe place.\n<\/p>\n<p style=\"text-align: justify;\">\n\tDelete the <strong>C:\\Server\\bin\\PHP\\<\/strong> folder.\n<\/p>\n<p style=\"text-align: justify;\">\n\tUnzip the new archive to <strong>C:\\Server\\bin\\PHP<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tCopy the <strong>php.ini<\/strong> file you saved earlier to <strong>c:\\Server\\bin\\PHP\\php.ini<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tRestart the Apache service:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k restart<\/pre>\n<p style=\"text-align: justify;\">\n\t<u><strong>MySQL update<\/strong><\/u>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" rel=\"noopener\" target=\"_blank\">Download<\/a> the archive with the new version of MySQL.\n<\/p>\n<p style=\"text-align: justify;\">\n\tCopy the <strong>c:\\Server\\bin\\mysql-9.0\\my.ini<\/strong> file to a safe location.\n<\/p>\n<p style=\"text-align: justify;\">\n\tStop and remove the MySQL service:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nnet stop mysql\r\nc:\\Server\\bin\\mysql-9.0\\bin\\mysqld --remove<\/pre>\n<p style=\"text-align: justify;\">\n\tDelete the <strong>C:\\Server\\bin\\mysql-9.0\\<\/strong> folder (this will not affect your sites and databases).\n<\/p>\n<p style=\"text-align: justify;\">\n\tUnzip the new archive to <strong>C:\\Server\\bin\\<\/strong>. Rename the folder to <strong>mysql-9.0<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tCopy the my.ini file you saved earlier to <strong>c:\\Server\\bin\\mysql-9.0\\my.ini<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tStart the MySQL service:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nC:\\Server\\bin\\mysql-9.0\\bin\\mysqld --install\r\nnet start mysql<\/pre>\n<p style=\"text-align: justify;\">\n\t<u><strong>phpMyAdmin update<\/strong><\/u>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/www.phpmyadmin.net\/\" rel=\"noopener\" target=\"_blank\">Download<\/a> the archive with the new version of phpMyAdmin.\n<\/p>\n<p style=\"text-align: justify;\">\n\tCopy the <strong>c:\\Server\\data\\htdocs\\phpMyAdmin\\config.inc.php<\/strong> file to a safe location.\n<\/p>\n<p style=\"text-align: justify;\">\n\tDelete the <strong>C:\\Server\\bin\\phpMyAdmin\\<\/strong> folder (this will not affect your sites and databases).\n<\/p>\n<p style=\"text-align: justify;\">\n\tUnzip the new archive to <strong>C:\\Server\\data\\htdocs\\<\/strong>. Rename the folder in <strong>phpMyAdmin<\/strong>.\n<\/p>\n<p style=\"text-align: justify;\">\n\tCopy the <strong>config.inc.php<\/strong> file you saved earlier to <strong>c:\\Server\\data\\htdocs\\phpMyAdmin\\config.inc.php<\/strong>.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"16\" name=\"16\"><\/a>16. How to protect the Apache web server from hacking in Windows<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tRecommended for you: <a href=\"https:\/\/miloserdov.org\/?p=2655\" rel=\"noopener\" target=\"_blank\">How to protect the Apache web server from hacking in Windows<\/a>.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"delete\" name=\"delete\"><\/a>How to uninstall the web server<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t<strong>If you no longer need a web-server installed with this guide<\/strong> or you want to install it again, follow the steps below to uninstall it.Stop the services and remove them from autostart by executing in the Windows Terminal:\n<\/p>\n<pre class=\"brush:bash;\" style=\"text-align: justify;\">\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k stop\r\nc:\\Server\\bin\\Apache24\\bin\\httpd.exe -k uninstall\r\nnet stop mysql\r\nc:\\Server\\bin\\mysql-9.0\\bin\\mysqld --remove<\/pre>\n<p style=\"text-align: justify;\">\n\t<span style=\"color:#FF0000;\"><strong>Attention: all the web-sites and their databases created on your local web-server will be deleted!<\/strong><\/span>\n<\/p>\n<p style=\"text-align: justify;\">\n\tDelete the server files by deleting the <strong>C:\\Server\\<\/strong> folder. Attention: this will remove all databases and your sites.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"mysql_native_password-is-not-loaded\" name=\"mysql_native_password-is-not-loaded\"><\/a>ERROR 1524 (HY000): Plugin &#39;mysql_native_password&#39; is not loaded<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tIf you have upgraded your DBMS from MySQL 8 to MySQL 9 and encountered the error\n<\/p>\n<pre class=\"brush:plain;\">\r\nERROR 1524 (HY000): Plugin &#39;mysql_native_password&#39; is not loaded<\/pre>\n<p style=\"text-align: justify;\">\n\tThen you can fix it using the following article: <a href=\"https:\/\/suay.site\/?p=4724\" target=\"_blank\" rel=\"noopener\">Error &lsquo;mysqli::real_connect(): (HY000\/1524): Plugin &lsquo;mysql_native_password&rsquo; is not loaded&rsquo; (SOLVED)<\/a><\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>The instructions have been checked and corrected to work with the latest components (Apache 2.4.62, PHP 8.3.11, MySQL 9.0.1, and phpMyAdmin 6.0). Table of contents 1. What is a web server for Windows 2. Download web server (Apache, MySQL, PHP and phpMyAdmin) for Windows 11 3. Create the structure of<a href=\"https:\/\/miloserdov.org\/?p=7703\" class=\"read-more\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":7705,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[21,23,684,22,24,20,16],"class_list":["post-7703","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-work-environment","tag-apache","tag-mysql","tag-mysqldump","tag-php","tag-phpmyadmin","tag-web-server","tag-windows"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/miloserdov.org\/index.php?rest_route=\/wp\/v2\/posts\/7703"}],"collection":[{"href":"https:\/\/miloserdov.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/miloserdov.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/miloserdov.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/miloserdov.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7703"}],"version-history":[{"count":23,"href":"https:\/\/miloserdov.org\/index.php?rest_route=\/wp\/v2\/posts\/7703\/revisions"}],"predecessor-version":[{"id":8071,"href":"https:\/\/miloserdov.org\/index.php?rest_route=\/wp\/v2\/posts\/7703\/revisions\/8071"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/miloserdov.org\/index.php?rest_route=\/wp\/v2\/media\/7705"}],"wp:attachment":[{"href":"https:\/\/miloserdov.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/miloserdov.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/miloserdov.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}