I was working on the project Hotelotravel for last few months and as usual in many cases it involved working with large database files because when you consider all hotels, locations and images all over the world it means a lot. But if we want to do large file uploads or database updates with PHP there are few configurations to be done to default settings and I’m putting this as a note to myself (I’m always keep forgetting this) as well as to any one who may find this useful like when importing a large backup file through phpMyAdmin.
In your php.ini check for these settings and change them as you need.
- post_max_size (The maximum size of post data you can send in one submission)
- upload_max_filesize (Maximum size of file that can be uploaded)
- memory_limit (Maximum memory limit that can be allocated for a script execution)
- max_execution_time (Maximum time limit for a script execution)
As a side note, if you trying to import large files (backups.etc) through phpMyAdmin and it refuses, you may need to edit config.inc.php file and change these settings to 0 which means no limit.
As a final note, these settings are there for a purpose. So my advice is change them in whatever manner you want in a development environment but be very careful when setting them in a production environment because an endless execution of a script can cause your servers to waste bandwidth and even crash. So I guess this is my disclaimer 😉