Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 03-11-2013, 03:46 AM
sandeep sandeep is offline
Junior Member
Join Date: 08-27-08
Posts: 11
iTrader: 0 / 0%
Big size file upload problem in PHP


My server has CentOS, Apache and PHP.
I have set all required parameters in php.ini to handle big size file uploads (post_max_size, memory_limit, timeouts etc.)

But, still the script doesn't accept a file more than 5MB. On bigger uploads, it returns error 7 (Unable to write to disk).
I have set 777 permissions on my temporary folder (/opt/php) and during upload, I do see temporary file through my FTP. But, once it reaches 5MB, temporary file disappears and script shows error 7.

I increased timeout value in httpd.conf and set following too,

HTML Code:
<Directory "/opt/php"> LimitRequestBody 10485760 </Directory>
But, no success.

Please help.

Reply With Quote



Old 03-11-2013, 06:33 AM
ScriptMan's Avatar
ScriptMan ScriptMan is offline
Super Moderator
Join Date: 02-10-07
Location: Central Kentucky
Posts: 14,038
iTrader: 4 / 100%
What exactly have you set to what?

The thing that I know that affect upload size with remarks.

; Resource Limits ;

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 60

; Maximum input variable nesting level
; http://php.net/max-input-nesting-level
;max_input_nesting_level = 64

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 8M

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 5M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP .doc file upload, corrupt file bs7280 Coding Forum 1 06-08-2011 09:17 PM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 07:36 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC