Skip to content

Instantly share code, notes, and snippets.

@SamMousa
Last active February 22, 2018 13:48
Show Gist options
  • Save SamMousa/fa981f4ae227b945fef29e68669e0b08 to your computer and use it in GitHub Desktop.
Save SamMousa/fa981f4ae227b945fef29e68669e0b08 to your computer and use it in GitHub Desktop.
Breaking a PHPFPM worker...
<?php
if ($_SERVER['testcase'] === 'test') {
echo 'Everything is fine; trying to break your env...';
foreach($_SERVER as $key => &$value) {
putenv("$key=$value");
}
} else {
phpinfo(INFO_ENVIRONMENT);
}
die();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment