I am using DigitalOcean apps to run my Laravel application. Now I need to change the some value of php.ini.
post_max_size=100M
upload_max_filesize=25M
Since the DigitalOcean apps are ephemeral instance change php.ini won't work. So I seached for some other method.
Note: I am using apache dyno. heroku-php-apache2 public/
Here is what I tried:
Option 1
use .user.ini:
I created a file named .user.ini in the root directory and it didn't work. Then I tried to create the same file in public/ directory also didn't work.
the content of .user.ini is:
post_max_size=100M
upload_max_filesize=25M
this solution is suggested here although I could not understand what is meant by
add a .user.ini file to your codebase
Option 2
I tried to put the following lines in .htaccess as suggested here
php_value memory_limit 30M
php_value post_max_size 100M
php_value upload_max_filesize 30M
But I've got 500 server error and according to this question here it says that it is a permission issue which is not in my case because the configuration of Heroku image which is used by the digital ocean say that permissions allow overriding anything
Apache uses a Virtual Host that responds to all hostnames. The document root is set up as a reachable without access limitations and AllowOverride All set to enable the use of .htaccess files