0

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:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# :: 1 localhost
127.0.0.1 lmlicenses.wip4.adobe.com

127.0.0.1 lm.licenses.adobe.com127.0.0.1 activate.adobe.com
127.0.0.1 practivate.adobe.com
127.0.0.1 na1r.services.adobe.com
127.0.0.1 hlrcv.stage.adobe.com
127.0.0.1 shop.local
127.0.0.1 test
127.0.0.1 test.ru
127.0.0.1 www.test.ru
127.0.0.1 secondtest
127.0.0.1 secondtest.ru
127.0.0.1 www.secondtest.ru
127.0.0.1 1c-bitrix
127.0.0.1 1c-bitrix.ru
127.0.0.1 www.1c-bitrix.ru
127.0.0.1 www.1c-bitrix.ru:80
127.0.0.1 www.1c-bitrix.ru:443
127.0.0.1 ssl: //www.1c-bitrix.ru
127.0.0.1 ssl: //www.1c-bitrix.ru: 443
127.0.0.1 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

[client]

port=3306


[mysqld]

port=3306

basedir="C:\\Apache24\\data"
datadir="C:\\Apache24\\data\\db"
#character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
explicit_defaults_for_timestamp=TRUE
skip-external-locking
key_buffer_size=16M
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
default_authentication_plugin=mysql_native_password

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

        

// END: WE INITIALIZE IF WE CONTINUE DOWNLOAD
        
        // SetCurrentStatus (LoaderGetMessage ("LOADER_LOAD_QUERY_SERVER"));
        
        // LOOKING FOR A FILE AND REQUEST INFORMATION
        do
                {
                    //      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;
                    }
                    else
                    {
                        $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);
            //debug_backtrace();
            print_r(error_get_last());
            //print_r(debug_backtrace());
            //$err=iconv(iconv_get_encoding(, "UTF-8", $error_msg);
            //echo mb_detect_encoding($error_msg);
            //echo error_reporting(E_WARNING);
            //echo(mb_detect_encoding(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;
            }
            else
            {
                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";
                }
                else
                {
                    $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.