I’m trying to upload a large database to phpMyAdmin, and so need to adjust the values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. However I’m having trouble locating php.ini on my site…
I’ve trued mydomain/etc/php/7.2/cli/php.ini and mydomain/etc/php/7.1/apache2/php.ini both result in 404s. Where should php.ini be for an Ubuntu LAMP droplet on 18.04?
I’ll admit that this is a noob question, and I’m much more comfortable with FTP client GUIs. Any tips on modifying upload_max_filesize, memory_limit and post_max_size would also be appreciated. Right now just finding php.ini is the main obstacle.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi @alexanderCrab,
The best way to see which PHP.ini your website is looking at is using phpinfo. PHPinfo() is a PHP method which can be used in a file like so
<?php
phpinfo();
Basically, what you need to do is create a file called info.php in your website’s directory.
touch info.php
Then open it and type in the method
nano info.php
<?php
phpinfo();
Save and quit.
Now that you have the file open it in your browser. It will provide you with the loaded PHP.ini file from which you can actually start making the changes.
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.