954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to increase file upload limit in php.?

Hi guys.,

I have trapped in a very critic situation. I need to upload files without any restriction of file size. I have a uploader developed using Flash and PHP. I have changed the settings in php.ini as follows

upload_max_filesize = 100M
post_max_size = 128M
memory_limit = 512M
max_execution_time = 300
max_input_time = 600

This changes helped me to upload file size of 8MB smoothly. If exceeds 8MB, it shows a javascript error as Expected hexadecimal value and file cannot upload. I cant able to rectify this. Please help.

Thanks,

Dragonbaki
Junior Poster
130 posts since Oct 2010
Reputation Points: 15
Solved Threads: 21
 

you need to put a limitation.

decade
Junior Poster in Training
62 posts since Jun 2011
Reputation Points: 12
Solved Threads: 14
 

Thanks for your reply.. But i cant understand what you are referring as "limitation"..? Could you pls explain...?

Dragonbaki
Junior Poster
130 posts since Oct 2010
Reputation Points: 15
Solved Threads: 21
 

check this link and it will make every thing clear to you with better example code:
http://www.webkollage.com/php/php_uploading_files.php every thing is explain with a professional way of getting upload errors and dealing it.
then let me know.

kaisarkhan87
Newbie Poster
6 posts since Jul 2011
Reputation Points: 10
Solved Threads: 1
 

if (($_FILES["file"]["type"] == "image/png")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < 20000000000000)))

file size depend on $_FILES["file"]["size"] line


Rajeev

rajeevbu
Newbie Poster
6 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

Thanks for your reply.. I changed it as follows...

upload_max_filesize = 750M
post_max_size = 750M
memory_limit = 128M
max_execution_time = 30
max_input_time = 60

These changes has been made in php.ini file in my local wamp apache server. After made these changes, once i restart my wamp service, it allows to upload upto 400MB. But i did not restart wamp service after those changes, it still allows me to upload 8MB. Could you please anybody to help me out this...? Is it possible to make it work without restarting my wamp server...?

Thanks.,

Dragonbaki
Junior Poster
130 posts since Oct 2010
Reputation Points: 15
Solved Threads: 21
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: