aiir / php-lambda-layer Goto Github PK
View Code? Open in Web Editor NEWPHP runtime layer for AWS Lambda, allowing PHP scripts to be executed in an environment as close to a standard web server as possible
License: Other
PHP runtime layer for AWS Lambda, allowing PHP scripts to be executed in an environment as close to a standard web server as possible
License: Other
Setting up the layer on a Lambda function requested through ALB seems to only return the first header set within the PHP logic.
<?php
$host = '.' . str_replace('www.', '', $_SERVER['HTTP_HOST']);
setcookie('basketId', '123', time() + 2592000, '/', $host, false, false);
setcookie('basketKey', '456', time() + 2592000, '/', $host, false, false);
echo 'Hello';
Returns:
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 5
Content-Type: text/html; charset=UTF-8
Date: Thu, 05 May 2022 11:52:43 GMT
Server: awselb/2.0
Set-Cookie: basketId=123; expires=Sat, 04-Jun-2022 11:52:43 GMT; Max-Age=2592000; path=/; domain=.phptestalb-807238318.eu-west-2.elb.amazonaws.com
Hello
I've tried on ec2 with docker, both amzn linux 1 and 2, I always get the same issue on the step from make where it tries to yum install yum-utils:
Requires: glibc-common = 2.17-196.172.amzn1
Installed: glibc-common-2.17-260.175.amzn1.x86_64 (@amzn-updates/latest)
glibc-common = 2.17-260.175.amzn1
Available: glibc-common-2.17-157.169.amzn1.x86_64 (amzn-main)
glibc-common = 2.17-157.169.amzn1
Available: glibc-common-2.17-157.170.amzn1.x86_64 (amzn-updates)
glibc-common = 2.17-157.170.amzn1
Available: glibc-common-2.17-196.172.amzn1.x86_64 (amzn-updates)
glibc-common = 2.17-196.172.amzn1```
It might be an issue with x64 vs i686, but my real question is, how do you guys make it work? I'm trying on EC2 and i can't resolve these dependencies
After many hours of operation, we've noticed the memory usage of the Lambda function gradually creep up.
Presumably related to the way we spawn the PHP process inside the bootstrap, requires further investigation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.