A
A
Andrey Eskov2017-07-12 23:39:50
PHP
Andrey Eskov, 2017-07-12 23:39:50

How to solve the riddle with mbstring.func_overload?

Good evening dear ones. I have been trying to convert html to pdf for a day now. I settled on the mpdf library
But it’s bad luck for it to work, you need mbstring.func_overload 0 and for bitrix mbstring.func_overload 2
It costs bitrix env
I read a bunch of forums advised to do so
in etc/httpd/conf/httpd.conf finally add this

<Directory /home/bitrix/www/local/class/>
  php_admin_value mbstring.func_overload 0
</Directory>

Did not work, even tried like this
<Files "HelperClass.php">
    php_admin_value mbstring.func_overload 0
</Files>

<Files "/home/bitrix/www/local/class/HelperClass.php">
    php_admin_value mbstring.func_overload 0
</Files>

Still not how. maybe I don't understand something? In general, in my /home/bitrix/www/local/class/ folder there is a file with a helper that accesses mPDF and the library itself is in the same folder.
In theory it should work, but it doesn't. I restart the server and nothing.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazar Mokrinsky, 2017-07-13
@nazarpc

You can sympathize. mbstring.func_overloadthis is the wildest crutch that no sane developer in their right mind should use. Moreover, this thing has already been deprecated in 7.2 and will be pulled out of PHP in the future.
If there is no newer version of your Bitrix that does not require this feature, then I would recommend creating a separate microservice with different PHP settings, for example, in a Docker container, and transfer data there for conversion to pdf.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question