support 7.2+ from pecl and add readme stuff about libcrypto issues

This commit is contained in:
Dengke Tang
2023-03-21 15:17:25 -07:00
parent 9db4948118
commit 363b693384
7 changed files with 17 additions and 13 deletions
+12 -3
View File
@@ -1,6 +1,7 @@
# AWS Common Runtime PHP bindings
## Requirements
* PHP 5.5+ on UNIX platforms, 7.2+ on Windows
* CMake 3.x
* GCC 4.4+, clang 3.8+ on UNIX, Visual Studio build tools on Windows
@@ -17,7 +18,7 @@ pecl install awscrt
composer require aws/aws-crt-php
```
On Windows, you need to build from source as instruction written below for the native extension `php_awscrt.dll`. And, follow https://www.php.net/manual/en/install.pecl.windows.php#install.pecl.windows.loading to load extension. After that:
On Windows, you need to build from source as instruction written below for the native extension `php_awscrt.dll` . And, follow https://www.php.net/manual/en/install.pecl.windows.php#install.pecl.windows.loading to load extension. After that:
```
composer require aws/aws-crt-php
@@ -46,7 +47,7 @@ $ ./dev-scripts/run_tests.sh
From Command Prompt (not powershell). The instruction is based on Visual Studio 2019 on 64bit Windows.
``` bat
```bat
> git clone --recursive https://github.com/awslabs/aws-crt-php.git
> git clone https://github.com/microsoft/php-sdk-binary-tools.git C:\php-sdk
> C:\php-sdk\phpsdk-vs16-x64.bat
@@ -80,6 +81,7 @@ set CMAKE_GENERATOR_PLATFORM=x64
```
## Debugging
Using [PHPBrew](https://github.com/phpbrew/phpbrew) to build/manage multiple versions of PHP is helpful.
Note: You must use a debug build of PHP to debug native extensions.
@@ -96,13 +98,20 @@ $ ./configure
$ make CMAKE_BUILD_TYPE=Debug
```
Ensure that the php you launch from your debugger is the result of `which php`, not just
Ensure that the php you launch from your debugger is the result of `which php` , not just
the system default php.
## Security
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
## Knowning OpenSSL related issue (Unix only)
* With php5.5 and openssl-3.0.2, signing functions will not work
* When your php loads a different version of openssl than your system openssl version, awscrt may fail to load.
The easiest workaround to those issue is to build from source and get aws-lc as libscrypto for awscrt to depend on instead of your local openssl. Same instructions as [here](#building-from-github-source), but use `USE_OPENSSL=OFF make` instead of `make`
## License
This project is licensed under the Apache-2.0 License.