D
D
Dmitry Chilikin2016-02-04 09:30:29
PHP
Dmitry Chilikin, 2016-02-04 09:30:29

How to set mbstring.func_overload=0 for a single site directory?

Site on 1C-Bitrix, works in UTF-8 encoding. In httpd.conf for Apache, the virtual server configuration is set with the mbstring.func_overload=2 parameter via php_admin_value. As you know, now you can't change the mbstring.func_overload parameter in .htaccess. The site uses the FPDF library to generate pdf files, which requires setting the overload value to 0. I have been working with this library for a long time and all scripts are focused on it.
How could you specify a different overload value for a single site directory? or maybe specify another php.ini config file in .htaccess?
I read a lot of forums on this topic, but I did not find an intelligible solution anywhere. And in addition: I have a proxying nginx + apache bundle. vds server. OS Ubuntu server 15. PHP version 5.5.9-1ubuntu4.14.
Please advise how to proceed. I don't want to change the library

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Dmitry Chilikin, 2016-02-04
@peacock

Heh ....
I rummaged through Google and still found solutions and an answer to my own question: add the following lines to the Apache config:

<Directory /var/www/path/to/dir>
php_admin_value mbstring.func_overload 0
</Directory>

Earned. Thank you, the issue can be closed.

B
badin, 2017-04-17
@badin

You can set mbstring.func_overload=0 in the global php config, and for the site in the Apache config (if not nginx) set php_admin_value mbstring.func_overload 2 and in your application execute the code for which you need to set mbstring.func_overload=0 from under php using the function exec();
This is how we did the assembly of one pdf file from several pdf files on Bitrix using the mPDF library, which in turn uses FPDF.

X
xmoonlight, 2016-02-04
@xmoonlight

They say you can change it in .htaccess (I haven't tested):
www.opengs.ru/webzametki/cms-1s-bitriks/mbstringfu...

php_value mbstring.func_overload 2
php_value mbstring.internal_encoding UTF-8

A
Alexander Filippenko, 2016-03-01
@alexfilus

In general, starting with PHP 5.3, it is really impossible to change mbstring.func_overload in .htaccess. But for some reason it works on TimeWeb hosting. How they did it is a mystery.

A
Alexander Karpov, 2018-02-20
@Inkognitoss

You can use
php_admin_value mbstring.func_overload 0
or
php_admin_value mbstring.func_overload 2
respectively
but in VirtualHost directive (preferably before directory settings)
in htaccess from some version should not work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question