Zeit PHP

I have a small PHP project deployed on Zeit that gave me a 502 error after I recently updated it:

502: BAD_GATEWAY 
Code: NO_STATUS_CODE_FROM_FUNCTION

In the logs, I found this error:

./php-fpm: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

After searching searching the internet for more than a few minutes, I discovered that Zeit changed their PHP builder. In order for older PHP applications to work, the now.json file needs to be updated to use now-php instead of @now/php

As an example, here’s what my now.json looks like now:

{
  "version": 2,
  "alias": "DOMAIN.com",
  "builds": [
    {
      "src": "*.php",
      "use": "now-php"
    }
  ]
}

I discovered the issue on this Github comment:

https://github.com/zeit/now-builders/issues/743#issuecomment-517848979

One thought on “Zeit PHP”

Leave a Reply

Your email address will not be published. Required fields are marked *