473,507 Members | 9,962 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to increase the max size of a file upload.

26 New Member
Hi, I just want to ask if there is any way I can increase the upload_max_file_size so I can also upoad mp4 file as well as large pdf file.

Thanks in advance.
Jun 17 '09 #1
5 2646
Atli
5,058 Recognized Expert Expert
Sure. You just have to find the php.ini configuration file being used and edit the value of the directive you want to change.

If you are having problems finding the file, try creating a new .php file and putting <?php phpinfo() ?> into it. That should give you a bunch of info, including a "Loaded Configuration File" value, showing you exactly where the file is.

An alternative method you could try, if your server is running on Apache, is to create a .htaccess file in the directory where your script is, and this into it:
Expand|Select|Wrap|Line Numbers
  1. php_value upload_max_filesize 8M
Jun 17 '09 #2
roseple
26 New Member
I found the php.ini and I tried to change the upload_maz_filesize to 200M and the post_max_size to 100M. But still if I upload a file about 3Mb it still does not work.

Thanks..
Jun 18 '09 #3
Atli
5,058 Recognized Expert Expert
Did you restart the server? Changes to a global php.ini file won't take effect until the server is restarted.
And did the values returned by the phpinfo() function change?

If all that checks out, please elaborate on how the file upload is failing.
What error messages are you getting?
Jun 18 '09 #4
roseple
26 New Member
Yup, I already restart my server and the old values returned by the phpinfo change. Even if I test my codes in our hosting not locally. Still the 2Mb and above didn't work. Of course I already change the post and upload max size in our hosting. Do you think its not the php.ini and our hosting have the problem? Is it possible that its with my code?

Thank you very much.
Jun 19 '09 #5
Atli
5,058 Recognized Expert Expert
Are you absolutely sure you are editing the correct php.ini? (A mistake I have made many many times :P)

If the changes in your php.ini aren't being reflected in the phpinfo() function, then your host might be restricting how much you can change.
You might want to ask them about that.

If you are using a local server, then the changes should have been adopted, unless you edited the wrong file, or entered an invalid value, or something.
Jun 19 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
5990
by: Joe | last post by:
Hello, I have IIS 6.0 running on w2k3 Enterprise. I have three upload forms 1 to have restricted uploads .asp 2 to upload plain .asp any extension 3 a FP form upload non .asp
5
3714
by: Jefferis NoSpamme | last post by:
Hi all, I'm trying to limit the file size of an image submission and I keep running into various problems. I've got most of it working, but I'm stumped and I have a basic question as to WHY this...
3
30187
by: puja | last post by:
hi all, In asp.net 2.0 there is a limit on file size upload of 4MB. I know this limit can be increased in web.config file. Is there any way to check the file size before upload ? if user is...
12
15625
by: Phil Z. | last post by:
After migrating an ASP.NET 1.1 application to 2.0 we were getting "Cannot access a closed file" errors when uploading. I found a number of post on the subject and have since moved from using an...
7
1899
by: rn5a | last post by:
I am giving users the option to upload files from their hard disk to the server but only those files will be uploaded whose size is less tha or equal to 1 MB. I am using the ASP.NET FileUpload...
4
11093
by: bienwell | last post by:
Hi all, I developed an web page in ASP.NET to upload file into the server. In the Web.config file, I declared <httpRuntime executionTimeout="1200" maxRequestLength="400000" /> The MAX...
1
5436
by: chrisj | last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully. In this modified version there are two groups that use this upload script. Members of one...
10
11680
by: Devang | last post by:
Hello, I am using php script to upload file. some times if file size is too big(1GB) it takes too much time to upload. Can someone suggest me the way to increase upload speed. thanks
1
4614
by: nagmvs | last post by:
Hello I am unable to upload More than 200kb in to my server and also i can downlaod only less than 4MB file from my server .When i am searching in internet i found solution as u can...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.