I have been exploring Elastic Beanstalk for easy deployment of my PHP 5.4 application. For my application, I need to make changes in php.ini file.
After some searching on internet i tried to use configuration files in git directory. Following is the content of my file(.config) in .elasticbeanstalk
directory in git directory:
files:
"/etc/php.ini":
mode: "000644"
owner: root
group: root
source: https://bucketname.s3.amazonaws.com/php.ini
I have uploaded my custom php.ini in my own bucket on s3 and have given all rights to everyone. But still after deployment multiple time I am unable to see new files deployed.
I am using the following code to check for the changes in php.ini file.
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World2<br/></p>';
echo 'display_errors = ' . ini_get('display_errors') . "\n";
echo 'register_globals = ' . ini_get('register_globals') . "\n";
echo 'post_max_size = ' . ini_get('post_max_size') . "\n";
echo 'include_path = ' . ini_get('include_path') . "\n";
?>
</body>
</html>
In my custom php.ini post_max_size
has value 8M which shows 32M on beanstalk application.
Edit: I have downloaded my php.ini file from EC2 instance that is running my application. And it is different than my custom php.ini.
Further, I am using <?php phpinfo(); ?>
to check changes from my php page.