Hi,
I got a problem, whenever i try to upload a file of more than 5 MB, the post fields (we are using method="POST" in the form) are not available to the page. Can anybody help why this problem is arising.
It works fine for 2-3 MB of files.
Thanks.
| SitePoint Sponsor |
Hi,
I got a problem, whenever i try to upload a file of more than 5 MB, the post fields (we are using method="POST" in the form) are not available to the page. Can anybody help why this problem is arising.
It works fine for 2-3 MB of files.
Thanks.
Rule No 1: search the forum before posting a thread.![]()
You have to increase post_max_size and upload_max_filesize. You can use ini_set for such thing.
Check it out at http://yu.php.net/manual/en/ini.php#ini.list
-- Jelena --
Display phpinfo in a script on your server like this:
Then scroll down and search for upload_max_filesize. That's the limit set by your server and probably that's why big file uploads do not work.PHP Code:<?php
phpinfo();
?>
Science is magic that works!
-- Kurt Vonnegut Jr.
see where your bottleneck is
do a phpinfo() and check these:
post_max_size
upload_max_filesize
memory_limit
sounds like your problem is post_max_size, because when you exceed that value, your _POST variables will all go empty on you, like you said they are. you can only change that value in php.ini or httpd.conf, ini_set() wont work because the limit is reached before php begins parsing your script.
Hi,
If PHP is installed as an apache module, then generally there are three possible ways to modify the value of the PHP directives "e.g. upload_max_filesize":
- through the script itself by using the function ini_set().
-through the system configurations files "e.g. php.ini or httpd.conf".
- or it can be modified through the per directory file configration ".htaccess".
some directives work in every way but some are limited to one or two ways. Depending on what directive and on what you need you can choose the proper way. For more information on each directive and where it can be modified please read this reference page:
php.ini directives
All best,
DoubleM![]()
<?php5 echo 'I am just a very newbie! '; ?>
ok thanks, It works now for files of 8MB size. I have to check for heavier file sizes. I dont want to impose ane restriction for file uploading.
Is there any maximum size restriction that we can upload.
Last edited by akashsharma; Mar 9, 2006 at 07:05.
Bookmarks