Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit f7b7db0

Browse files
author
Ben Smith
authored
Merge pull request #7 from kukielp/master
Update README.md
2 parents 919a55f + 6fcc661 commit f7b7db0

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

‎README.md‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Follow the instructions below to create Lambda layers to hold your PHP custom ru
1717
### Compiling PHP ###
1818
:information_source: PHP 7.3.0 has been used for this example.
1919

20-
To create a custom runtime, you must first compile the required version of PHP in an Amazon Linux environment compatible with the [Lambda execution environment](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html).
20+
To create a custom runtime, you must first compile the required version of PHP in an Amazon Linux environment compatible with the [Lambda execution environment](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html).
21+
22+
An easy way to accomplish this is using Cloud9 on Amazon linux.
2123

2224
Compile PHP by running the following commands:
2325

@@ -34,13 +36,13 @@ cd openssl-1.0.1k
3436
cd ~
3537

3638
# Download the PHP 7.3.0 source
37-
mkdir ~/php-7-bin
39+
mkdir -p ~/environment/php-7-bin
3840
curl -sL https://github.com/php/php-src/archive/php-7.3.0.tar.gz | tar -xvz
3941
cd php-src-php-7.3.0
4042

4143
# Compile PHP 7.3.0 with OpenSSL 1.0.1 support, and install to /home/ec2-user/php-7-bin
4244
./buildconf --force
43-
./configure --prefix=/home/ec2-user/php-7-bin/ --with-openssl=/usr/local/ssl --with-curl --with-zlib
45+
./configure --prefix=/home/ec2-user/environment/php-7-bin/ --with-openssl=/usr/local/ssl --with-curl --with-zlib
4446
make install
4547
```
4648

@@ -56,6 +58,13 @@ make install
5658
| | +-- php*
5759
</pre>
5860

61+
```
62+
cd /home/ec2-user/environment/php-7-bin
63+
wget https://raw.githubusercontent.com/aws-samples/php-examples-for-aws-lambda/master/bootstrap
64+
# make executable
65+
chmod +x bootstrap
66+
```
67+
5968
2. Package the PHP binary and bootstrap file together into a file named `runtime.zip`:
6069

6170
```bash
@@ -103,7 +112,6 @@ aws lambda publish-layer-version \
103112

104113

105114

106-
107115
## Resources
108116
### AWS Blog posts & documentation
109117
* https://aws.amazon.com/blogs/compute/introducing-the-new-serverless-lamp-stack/

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /