Skip to content

Commit 42a7d10

Browse files
committed
Update and improve extension documentation
1 parent ff5e771 commit 42a7d10

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ $ php -S localhost:8000 '<handler>'
2222
The Lambda Function Handler property specifies the location of the the script executed in response to an incoming API Gateway request.
2323

2424
##### Extensions
25-
Extensions can be built using the lambci/lambda:build-nodejs8.10 Docker image. It is recommended that extensions be built into a Lambda Layer in /lib/php/7.1/modules. Then, in a php.ini file in the Lambda Function root directory put:
26-
27-
```ini
28-
extension_dir=/opt/lib/php/7.1/modules
29-
extension=...
30-
```
31-
3225
The following extensions are built into the layer and available in /opt/lib/php/7.1/modules:
3326

3427
```
@@ -60,6 +53,14 @@ xsl.so
6053
zip.so
6154
```
6255

56+
These extensions are not loaded by default. You must add the extension to your php.ini file to use it:
57+
58+
```ini
59+
extension=json.so
60+
```
61+
62+
Extensions can be built using the lambci/lambda:build-nodejs8.10 Docker image. It is recommended that custom extensions be provided by a separate Lambda Layer with the extension .so files placed in /lib/php/7.1/modules/ so they can be loaded alongside the built-in extensions listed above.
63+
6364
#### Example
6465
Let's create an AWS SAM PHP application. We suggest using [Stackery](https://stackery.io) to make this super simple. It automates all the scaffolding shown below. But you may also choose to roll your own application from scratch.
6566

0 commit comments

Comments
 (0)