I acted according to the video on Install PHP, Apache and MySQL. One of the differences is that I had a slightly different hierarchy of folders and files. My hierarchy is as follows: root is C: \ Apache24; subfolders and files - php, mysql-8.0, C: \ Apache24 \ htdocs \ bitrixsetup.php.

  1. I downloaded Apache 2.4 binaries VC11 under my system using the link Download Apache. I have a 64 bit OS, so you need a file with a name like httpd-2.4.xx-win64-VC11.zip
  2. Unzip the contents of the Apache24 folder from the downloaded archive to C:\Apache24\apache. Note that in D: \ Apache24 you need to put not the Apache24 folder from the archive, but its contents. Installing nothing is required.
  3. In the file C:\Apache24\conf\httpd.conf we change the value of ServerRoot to "C:/Apache24/" (line 37-39) and the value DocumentRoot (and Directory, lines 251-252) to "C:/Apache24/htdocs" (lines 242 and 243). You should also remove the comment from line 227 and change it to: ServerName localhost: 80
  4. Then I change the log storage settings in the same file (find the parameters and change):

         ErrorLog "C: /Apache24/log/apache-error.log"
         CustomLog "C: /Apache24/log/apache-access.log" common

    Install the Apache service (on behalf of the Administrator). Open the command line on behalf of the Administrator and insert the following line there:      C:\Apache24\bin\httpd.exe -k install

     Next, I configure php as indicated by DenisBondar. File C:\Windows\System32\Users\drivers\etc\hosts (I'm new to the forum, so I couldn’t select the code using one of the three apostrophes, or rather, the code was highlighted, and the triple of apostrophes remained before and after the code what should be the formatting of the text send to mail vladdvin861@gmail.com) has the form

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP / IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# rhino.acme.com # source server
# x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# localhost
# :: 1 localhost lmlicenses.wip4.adobe.com lm.licenses.adobe.com127.0.0.1 activate.adobe.com practivate.adobe.com na1r.services.adobe.com hlrcv.stage.adobe.com shop.local test test.ru www.test.ru secondtest secondtest.ru www.secondtest.ru 1c-bitrix 1c-bitrix.ru www.1c-bitrix.ru www.1c-bitrix.ru:80 www.1c-bitrix.ru:443 ssl: //www.1c-bitrix.ru ssl: //www.1c-bitrix.ru: 443 ssl: //www.1c-bitrix.ru: 80

Then I install MySQL Blog as indicated on the same site. The file C:\Apache24\mysql-8.0\my.ini has the form





max_allowed_packet= 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
myisam_sort_buffer_size = 8M
read_buffer_size = 256K
read_rnd_buffer_size = 512K

Then I open the page http://localhost/bitrixsetup.php and see the page

enter image description here enter image description here

And getting an error

Warning: fsockopen(): unable to connect to ssl://www.1c-bitrix.ru:443 (��������� �� �����������, �.�. ������ ������� ������ ������ �� ���������. ) in C:\Apache24\htdocs\bitrixsetup.php on line 784

Part of the file C:/Apache24/htdocs/bitrixsetup.php (taken from https://www.1c-bitrix.by/download/cms.php) is given below


        // SetCurrentStatus (LoaderGetMessage ("LOADER_LOAD_QUERY_SERVER"));
                    //      SetCurrentStatus(str_replace("#DISTR#", $strRealUrl, LoaderGetMessage("LOADER_LOAD_QUERY_DISTR")));

                    $lasturl = $strRealUrl;
                    $redirection = "";

                    $parsedurl = parse_url($strRealUrl);
                    $useproxy = (($proxyAddr != "") && ($proxyPort != ""));

                    if (!$useproxy)
                        $host = $parsedurl["host"];
                        $port = $parsedurl["port"];
                        $hostname = $host;
                        $host = $proxyAddr;
                        $port = $proxyPort;
                        $hostname = $parsedurl["host"];

            $port = $port ? $port : ($ssl ? 443 : 80);

            //      SetCurrentStatus(str_replace("#HOST#", $host, LoaderGetMessage("LOADER_LOAD_CONN2HOST")));
            $sockethandle = fsockopen(($ssl ? 'ssl://' : '').$host, $port, $error_id, $error_msg, 30);
            //$err=iconv(iconv_get_encoding(, "UTF-8", $error_msg);
            //echo mb_detect_encoding($error_msg);
            //echo error_reporting(E_WARNING);

            //echo iconv(mb_detect_encoding($error_msg), mb_detect_encoding(error_reporting(E_WARNING)), $error_msg);
            //$errr=substr(error_get_last()['message'], 0, strlen(error_get_last()['message']) - strlen($error_msg) - 2 - strlen(' in C:\Apache24\htdocs\bitrixsetup.php on line 788'));
            $e1=substr(error_get_last()['message'], 0, 60);
            echo '<br>';
            echo $e1;
            echo mb_detect_encoding($e1);
            echo '</br>';
            echo '<br>';
            echo $error_msg;
            echo mb_detect_encoding($error_msg);
            echo '</br>';
            echo '<br>';
            echo 'Кодировка предупреждений - ';
            echo mb_detect_encoding(error_reporting(E_WARNING));
            echo '</br>';
            //echo mb_detect_encoding($error_msg);
            echo '<br>';
            echo 'Кодировка последней ошибки - ';
            echo mb_detect_encoding(error_get_last()['message']);
            echo '</br>';
            echo '<br>';
            echo 'Кодировка последней ошибки - ';
            //echo error_reporting(E_WARNING).<br />;
            echo mb_detect_encoding($error_msg);
            echo '</br>';
            echo mb_convert_encoding($error_msg, 'KOI8-R', 'utf-8');
            echo iconv('utf-8', 'ascii', $error_msg);
            //echo htmlspecialchars_decode(utf8_decode(htmlentities($error_msg, ENT_COMPAT, 'ASCII', false)));
            echo htmlspecialchars_decode(utf8_encode(htmlentities($error_msg, ENT_COMPAT, 'UTF-8', false)));
            echo htmlspecialchars_decode(htmlentities($error_msg, ENT_COMPAT, 'UTF-8', false));
            //echo error_reporting(E_WARNING)[1];
            if (!$sockethandle)
                //          SetCurrentStatus(str_replace("#HOST#", $host, LoaderGetMessage("LOADER_LOAD_NO_CONN2HOST"))." [".$error_id."] ".$error_msg);
                return false;
                if (!$parsedurl["path"])
                    $parsedurl["path"] = "/";

                //          SetCurrentStatus(LoaderGetMessage("LOADER_LOAD_QUERY_FILE"));
                $request = "";
                if (!$useproxy)
                    $request .= "HEAD ".$parsedurl["path"].($parsedurl["query"] ? '?'.$parsedurl["query"] : '')." HTTP/1.0\r\n";
                    $request .= "Host: $hostname\r\n";
                    $request .= "HEAD ".$strRealUrl." HTTP/1.0\r\n";
                    $request .= "Host: $hostname\r\n";
                    if ($proxyUserName)
                        $request .= "Proxy-Authorization: Basic ".base64_encode($proxyUserName.":".$proxyPassword)."\r\n";

                if ($strUserAgent != "")
                    $request .= "User-Agent: $strUserAgent\r\n";

                $request .= "\r\n";

                fwrite($sockethandle, $request);

                $result = "";
                //          SetCurrentStatus(LoaderGetMessage("LOADER_LOAD_WAIT"));

                $replyheader = "";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.