vercel-community / php

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

Unable to load dynamic library 'mongodb' and 'swoole' when deploying #517

Closed trikibilel closed 7 months ago

trikibilel commented 7 months ago

When i deploy my laravel project (that was working fine) i get 2 warnings and my website just throws a 500 exception because mongodbClient could not find the mongodb extention

the warnings i get on vercel deployment `####Warning: PHP Startup: Unable to load dynamic library 'mongodb' (tried: /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb (/vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb: cannot open shared object file: No such file or directory), /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb.so (libutf8proc.so.1: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'swoole' (tried: /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole (/vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole: cannot open shared object file: No such file or directory), /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole.so (libodbc.so.2: cannot open shared object file: No such file or directory)) in Unknown on line 0`

Everything was working fine 2 months ago The extention version of mongodb should be : ext-mongodb: ^1.15

Ps: also this happened to me with 0.6.0 version

Is there a solution for this problem please?

f3l1x commented 7 months ago

Hi @trikibilel, I need to take a look at shared libraries. Thank you for your report.

guoxiangke commented 7 months ago

same error:

image
f3l1x commented 7 months ago

Hi @guoxiangke, can you please redeploy your app? I've fixed it in https://github.com/juicyfx/libphp/

f3l1x commented 7 months ago

Hello Bilel,

it should be fixed, can you please try it again?

Felix

On Mon, Feb 19, 2024 at 9:05 PM Bilel Triki @.***> wrote:

hi @f3l1x https://github.com/f3l1x I hope you're doing well. I'm reaching out to check if there have been any updates or insights regarding the missing MongoDB extension issue during deployment on Vercel. I understand that you may be busy, but I was wondering if there have been any advancements or if there's any additional information that would help in resolving this issue. Thank you for your time and support!

— Reply to this email directly, view it on GitHub https://github.com/vercel-community/php/issues/517#issuecomment-1953096074, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEDLSRYM5APEP3FSGLKZQLYUOWAPAVCNFSM6AAAAABDGHU7HGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJTGA4TMMBXGQ . You are receiving this because you were mentioned.Message ID: @.***>

--

Milan Felix Šulc

trikibilel commented 7 months ago

Thank you so much @f3l1x , i just redeployed and it works perfectly without problem Thanks!