I've got a simple curl statement that is running from bash that sends a header to a Apache2 server running PHP.
curl -H "myheader: test" https://example.com/listener.php
The listener.php file contains:
<?php
$myheader = $_SERVER['myheader'];
echo $myheader;
?>
The header is not being printed and instead I get in the apache logs:
PHP Notice: Undefined index: myheader in /var/www/listener.php
I must be missing something simple but can't figure out what.