araines / serverless-php

PHP for AWS Lambda via Serverless Framework
MIT License
150 stars 22 forks source link

OPENSSL_1.0.2 not found #1

Closed evfurman closed 6 years ago

evfurman commented 7 years ago

Getting an error when running the compiled executable for php:

2017-10-30T21:58:44.187Z 0a6e712e-c0a9-1b29-37a5-02f7da74f5fb stderr: ./php: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by ./php)

Have you encountered this before? We are pretty confident this was working a few weeks ago and now all the sudden hitting this wall.

sanchitbh commented 7 years ago

Getting same error.. They must have changed the AMI?

evfurman commented 7 years ago

Pretty confident this is a packaging issue upstream in AmazonLinux. I guess we wait until the 2017.12 release. :/

sanddevil commented 7 years ago

Also getting the same problem. How do we proceed?

sanddevil commented 7 years ago

Ok I simply took the OpenSSL dependency out of the PHP build script and recompiled it. Works fine for my use case.

sanchitbh commented 7 years ago

Yeah, but without it a lot of functionality is gone :( Even curl isn't working correctly now..

evfurman commented 7 years ago

Agreed, something needs to be fixed upstream but not sure who we need to reach out to. Talking to AWS Support got me nowhere.

sanchitbh commented 7 years ago

hi guys (@evfurman and @sanddevil and @araines),

i just created my own project for running php on AWS lambda and since you guys know about AWS and PHP i was hoping to get some feedback from you

the project is called lambdaphp and it's hosted here: https://www.lambdaphp.host (github link on this page)

Maybe you can try it and let me know what you think.

Thanks, San

araines commented 7 years ago

Apologies for not getting back to you guys sooner. I've not seen the OpenSSL issue, but equally I've not had to rebuild anything recently either.

I'll see if I can find some time to reproduce and diagnose this issue, but if it is upstream as you guys suggest then we might be a little stuck. :(

bmoffatt commented 7 years ago

Lambda's execution environment is still based on AmazonLinux 2017.03. The Dockerfile is pulling the latest development headers for openssl-1.0.2 from AmazonLinux 2017.09. Locking the version down to 2017.03 for the php build can be done as a workaround, like this: https://github.com/bmoffatt/serverless-php/commit/70186fb7b281c5cddc91b0cc38712486c5290e9c

araines commented 7 years ago

@bmoffatt amazing, thanks for debugging this and getting a workaround. Would you like to raise a PR and I'll accept these changes back? Otherwise I'll make the same changes myself when I next get a bit of time!

bmoffatt commented 6 years ago

created #4