AWS Elastic beanstalk variables

Im trying to call the AWS EB variable in the config.ini.php and when i do it does one of two things:

If i insert directly i get a 404 error

if i capture it in a variable first the call the variable i get :

Unable to read INI file {/var/www/piwik/config/config.ini.php}: Syntax error in INI configuration: Your host may have disabled parse_ini_file().

; <?php exit; ?> DO NOT REMOVE THIS LINE
; file automatically generated or modified by Piwik; you can manually override the default values in global.ini.php by redefining them in this file.
<?php 
     $db_host = $_ENV['DB_HOST'];
    $db_user= $_ENV['DB_USERNAME'];
    $db_pass= $_ENV['DB_PASSWORD'];
    $db_name = $_ENV['DB_NAME'];
    $db_port = $_ENV['DB_PORT'];
?>

[database]
host = "<?php echo $db_host; ?>"
username = "<?php echo $db_user; ?>"
password = "<?php echo $db_pass; ?>"
dbname = "<?php echo $db_name; ?>"
tables_prefix = "<?php echo $_ENV['DB_PREFIX']; ?>"