PHPackages                             gracious/magento-env-config - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. gracious/magento-env-config

AbandonedArchivedMagento-module[DevOps &amp; Deployment](/categories/devops)

gracious/magento-env-config
===========================

Use environment variables in Magento 1 local.xml, uses getenv to get the values

1.0.3(8y ago)42651[2 PRs](https://github.com/graciousagency/magento-env-config/pulls)MITPHP

Since Mar 26Pushed 5y ago2 watchersCompare

[ Source](https://github.com/graciousagency/magento-env-config)[ Packagist](https://packagist.org/packages/gracious/magento-env-config)[ Docs](https://github.com/gracious/magento-config-envvars)[ RSS](/packages/gracious-magento-env-config/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (7)Used By (0)

Ability to use envvars in Magento config
========================================

[](#ability-to-use-envvars-in-magento-config)

**Original module:  which used $\_SERVER vars which did not work for us using HHVM.**

In our development workflow, our webservers provide environment configuration information to our applications via environment variables (i.e. MAGE\_DB\_HOST, MAGE\_DB\_USER etc). This doesn't sit well with Magento's XML based configuration approach.

This little hack allows us to use '$MAGE\_DB\_HOST' and any other environment variables in our XML configuration files.

You can also specify a default value in case the envvar is missing or empty by appending it with double pipe symbols (e.g. '$MAGE\_DB\_HOST||localhost').

Usage
-----

[](#usage)

Example part of our local.xml...

```
...

                    $MAGE_DB_HOST
                    $MAGE_DB_USER
                    $MAGE_DB_PASS
                    $MAGE_DB_NAME
                    SET NAMES utf8]]>
                    mysql4]]>
                    pdo_mysql]]>

                    1

...
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

4

Last Release

2968d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21ae8d3f83f03a3c3a6f31de17ec1964ae26f1af703069284f650ed676211d4c?d=identicon)[gracious](/maintainers/gracious)

---

Top Contributors

[![pepijnblom](https://avatars.githubusercontent.com/u/6009489?v=4)](https://github.com/pepijnblom "pepijnblom (5 commits)")

---

Tags

dockerenvironmentenvironment-variableskubernetesmagentomagento1phpxml

### Embed Badge

![Health badge](/badges/gracious-magento-env-config/health.svg)

```
[![Health](https://phpackages.com/badges/gracious-magento-env-config/health.svg)](https://phpackages.com/packages/gracious-magento-env-config)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

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