Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 02-02-2009, 08:41 PM
trickfly trickfly is offline
 
Join Date: Jan 2007
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default PHP Maximum Upload Size

How do I change the PHP Maximum Upload Size from 2mb to a higher value ?

I know you edit php.in and the my.cnf file but what do I edit ?

I have access to both files so please help!
Reply With Quote
  #2  
Old 02-02-2009, 08:51 PM
m002.p's Avatar
m002.p m002.p is offline
 
Join Date: Jan 2007
Location: Worcester
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its pretty simple, search php.ini for the following lines.

PHP Code:
upload_max_filesize 10M ;
post_max_size 20M 
The above would be an example of changing it to 10mb.
Please note I believe sometimes you need to also consider the following:

PHP Code:
memory_limit 8M 
If you still have issues after trying what ive suggested editing, you might want to try changing the above line to a larger value. It basically is the memory limit for php files on your server and sometimes can prevent uploads from working.

Dont forget you may need to restart apache for the changes to take effect.

Now if this fails, providing you have an apache server and apache uses PHP as a module, you can also make changes to the .htaccess file usually in the root, adding a few simple lines.

Something like this:

Code:
php_flag file_uploads On
php_value memory_limit 8M
php_value post_max_size 20M
php_value upload_max_filesize 10M
Hope it helps

Matt
Reply With Quote
  #3  
Old 02-03-2009, 05:07 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Remember that you need to also restart Apache or your web server.
Reply With Quote
  #4  
Old 02-03-2009, 08:32 AM
m002.p's Avatar
m002.p m002.p is offline
 
Join Date: Jan 2007
Location: Worcester
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by m002.p
Dont forget you may need to restart apache for the changes to take effect.
Indeed
Reply With Quote
  #5  
Old 02-03-2009, 09:07 AM
vbplusme vbplusme is offline
 
Join Date: Sep 2008
Location: CyberSpace
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have access to the both files then you should not have too much trouble updating them. You might want to do a backup in any event just in case.
Reply With Quote
  #6  
Old 02-03-2009, 11:19 AM
CalebD CalebD is offline
 
Join Date: Dec 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I need to upload files with a filesize of 50-70mb. For testing purposes, I already changed the values in the php.ini and my.cnf as follows:

Code:
upload_max_filesize = 100M
post_max_size = 110M
memory_limit = 120M
max_execution_time = 300
Additionally I set:

Code:
max_allowed_packet = 128M
I tried to upload a .rar file the size of 48MB. The rar attachment type is added and there are no upload limitations set. If I use the file upload test under 'Maintenance' in the AdminCP, everything works correctly. But if I upload the file as attachment to a post, I get a blank page. I tried both, local and remote upload - same result. Does anybody has a clue?

Apache and MySQL servers are both restarted.

Thx in advance!
Reply With Quote
  #7  
Old 02-04-2009, 07:19 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you get any errors in your logs? Are you storing attachments in the database or the file system?
Reply With Quote
  #8  
Old 02-04-2009, 06:10 PM
CalebD CalebD is offline
 
Join Date: Dec 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There were no errors in the log files.
Ah, I forgot to try the setting to store attachments in the file system. That seems to work correctly and I can live with that. Thanks for pointing me in the right direction.
Reply With Quote
  #9  
Old 03-11-2009, 08:35 AM
emailapphost emailapphost is offline
 
Join Date: Oct 2008
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you "search php.ini"?
And how do you edit it?

In the control panel?
Using telnet?

I really wish the helpfull old timers would be a bit more geared towards newbies in their answers. These threads will be used by newbies for many years going forward. Thanks.
Reply With Quote
  #10  
Old 03-11-2009, 08:39 AM
TigerC10's Avatar
TigerC10 TigerC10 is offline
 
Join Date: Apr 2006
Location: Austin, TX
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are a lot of hosting providers that don't let you change the maximum upload size. If you can't find a php.ini file in your webroot directory, then your hosting provider probably doesn't let you change it.

Contact your hosting provider for more information.
Reply With Quote
Reply

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


All times are GMT. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05744 seconds
  • Memory Usage 2,246KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete