Skip to content

Instantly share code, notes, and snippets.

@matt-allan
Created March 22, 2019 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matt-allan/280a0120d7e8467fb384acd80d697edb to your computer and use it in GitHub Desktop.
Save matt-allan/280a0120d7e8467fb384acd80d697edb to your computer and use it in GitHub Desktop.
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