IncreaseUpload Limit in php


php.ini

the file named mentioned above is the basic php configuration file that enables your environment of php development. Developers always struggle with this very basic stuff.

Although initially php allows a good amount of upload file limit and a execution timeout , however it is very frequently required that you customize the environment so that you can upload bigger sized file in your through phpmyadmin or from you php page.

These are the five basic properties you should change on your php.ini file which you could find by Using the phpinfo() function you can easily find the location of the php.ini file on the server.

just type

<?php
phpinfo();
?>

save  a php file and open it . It will tell you the location of php.ini file.

phpConfigurationFile-phpdotini

phpConfigurationFile-phpdotini

However , for most Linux distribution it’s inside your

 

/etc/php5/apache2/php.ini

 

 

 

 

So wherever you got the thing, you need to change the following:

memory_limit = 2M                                      ===> change it to => memory_limit: 16M

upload_max_filesize = 2M      ===> change it to => upload_max_filesize: 16M

memory_limit: 8M                                        ===> change it to => memory_limit: 16M

post_max=2M                                                 ===> change it to => post_max_size = 800M

                                                                                [ dont be crazy! 50 is enough in most of the time otherwise you get timeout]

max_execution_time = 3600                   ===> change it to max_execution_time =>3600 [ it’s an hour , do you need to wait more ]

 

At the end please remember to restart your web / apache2/ xampp /lampp/ wampp server

/etc/rc.d/init.d/httpd restart

or restart your web server

or easiest restart your machine.!!!

 

 

Advertisements

One thought on “IncreaseUpload Limit in php

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s