S
S
Senseich2017-10-03 16:42:38
PHP
Senseich, 2017-10-03 16:42:38

How to change php_value mbstring.func_overload value for specific site on local server?

Hello! I have already encountered this problem, but within the framework of one engine, the essence is as follows:
I install Bitrix on Open Server 1C, it gives me an error https://prnt.sc/gsqrgz
Previously, I just wrote in the .htaccess file, or in php.ini . But if you register in php.ini, then this rule applies to all sites, and some engines refuse to work and require it back . From here the question is, is it possible to somehow register for a separate site, for example, for a site on Bitrix , so that the default value remains for the rest? I have read a lot on the Internet, but I did not find such a clear answer. php_value mbstring.func_overload 2
php_value mbstring.func_overload 0.
php_value mbstring.func_overload 2

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Nikolaev, 2017-10-03
@Senseich

Colleagues advised you correctly, but I will tell you one more way:
1) Open the tray menu: Advanced -> Configuration -> Apache 2.* (I have 2.4) (select the item)
2) You will open an editor with something like this code:

#-----------------------------------------------#
# Начало блока конфигурации HTTP хоста
#-----------------------------------------------#

<VirtualHost *:%httpport%>

    DocumentRoot    "%hostdir%"
    ServerName      "%host%"
    ServerAlias     "%host%" %aliases%
    ScriptAlias     /cgi-bin/ "%hostdir%/cgi-bin/"

</VirtualHost>

My OpenServer is located on the E drive, so the path to the Bitrix folder is as follows: E:/OpenServer/OpenServer/domains/dev
Enter the magic piece of code:
<Directory "E:/OpenServer/OpenServer/domains/dev">
  AllowOverride All
  php_admin_value mbstring.func_overload 0
</Directory>

To get something like this:
#-----------------------------------------------#
# Начало блока конфигурации HTTP хоста
#-----------------------------------------------#

<VirtualHost *:%httpport%>

    DocumentRoot    "%hostdir%"
    ServerName      "%host%"
    ServerAlias     "%host%" %aliases%
    ScriptAlias     /cgi-bin/ "%hostdir%/cgi-bin/"
  
  <Directory "e:\openserver\openserver\domains\cli">
    AllowOverride All
    php_admin_value mbstring.func_overload 0
  </Directory>
  
  <Directory "E:/OpenServer/OpenServer/domains/dev">
    AllowOverride All
    php_admin_value mbstring.func_overload 0
  </Directory>

</VirtualHost>

Save the file
3) Reload OpenServer (yellow flag)

N
Nikita, 2017-10-03
@Rema1ns

in httd.conf

M
Maxim Kozhin, 2017-10-03
@maximkozhin

php.ini

[HOST=www.site.ru]
mbstring.func_overload=2

or
ini_set('mbstring.func_overload' , 2);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question