PHPackages                             aws/aws-crt-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aws/aws-crt-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aws/aws-crt-php
===============

AWS Common Runtime for PHP

v1.2.7(1y ago)420300.1M—0.7%12[1 issues](https://github.com/awslabs/aws-crt-php/issues)3Apache-2.0PHPPHP &gt;=5.5CI passing

Since Jun 18Pushed 9mo ago15 watchersCompare

[ Source](https://github.com/awslabs/aws-crt-php)[ Packagist](https://packagist.org/packages/aws/aws-crt-php)[ Docs](https://github.com/awslabs/aws-crt-php)[ RSS](/packages/aws-aws-crt-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (44)Used By (3)

AWS Common Runtime PHP bindings
===============================

[](#aws-common-runtime-php-bindings)

Requirements
------------

[](#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
- Tests require [Composer](https://getcomposer.org)

Installing with Composer and PECL
---------------------------------

[](#installing-with-composer-and-pecl)

The package has two different package published to [composer](https://packagist.org/packages/aws/aws-crt-php) and [PECL](https://pecl.php.net/package/awscrt).

On UNIX, you can get the package from package manager or build from source:

```
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  to load extension. After that:

```
composer require aws/aws-crt-php

```

Building from Github source
---------------------------

[](#building-from-github-source)

```
$ git clone --recursive https://github.com/awslabs/aws-crt-php.git
$ cd aws-crt-php
$ phpize
$ ./configure
$ make
$ ./dev-scripts/run_tests.sh
```

Building on Windows
-------------------

[](#building-on-windows)

### Requirements for Windows

[](#requirements-for-windows)

- Ensure you have the [windows PHP SDK](https://github.com/microsoft/php-sdk-binary-tools) (this example assumes installation of the SDK to C:\\php-sdk and that you've checked out the PHP source to php-src within the build directory) and it works well on your machine.
- Ensure you have "Development package (SDK to develop PHP extensions)" and PHP available from your system path. You can download them from . You can check if they are available by running `phpize -v` and `php -v`

### Instructions

[](#instructions)

From Command Prompt (not powershell). The instruction is based on Visual Studio 2019 on 64bit Windows.

```
> 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

C:\php-sdk\
$ cd

\
$ phpize

# --with-prefix only required when your php runtime in system path is different than the runtime you wish to use.
\
$ configure --enable-awscrt=shared --with-prefix=

\
$ nmake

\
$ nmake generate-php-ini

# check .\php-win.ini, it now has the full path to php_awscrt.dll that you can manually load to your php runtime, or you can run the following command to run tests and load the required native extension for awscrt.
\
$ .\dev-scripts\run_tests.bat
```

Note: for VS2017, Cmake will default to build for Win32, refer to [here](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2015%202017.html). If you are building for x64 php, you can set environment variable as follow to let cmake pick x64 compiler.

```
set CMAKE_GENERATOR=Visual Studio 15 2017
set CMAKE_GENERATOR_PLATFORM=x64
```

Debugging
---------

[](#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. See the [PHP Internals Book](https://www.phpinternalsbook.com/php7/build_system/building_php.html) for more info

```
# PHP 8 example
$ phpbrew install --stdout -j 8 8.0 +default -- CFLAGS=-Wno-error --disable-cgi --enable-debug
# PHP 5.5 example
$ phpbrew install --stdout -j 8 5.5 +default -openssl -mbstring -- CFLAGS="-w -Wno-error" --enable-debug --with-zlib=/usr/local/opt/zlib
$ phpbrew switch php-8.0.6 # or whatever version is current, it'll be at the end of the build output
$ phpize
$ ./configure
$ make CMAKE_BUILD_TYPE=Debug
```

Ensure that the php you launch from your debugger is the result of `which php` , not just the system default php.

Security
--------

[](#security)

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

Known OpenSSL related issue (Unix only)
---------------------------------------

[](#known-openssl-related-issue-unix-only)

- When your php loads a different version of openssl than your system openssl version, awscrt may fail to load or weirdly crash. You can find the openssl version php linked via: `php -i | grep 'OpenSSL'`, and awscrt linked from the build log, which will be `Found OpenSSL: * (found version *)`

The easiest workaround to those issue is to build from source and get aws-lc for awscrt to depend on instead. TO do that, same instructions as [here](#building-from-github-source), but use `USE_OPENSSL=OFF make` instead of `make`

License
-------

[](#license)

This project is licensed under the Apache-2.0 License.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance48

Moderate activity, may be stable

Popularity74

Solid adoption and visibility

Community33

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~93 days

Total

14

Last Release

577d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/adbbedb42187aa7ae90828e73b4fb3bc713b15809703cae26b88d653d0a28df1?d=identicon)[SamRemis](/maintainers/SamRemis)

![](https://www.gravatar.com/avatar/9632465119180af73998cb3ce516afdff11606062b4f984596d75445d6d0a962?d=identicon)[aws-sdk-php-automation](/maintainers/aws-sdk-php-automation)

![](https://www.gravatar.com/avatar/8018107264c123b163fed202999640a273219be10816de43320e7f68c9d1d2dd?d=identicon)[aws-sdk-common-runtime](/maintainers/aws-sdk-common-runtime)

---

Top Contributors

[![TingDaoK](https://avatars.githubusercontent.com/u/26829806?v=4)](https://github.com/TingDaoK "TingDaoK (11 commits)")[![waahm7](https://avatars.githubusercontent.com/u/7613045?v=4)](https://github.com/waahm7 "waahm7 (5 commits)")[![graebm](https://avatars.githubusercontent.com/u/24399397?v=4)](https://github.com/graebm "graebm (4 commits)")[![jmklix](https://avatars.githubusercontent.com/u/5644066?v=4)](https://github.com/jmklix "jmklix (3 commits)")[![SamRemis](https://avatars.githubusercontent.com/u/5881835?v=4)](https://github.com/SamRemis "SamRemis (2 commits)")[![mdio](https://avatars.githubusercontent.com/u/8616698?v=4)](https://github.com/mdio "mdio (1 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (1 commits)")[![sdavtaker](https://avatars.githubusercontent.com/u/1393127?v=4)](https://github.com/sdavtaker "sdavtaker (1 commits)")[![yasminetalby](https://avatars.githubusercontent.com/u/108372980?v=4)](https://github.com/yasminetalby "yasminetalby (1 commits)")[![amazon-auto](https://avatars.githubusercontent.com/u/54958958?v=4)](https://github.com/amazon-auto "amazon-auto (1 commits)")[![yslinear](https://avatars.githubusercontent.com/u/31029063?v=4)](https://github.com/yslinear "yslinear (1 commits)")[![ashishdhingra](https://avatars.githubusercontent.com/u/67916761?v=4)](https://github.com/ashishdhingra "ashishdhingra (1 commits)")[![DmitriyMusatkin](https://avatars.githubusercontent.com/u/63878209?v=4)](https://github.com/DmitriyMusatkin "DmitriyMusatkin (1 commits)")[![ilevyor](https://avatars.githubusercontent.com/u/81260226?v=4)](https://github.com/ilevyor "ilevyor (1 commits)")[![KaibaLopez](https://avatars.githubusercontent.com/u/10042156?v=4)](https://github.com/KaibaLopez "KaibaLopez (1 commits)")

---

Tags

hacktoberfestamazonsdkawscrt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aws-aws-crt-php/health.svg)

```
[![Health](https://phpackages.com/badges/aws-aws-crt-php/health.svg)](https://phpackages.com/packages/aws-aws-crt-php)
```

###  Alternatives

[aws/aws-sdk-php-symfony

A Symfony bundle for v3 of the AWS SDK for PHP

36517.7M22](/packages/aws-aws-sdk-php-symfony)[aws/aws-php-sns-message-validator

Amazon SNS message validation for PHP

21421.5M91](/packages/aws-aws-php-sns-message-validator)[async-aws/async-aws-bundle

Configure all your AsyncAws services and enjoy the autowire greatness.

243.6M2](/packages/async-aws-async-aws-bundle)[amazon/instantaccess-sdk-php

Amazon Instant Access SDK for PHP

1432.8k](/packages/amazon-instantaccess-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
