0

I have a Laravel 4.2 App running on Google App Engine (Standard Env) and every minute or so I get a 500 returned with the following error logged. The requests are small objects being returned from the DB.

Any ideas why it would be so sporadic? There's nothing, that I can see, that points the error to a specific method/route. I'm a new GAE user, and any help is greatly appreciated. Thank you!

PHP Warning: PHP Startup: Unable to load dynamic library '/base/alloc/tmpfs/dynamic_runtimes/php55_dynamic/230a19aa4cd01ca1/modules/mcrypt.so' - /base/alloc/tmpfs/dynamic_runtimes/php55_dynamic/230a19aa4cd01ca1/modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0

PHP.INI:

google_app_engine.enable_functions = "php_sapi_name, php_uname, getmypid, set_time_limit"

output_buffering = on

allow_url_include=1

extension = "mcrypt.so"

extension = "curl.so"

allow_url_fopen = On
komarkovich
  • 2,223
  • 10
  • 20
btaylor507
  • 211
  • 1
  • 13
  • What version of PHP are you using? `mycrypt` was deprecated in PHP 7.2 (and is actively discouraged starting in PHP 7.0). Check out libsodium for your PHP encryption needs: http://php.net/manual/en/book.sodium.php – Mr Glass Jul 05 '18 at 18:12
  • I'm using runtime: php55 (app.yaml) - They don't support 7 in the standard env. https://cloud.google.com/appengine/docs/standard/php/ – btaylor507 Jul 05 '18 at 18:18
  • I get the same error occasionally in my local env (dev_appserver.py) as well. (PHP Warning: PHP Startup: Unable to load dynamic library '/Users/billtaylor/google-cloud-sdk/platform/php55/mcrypt.so') – btaylor507 Jul 05 '18 at 18:19

1 Answers1

1

If you look in the official documentation you can see that mcrypt is pre-installed and enabled on the system. So you don't have to include the extension = "mcrypt.so" in your php.ini and simply removing it should do the work.

Please take a look also at Stack Overflow thread Can't Enable PHP Extensions on php.ini on App Engine for Laravel.

komarkovich
  • 2,223
  • 10
  • 20
  • Thank you so much. It looks like I only need to declare that extension in my local dev_appserver, and remove it for production. Cheers!! – btaylor507 Jul 06 '18 at 14:06