Skip to content

Instantly share code, notes, and snippets.

@matt-allan

matt-allan/Caddyfile

Created Mar 22, 2019
Embed
What would you like to do?
Caddyfile for PHP bug 77782
  1. Install caddy and PHP 7.3.3
  2. Create index.php and Caddyfile in a directory
  3. In the same directory run caddy
  4. run curl localhost:8080
localhost:8080
fastcgi / 127.0.0.1:9000 php {
env FOO bar
}
rewrite {
regexp .*
ext /
to /index.php?{query}
}
log stdout
errors stdout
<?php
$env = getenv();
foreach ($env as $key => $value) {
var_dump($key);
}
$var = 'FOO';
var_dump(getenv($var));
var_dump($env[$var]);
var_dump($var);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.