Answer the question
In order to leave comments, you need to log in
Bitrix and Google Calendar integration?
Good afternoon!
I'm trying to integrate Google Calendar via PHP API: https://developers.google.com/calendar/quickstart/php
with Bitrix project (CentOS 7 installed, Bitrix Web Environment, composer configured) Trying
to initialize PHP example https:// github.com/gsuitedevs/php-samples/blob/mas...
via console: php quickstart.php
following error occurs:
PHP Fatal error: Uncaught UnexpectedValueException: Overloading of string functions using mbstring.func_overload is not supported by phpseclib. in /home/bitrix/www/local/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php:11
Stack trace:
#0 /home/bitrix/www/local/vendor/composer/autoload_real.php(66): require()
#1 /home/bitrix/www/local/vendor/composer/autoload_real.php(56): composerRequire42b6e0827500b0c2ab7479c76cf79675('decc78cc4436b12...', '/home/bitrix/ww...')
#2 /home/bitrix/www/local/vendor/autoload.php(7): ComposerAutoloaderInit42b6e0827500b0c2ab7479c76cf79675::getLoader()
#3 /home/bitrix/www/local/quickstart.php(2): require('/home/bitrix/ww...')
#4 {main}
thrown in /home/bitrix/www/local/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php on line 11
<Directory /home/bitrix/www/local>
php_admin_value mbstring.func_overload 0
php_value default_charset utf8
</Directory>
Local Value: 0
Master Value: 2
Answer the question
In order to leave comments, you need to log in
Perhaps the exception is not simple there, but if there is confidence that the package will work fine without it, then this exception should be removed. As an option to fork both repositories, in Google change composer.json to your phpseclib fork, in which to remove the exception
In your script, this phpseclib library gives an error.
If you do not need to access the Google Calendar api very often, you can use this crutch:
- Create a section in the public part of the site. for example ./func_overload_0
- In the server settings, set exactly for it mbstring.func_overload 0
- place a call to methods for working with the Google Calendar API in index.php of this section.
- In your methods, access this code via curl or Main\Web\HttpClient()
mbstring.func_overload 0 for some directory will work if this directory is the entry point. Therefore, using such a crutch, you can make libraries like this work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question