FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Uploading more than 2MB in PHP





gurani
Guys, you may find Error, while trying to use Uploading Script in php......


Most of the web servers are configured such a way that a user can only upload the maximum file size of 2MB


This is a limitation of your server's PHP configuration. 2Mb is the default upload file size limit when PHP is installed on a web server. Only your hosting provider can change this setting inside php.ini


If you have Paid Hosting, you may ask your Hosting Service provider to get you php.ini file, for your hosting space....

you just need to add or modify following config variable


php.ini file in public_html folder
Code:

php_value post_max_size "8M"
php_value upload_max_filesize "2M"




Note: Hosting provider will definately tell you to create php.ini file in your public_html folder



THE OTHER METHOD TO CHANGE THE SIZE OF UPLOAD IN PHP IS....

create a ".htaccess" file in your public_html folder


.htacess in public_html folder
Code:

php_value post_max_size "8M"
php_value upload_max_filesize "2M"




Thanks
inuyasha
I was wondering if the maximum size of posted data would have something to do with the server efficiency. Anyway, thanks for telling us the way~ Very Happy
jmlworld
@gurani: your solution will not work if you're on a shared host. Most shared hosts don't allow people to change server configurations...
Related topics
Problem installing phpBB2
Phoenix free PHP scripts
uploading system
Uploading problems
Running a "Hello World" php script
Working with Excel, PHP & MySQL. Any Ideas
About the hosting
PHPmyAdmin password?
Uploading a .php file! NEED HELP thanks
Maximum File Size
getting started in php
Uploading an Image using PHP script - RESOLVED
I can't use sub/domains
Problem connecting to Frihost hosting
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.