Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

How To Change File Upload Size

Asked Modified Viewed 7,035 times
A
anthonytoth
A
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
asked
Newbie

Hi I am just wondering how to change the file upload Size. The size is 2M, but I want to make it bigger.
0 replies

9 posts

S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

The upload of what/where ?
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

I actually just done that today.

You need to create a php.ini file with the following.
Just copy this into notepad::

[PHP]

post_max_size = 16M
upload_max_filesize = 8M


You will need to change the numbers to suit you as long as post_max_size is greater than upload_max_size

Upload php.ini to your route>>> run http://www.yoursite.com/php.ini in your browser then that should do it for you.

You will also need to change the max sizes in fusion admin.

Good luck.
Edited by Craig on 22-07-2009 16:06,
0 replies
W
Wanabo
W
Wanabo 10
www.probemyip.com/probe-my-ip-80x15.png
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.
  • Senior Member, joined since
  • Contributed 598 posts on the community forums.
  • Started 94 threads in the forums
answered
Senior Member

If your server is using Apache for your webserver you can create an .htaccess file in the root of your website.

Edit or create an ".htaccess" file

Quote


# Values required to enable big uploads:
# Up to 10MB - leave some extra space.
php_value upload_max_filesize 11M
# Files are sent by POST so the post_max_size has to be even bigger.
php_value post_max_size 12M
# PHP receives the files, so this value has to be even bigger
php_value memory_limit 15M
# 15min timeout is usually enough - otherwise uploads are cancelled by a timeout message...
php_value max_execution_time 900
# Set the session timeout to 2 hours (7200s).
php_value session.gc_maxlifetime 7200


Edit to suite your needs.

Tip! Check your PHP info to see the actual values and check if they are altered after applying the commands in .htaccess.
Edited by Wanabo on 22-07-2009 23:42,
0 replies
S
shine1307
S
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

I m not able to upload file larger than 2 mb. can someone please help me. hrre is my php core configuration.. m i missing something?



Configuration

PHP Core

Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
allow_url_include Off Off
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting no value no value
expose_php On On
extension_dir /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613 /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/local/php5/lib/php .:/usr/local/php5/lib/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 900 900
max_input_nesting_level 64 64
max_input_time -1 -1
memory_limit 128M 128M
open_basedir no value no value
output_buffering 0 0
output_handler no value no value
post_max_size 16M 16M
precision 14 14
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv On On
register_globals Off Off
register_long_arrays On On
report_memleaks On On
report_zend_debug On On
safe_mode Off Off
safe_mode_exec_dir /usr/local/php/bin /usr/local/php/bin
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 8M 8M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off
0 replies
E
esso82
E
esso82 10
  • Junior Member, joined since
  • Contributed 17 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

pandyag - do u modify on localhost or webspace by provider ... if it is the second case, make sure, your provider allows u to do these modifications or they may use another module to do that ....

EDIT // if it is on localhost, make sure you have restarted your server as all of these variables are loaded on start up. U obviously can change them using php functions, but restarting is safer methinks...
Edited by esso82 on 03-08-2009 17:24,
0 replies
S
shine1307
S
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

it is on third party web server. and yes i can customize it using php.ini. i dont know whats wrong...
0 replies
— 3 months later —
S
shine1307
S
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

I m not facing any problem with download size but my up/download stops in just above 2 mins. so is it about time setting?
4 months and no help yet!! no support available to newbie?? or is it just for coders?
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Try use another browser?
0 replies
S
shine1307
S
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 1 thread in the forums
answered
Newbie

tried it. even tried download manager also..
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 9 posts
  • Votes 0 votes
  • Topic users 7 members

7 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
W
W
Wanabo 10
www.probemyip.com/probe-my-ip-80x15.png
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.
  • Senior Member, joined since
  • Contributed 598 posts on the community forums.
  • Started 94 threads in the forums
S
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
E
E
esso82 10
  • Junior Member, joined since
  • Contributed 17 posts on the community forums.
  • Started 4 threads in the forums
S
S
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 1 thread in the forums
A
A
  • Newbie, joined since
  • Contributed 2 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet