How to change the value of php_value mbstring.func_overload to a specific site on a local server?

Hello! I have already faced this problem, but in one engine, the essence of the following:
Install on Open Server 1C Bitrix, I have an error https://prnt.sc/gsqrgz
Before I was just prescribed php_value mbstring.func_overload 2 in the file .htaccess or in php.ini.
But if you set php.ini, then this rule will apply to all sites, and some engines refuse to work and demand back php_value mbstring.func_overload 0.
And .htaccess will not prescribe, since php 5.3, does not take all.
From here the question is for a specific site, for example for a site on Bitriks to prescribe php_value mbstring.func_overload 2that for the others remain the default? On the Internet a lot read, but a clear answer is not found.
June 14th 19 at 20:23
4 answers
June 14th 19 at 20:25
Solution
Right you colleagues have advised, but I will tell you another way:

1) Open the tray menu: Advanced -> Configuration -> Apache 2.* (I have 2.4) (select)
2) you will open the editor with something like this code:
#-----------------------------------------------#
# Start of configuration block HTTP host
#-----------------------------------------------#

<virtualhost *:%httpport%>

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

</virtualhost>

I have OpenServer is on the E drive, respectively, the path to the folder with the Bitrix turns out like this: E:/OpenServer/OpenServer/domains/dev

Enter the magical bit of code:
<directory "e: openserver domains dev">
 AllowOverride All
 php_admin_value mbstring.func_overload 0
</directory>

To make like this:
#-----------------------------------------------#
# Start of configuration block HTTP host
#-----------------------------------------------#

<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 domains dev">
 AllowOverride All
 php_admin_value mbstring.func_overload 0
</directory>

</virtualhost>

Save the file

3) Restart OpenServer (yellow flag)

Note: method works only in the web environment, in the console you will continue with the values from Your php.ini file
Thank you! But what is that part for?
<directory "e:\openserver\openserver\domains\cli">
 AllowOverride All
 php_admin_value mbstring.func_overload 0
 </directory>


And I understand this "piece" will be in all the blocks of hosts to be displayed? - antonina_Aufderhar87 commented on June 14th 19 at 20:28
this part, specifies that all hosts in the directory "e:\openserver\openserver\domains\cli" (where I is a site/folder for which you want to override) to allow to override settings and set the value of mbstring.func_overload to 0.
It is just a feature like running OpenServer.

PS If it helped - please check the solution below and others helped. - Roel.OConnell30 commented on June 14th 19 at 20:31
OK, you just two parts added, one slash in one direction, the other in another ) But originally wrote just one piece to add. What is their difference:
<directory "e:\openserver\openserver\domains\cli">
 AllowOverride All
 php_admin_value mbstring.func_overload 0
</directory>

 <directory "e: openserver domains dev">
 AllowOverride All
 php_admin_value mbstring.func_overload 0
 </directory>
- antonina_Aufderhar87 commented on June 14th 19 at 20:34
Ah... just the unix-way and windows-way the characters in the path tested. By the way, both options work :) - Roel.OConnell30 commented on June 14th 19 at 20:37
Hello, today is a waste and I emboss error Apache:
So I just ordered:
<virtualhost *:%httpbackport%>

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

 SetEnvIfNoCase X-Forwarded-Proto https HTTPS=on

<directory "c:\ospanel\domains\test2">
 AllowOverride All
 php_admin_value mbstring.func_overload 2
 php_admin_value mbstring.internal_encoding UTF-8
</directory>

</virtualhost>


And I when I visit the website, when you start on the page, to go there is a bug: prntscr.com/gt5g8n, but if removed .. then crashes - antonina_Aufderhar87 commented on June 14th 19 at 20:40
June 14th 19 at 20:27
in httd.conf
You can detail ) - antonina_Aufderhar87 commented on June 14th 19 at 20:30
in any case, there is a file with hosts in it for each website Directive

if you specify overload in it, it will only apply to a specific site, and not for all

You can also specify only the directory, using dirrektivu - Roel.OConnell30 commented on June 14th 19 at 20:33
The meaning of understand, but don't know what to prescribe. I had a crib before but now I do not know where to climb - antonina_Aufderhar87 commented on June 14th 19 at 20:36
locate the file httpd-vhosts.conf

it will be something like:

DocumentRoot "W:/html/test/www"
ServerName "test"
ServerAlias test "handle_url_tag('www.test', 'www.test')"

in host write php_admin_value mbstring.func_overload 0 - Roel.OConnell30 commented on June 14th 19 at 20:39
I found this here, is prescribed, but during the installation it removes this line
# Start of configuration block HTTP host
#-----------------------------------------------#

<virtualhost *:8080>

DocumentRoot "c:/ospanel/domains/testsite.ru"
ServerName "testsite.ru"
ServerAlias "testsite.ru" 
ScriptAlias /cgi-bin/ "c:/ospanel/domains/testsite.ru/cgi-bin/"

SetEnvIfNoCase X-Forwarded-Proto https HTTPS=on
<b>php_admin_value mbstring.func_overload 2</b>
</virtualhost>
- antonina_Aufderhar87 commented on June 14th 19 at 20:42
and you have the extra tag, what is a toaster set up?) - antonina_Aufderhar87 commented on June 14th 19 at 20:45
Yeah, I just wanted to make fat. to highlight the line ) - Bell_Anders commented on June 14th 19 at 20:48
The local apparently these tricks are not rolled, there is a blank template for each host and when you upgrade it resets and leads to the kind of pattern, so the stitching disappears. This variant is suggested, but also why it does not work, maybe you need a different local host to write?
[HOST=testsite.ru]
mbstring.func_overload = 2
- antonina_Aufderhar87 commented on June 14th 19 at 20:51
June 14th 19 at 20:29
php.ini
[HOST=www.site.ru]
mbstring.func_overload=2


either
ini_set('mbstring.func_overload' , 2);
[HOST=www.site.ru]
mbstring.func_overload=2
Such a solution met, but do not know how the local server is to register, I have for example to Open Server catalog website testsite.ru I ordered in php.ini [HOST=testsite.ru] mbstring.func_overload=2 , but not working, can locally prescribed differently?
ini_set('mbstring.func_overload' , 2);
And this line, too in php.ini? I believe it is also for all sites will set the parameter? - antonina_Aufderhar87 commented on June 14th 19 at 20:32
,
On OpenServer some specific php.ini
I think there is two of them. Use one that using the tray icon to open mono.

The second option is to write in the code somewhere in the beginning of the input index'a - Roel.OConnell30 commented on June 14th 19 at 20:35
,
Use one that using the tray icon to open mono.
Through him, and opened prntscr.com/gsrk2g, do not want prntscr.com/gsrkwf - antonina_Aufderhar87 commented on June 14th 19 at 20:38
,
Well then try the second method. - Roel.OConnell30 commented on June 14th 19 at 20:41
It is not clear where the second method is to prescribe that the input index, I just set the engine - antonina_Aufderhar87 commented on June 14th 19 at 20:44
,
index.php in the case of Bitrix it may be entry.php - antonina_Aufderhar87 commented on June 14th 19 at 20:47
I'm the only index found in the installation files has prescribed doesn't help, either. Maybe not so local to do it, though it's weird - Bell_Anders commented on June 14th 19 at 20:50
damn, the input script index file of the website, as it still to name? - antonina_Aufderhar87 commented on June 14th 19 at 20:53
Thanks, the solution was found, above, Andrew wrote - Bell_Anders commented on June 14th 19 at 20:56
June 14th 19 at 20:31
Does not work none of the above answers.
OS 5.2.2
In the Apache configuration

<directory "%sprogdir% domains wassit ">
 AllowOverride All
 php_admin_value mbstring.func_overload 2
 php_admin_value mbstring.internal_encoding utf-8
</directory>
- antonina_Aufderhar87 commented on June 14th 19 at 20:34

Find more questions by tags PHP1C-Bitrix