vercel-community / php

🐘 PHP Runtime for ▲ Vercel Serverless Functions (support 7.4-8.3)
https://php.vercel.app
MIT License
1.24k stars 286 forks source link

vercel-php@0.6.0: php: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory #504

Open bohdan-coderiver opened 10 months ago

bohdan-coderiver commented 10 months ago

When I run the 'vercel build' command, I received an error like the one in the screenshot below. Could someone please explain why is that? Meanwhile vercel and vercel --prod work without any issues.

image

vercel.json { "version": 2, "functions": { "api/index.php": { "runtime": "vercel-php@0.6.0" } }, "routes": [ { "src": "/build/(.*)", "dest": "/public/build/" }, { "src": "/resources/(.*)", "dest": "/public/resources/" }, { "src": "/assets/(.*)", "dest": "/public/assets/" }, { "src": "/favicon/(.*)", "dest": "/public/favicon/" }, { "src": "/(.*)", "dest": "/api/index.php" } ], "env": { "APP_NAME": "personalBlog", "APP_ENV": "production", "APP_DEBUG": "true", "APP_CONFIG_CACHE": "/tmp/config.php", "APP_EVENTS_CACHE": "/tmp/events.php", "APP_PACKAGES_CACHE": "/tmp/packages.php", "APP_ROUTES_CACHE": "/tmp/routes.php", "APP_SERVICES_CACHE": "/tmp/services.php", "CACHE_DRIVER": "array", "LOG_CHANNEL": "stderr", "SESSION_DRIVER": "cookie", "VIEW_COMPILED_PATH": "/tmp/views", "SSR_TEMP_PATH": "/tmp/ssr", "NODE_PATH": "node" }, }

f3l1x commented 10 months ago

Hi, I have to update libssl somehow.

f3l1x commented 8 months ago

Hi, can you try latest build?

hohin728 commented 6 months ago

I'm having the same issue because default node version is set to 20. It works after changed to 18.

LuisFernandoLG commented 5 months ago

I'm having the same issue because default node version is set to 20. It works after changed to 18.

How did you do that?

LuisFernandoLG commented 5 months ago

I'm having the same issue because default node version is set to 20. It works after changed to 18.

How did you do that?

Never mind, I found it.

Go to your dashboard on vercel

Project > Settings > General > Node.js Version Change from 20.x to 18.x

image

qkqpttgf commented 5 months ago

I'm having the same issue because default node version is set to 20. It works after changed to 18.

How did you do that?

Never mind, I found it.

Go to your dashboard on vercel

Project > Settings > General > Node.js Version Change from 20.x to 18.x

image

It works!

f3l1x commented 5 months ago

New version 0.7.1 released.

edjw commented 4 months ago

You can also do this in your package.json

    "engines": {
        "node": "18.x"
    },

I have to set the node version to v18 this even with using version 0.7.1 for my runtime by the way

      "functions": {
        "api/index.php": {
            "runtime": "vercel-php@0.7.1"
        }
    },
appsaeed commented 4 months ago

Yes! It also works for me by changing node version 20.x to 18.x from project setting

MMPgenave commented 2 months ago

I'm having the same issue because default node version is set to 20. It works after changed to 18.

How did you do that?

Never mind, I found it.

Go to your dashboard on vercel

Project > Settings > General > Node.js Version Change from 20.x to 18.x

image

Thank you. It works for me also.

aungmyomyat220 commented 4 weeks ago

Thanks a lot

fadhilrachman commented 1 week ago

Thnk bro, its worked

theaungmyatmoe commented 1 week ago

This worked! Great!