PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 31st, 2002, 11:29 AM
bnow's Avatar
bnow bnow is offline
Charge into the Knight
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Orlando, FL
Posts: 276 bnow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
Question is there a limit to post_max_size?

1.) Is there a limit on post_max_size?
2.) How about upload_max_filesize?
3.) The manual mentioned something about memory_limit has to be bigger then post_max_size. I can't seem to find "memory_limit" in my phpinfo.php page. Am I blind?
__________________
Every man is a fool for at least five minutes every day; wisdom consists of not exceeding the limit.-- Elbert Hubbard

Reply With Quote
  #2  
Old October 31st, 2002, 11:37 AM
crazytrain81 crazytrain81 is offline
Always Learning
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Oct 2002
Location: Port Neches, TX, USA
Posts: 1,173 crazytrain81 User rank is Corporal (100 - 500 Reputation Level)crazytrain81 User rank is Corporal (100 - 500 Reputation Level)crazytrain81 User rank is Corporal (100 - 500 Reputation Level)crazytrain81 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 7 h 45 m 43 sec
Reputation Power: 15
Send a message via AIM to crazytrain81 Send a message via MSN to crazytrain81
your max upload size is set in php.ini, and it has to be smaller than the amount of ram your computer has available; that's typically no more than 50% of your total ram. why would you want to upload such mammoth files through php?
__________________
David Fells
If my post helped you, please click the above my post and leave a comment. Thanks

Reply With Quote
  #3  
Old October 31st, 2002, 12:34 PM
bnow's Avatar
bnow bnow is offline
Charge into the Knight
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Orlando, FL
Posts: 276 bnow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
I was just curious.

Is there a way to error trap for post_max_size? Say a user uplaods 11 MB and my post_max_szie is set to 8MB. Right now all I get is a Can not find page error.

Reply With Quote
  #4  
Old October 31st, 2002, 01:21 PM
scoutt's Avatar
scoutt scoutt is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Posts: 645 scoutt Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 16 sec
Reputation Power: 0
usually it is set in the form as max_file_size as a hidden input. that way you can check when the file gets uploaded.

by default php is set to 2M.

all you have to do is check the max_file_size against the filesize

something like this

$filesize=filesize($_FILES['fileupload']['name']);
if ($max_file_size!=0 and $filesize>$max_file_size) {
display to big message here.
}
__________________
Snippet Library

Reply With Quote
  #5  
Old October 31st, 2002, 03:03 PM
bnow's Avatar
bnow bnow is offline
Charge into the Knight
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Orlando, FL
Posts: 276 bnow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
Thanks

Reply With Quote
  #6  
Old November 1st, 2002, 03:08 AM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 328 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 41 sec
Reputation Power: 13
It's easy to change in php.ini. However, most people can't edit their php.ini (because their site is hosted and the hosting company won't allow it).

An easy way to get arround this if the following .htaccess file:
php_value post_max_size 1000M
php_value upload_max_filesize 1000M

Maybe this is a little bit off topic and obsolete for most of you PHP guru's, but I want to inform all other newbies (like me).

Good luck, Filip

Reply With Quote
  #7  
Old December 1st, 2003, 06:43 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 14
Quote:
Originally posted by bizzk
IAn easy way to get arround this if the following .htaccess file:
php_value post_max_size 1000M
php_value upload_max_filesize 1000M

Well, now that we're on the topic, could you tell me why this doesn't work for me? I use, the almost exact same, except they are in my virtual host, like so:

Code:
<VirtualHost 127.0.0.1>
  ServerName www.okartek.lin
  ServerAdmin webmaster@datamike.org
  DocumentRoot "/var/www/html/okartek/pankki"
  Alias /images "/var/www/html/okartek/images"
  Errorlog /var/www/html/okartek/logs/error_log

  php_value upload_tmp_dir /var/www/html/okartek/filebank
  php_value post_max_size 500M
  php_value upload_max_filesize 500M
</VirtualHost>


When i check my phpinfo page, it only uses one of the php_value directives, namely the upload_max_filesize and sets it neatly to 500M. But both upload_tmp_dir and post_max_size directives are not uploaded. Apache is restarted normally, without any hint in start up or in the logs.

If I use these same values in php.ini everything is fine, but in the Virtual Host, they don't work. I'm a little lost. Any ideas?
__________________
-- Tomi Kaistila
-- Developer's Journal

The more you learn, the more you know.
The more you know, the more you forget.
The more you forget, the less you know.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > is there a limit to post_max_size?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap