vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   PHP Maximum Upload Size (https://vborg.vbsupport.ru/showthread.php?t=203995)

trickfly 02-02-2009 08:41 PM

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!

m002.p 02-02-2009 08:51 PM

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

Dismounted 02-03-2009 05:07 AM

Remember that you need to also restart Apache or your web server.

m002.p 02-03-2009 08:32 AM

Quote:

Originally Posted by m002.p
Dont forget you may need to restart apache for the changes to take effect.

:D Indeed

vbplusme 02-03-2009 09:07 AM

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.

CalebD 02-03-2009 11:19 AM

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!

Dismounted 02-04-2009 07:19 AM

Do you get any errors in your logs? Are you storing attachments in the database or the file system?

CalebD 02-04-2009 06:10 PM

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.

emailapphost 03-11-2009 08:35 AM

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.

TigerC10 03-11-2009 08:39 AM

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.


All times are GMT. The time now is 11:30 AM.

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.01085 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete