Recommend this page to a friend! |
Classes of EnvKey | EnvKey PHP | README.md | Download |
|
Downloadenvkey-phpIntegrate EnvKey with your PHP projects to keep API keys, credentials, and other configuration securely and automatically in sync for developers and servers. This repo is mirrored in two locations: Installation
UsageIf you haven't already, download and install EnvKey from our website, then create a new org. Next, follow the ~1 minute integration quickstart to init an app with a At the entry point of your application, be sure you're including the composer autoloader.
Now all your EnvKey variables will be available with
ErrorsThe package will throw an error if an Overriding VarsThis package will not overwrite existing environment variables or additional variables set in the PHP Request Model / LatencyUnlike other EnvKey language libraries that expect a long-running server process, this library is designed for PHP's short-lived per-request processes. Instead of loading config from an EnvKey host on every request, which would add 100-500ms of latency (depending on location and connection speed), this library caches your encrypted config in RAM in a background process and keeps it up to date. After the first load of EnvKey on a server, subsequent requests will load config from this cache, with effectively zero latency (less than 1 millisecond). Working OfflineAs mentioned in the previous section, this package caches your encrypted config in RAM. Your config will still be available (though possibly not up-to-date) if you lose your internet connection. When the connection is reestablished, the latest config will be loaded immediately. envkey-sourceUsing a language-specific library like this one is the easiest and fastest method of integrating with EnvKey. That said, the envkey-source executable, which this library wraps, provides additional options and functionality when used directly from the command line. If you need additional flexibility and it works for your use case, consider using envkey-source directly. x509 error / ca-certificatesOn a stripped down OS like Alpine Linux, you may get an
Further ReadingFor more on EnvKey in general: Read the docs. Read the integration quickstart. Read the security and cryptography overview. Need help? Have questions, feedback, or ideas?Post an issue, start a discussion, or email us: support@envkey.com. |