Cannot enable PHP extensions on php.ini in App Engine for Laravel

I am trying to include some php extensions needed by Laravel. The documentation for the file php.ini( https://cloud.google.com/appengine/docs/php/config/php_ini ) tells you to put the php.ini file in the root of the application.

This is what mine looks like php.ini:

extension=openssl.so
extension=pdo.so
extension=tokenizer.so
extension=mbstring.so
google_app_engine.enable_functions = "php_sapi_name, php_uname"

When I deploy it, my journal says:

PHP Warning:  PHP Startup: Unable to load dynamic library '/base/php_runtime/modules/openssl.so' - /base/php_runtime/modules/openssl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/base/php_runtime/modules/pdo.so' - /base/php_runtime/modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/base/php_runtime/modules/tokenizer.so' - /base/php_runtime/modules/tokenizer.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/base/php_runtime/modules/mbstring.so' - /base/php_runtime/modules/mbstring.so: cannot open shared object file: No such file or directory in Unknown on line 0

I tried changing the way formatting extensions in php.ini:

extension="openssl.so"
extension="openssl.dll"
extension="php_openssl.so"
extension="php_openssl.dll"

I tried it with quotes and without them. With spaces between them, without them. I'm not sure what else to try.

+4
source share
1 answer

.

App Engine php.ini .

, , extension=* php.ini . php.ini, , .

, php.ini: php.ini.local php.ini.dev.

php.ini.local:

extension=mbstring.so
extension=pdo.so
extension=openssl.so
extension=tokenizer.so
google_app_engine.enable_functions = "php_sapi_name, php_uname"

php.ini.dev:

google_app_engine.enable_functions = "php_sapi_name, php_uname"

Makefile, php.ini dev, , .

Makefile:

deploy:
    cp php.ini.dev php.ini
    # Code used to deploy
serve:
    cp php.ini.local php.ini
    # Code used to serve locally
+1

Source: https://habr.com/ru/post/1615056/


All Articles