Re: [PHP] Max file size in fopen()
On Fri, 2010-02-19 at 17:42 -0200, Darvin Denmian wrote: Hello, I need to open a file with more than 2GB but the following error occurs: failed to open stream: Value too large for defined data type in /srv/www/sandboxes/dev02/test.php on line 2 I'm running this php in a 32 bits system. Googling I found that with the option CFLAGS=-D_FILE_OFFSET_BITS=64 the problem can be solved. Will I have this issue in a 64 bits System? Is there some recognized solution for this issue? Thanks. 32-bit PHP has quite a few problems with large files. I ran into an odd one where I couldn't even get the dates from a file that was over 2GB! I think you may be running into something similar here, where some value that is needed to work with the file is going over the maximum that 32-bit can handle. 64-bit should fix the problem, but if you're in doubt, you could try testing it on a VM first? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Max file size for uploads?
Hello Robert, Wednesday, May 12, 2004, 2:37:23 PM, you wrote: RS I have an upload script that I am trying to allow for 725MB, I have RS written the script to handle files of that size, and I modified the RS upload_max_filesize = 730M RS I tried uploading a 15MB file and it blew up (current error message is RS not in my brain). RS Is there a true max size or do I just have something messed up somewhere RS that I need to tweak?? POST file size is the other one. and that's HELL of a file size.. what is it, an ISO dump site? ;) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max file size for uploads?
I get this error message now in my httpd error log: [Wed May 12 10:07:01 2004] [error] [client 66.43.177.38] Requested content-length of 69888498 is larger than the configured limit of 524288, referer: http://dinghy.homeip.net/upload.php Any thoughts? TIA! Robert -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 9:43 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Max file size for uploads? Hello Robert, Wednesday, May 12, 2004, 2:37:23 PM, you wrote: RS I have an upload script that I am trying to allow for 725MB, I have RS written the script to handle files of that size, and I modified the RS upload_max_filesize = 730M RS I tried uploading a 15MB file and it blew up (current error message RS is not in my brain). RS Is there a true max size or do I just have something messed up RS somewhere that I need to tweak?? POST file size is the other one. and that's HELL of a file size.. what is it, an ISO dump site? ;) -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max file size for uploads?
On Wed, May 12, 2004 at 10:07:09AM -0400, Robert Sossomon wrote: I get this error message now in my httpd error log: [Wed May 12 10:07:01 2004] [error] [client 66.43.177.38] Requested content-length of 69888498 is larger than the configured limit of 524288, referer: http://dinghy.homeip.net/upload.php Any thoughts? If you are using apache, this might help: http://httpd.apache.org/docs/mod/core.html#limitrequestbody -Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max file size for uploads?
Robert Sossomon wrote: I have an upload script that I am trying to allow for 725MB, I have written the script to handle files of that size, and I modified the upload_max_filesize = 730M I tried uploading a 15MB file and it blew up (current error message is not in my brain). Is there a true max size or do I just have something messed up somewhere that I need to tweak?? There are quite a few some have already been mentioned, in other posts but I invite you to look at http://www.radinks.com/upload/config.php that will give you a good idea about all the settings involved. Having said that you probably ought to switch to FTP or SFTP if you want to transfer so much data. Web servers are always optimized to deliver thousands of files at once instead of accepting large incoming files. Thanks, Robert -- Raditha Dissanayake. - http://www.radinks.com/print/upload.php SFTP, FTP and HTTP File Upload solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max file size for uploads?
Is there a true max size or do I just have something messed up somewhere that I need to tweak?? I've got a client who needs their customers to upload large files for printing this way - and it stops at 30MB. There is some setting in Windows XP that we have not been able to change. It's been a lot of fun digging through Microsoft support docs but have had no luck. The IIS setting seems to override whatever you tell PHP to do. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Size
Hi, Thursday, December 5, 2002, 5:11:16 PM, you wrote: RL Jason Wong responded Wednesday, December 04, 2002 10:24 PM RL On Thursday 05 December 2002 10:14, Roger Lewis wrote: RL Thanks for the suggestion. I'll try ini_set although I'm not yet RL certain RL of how to use it. RL As has already been pointed out, the uploads take place *before* your RL script RL is run. The manual has table which shows what you can and cannot change RL using RL ini_set(). RL THE place to change it is in php.ini. RL I checked again and post_max_size is not in my php.ini, but perhaps I RL should just add it. RL Perhaps you should indeed. I think it defaults to 2M, so if you haven't RL set it RL 2MB is your limit. RL Also, I was wrong before - I do have a directive for memory_limit. It RL is RL 8M RL I think this only has effect if php was compiled with RL --enable-memory-limit. RL Regardless, this doesn't explain why I can't upload a file that exceeds RL 2M, RL except that I don't seem to be able to reset upload_max_filesize to RL greater RL than 2M. RL You mean you set it in php.ini and phpinfo() reports something different? RL -- RL Jason Wong - Gremlins RL That's what I've been trying to say, Jason. I set upload_max_filesize in RL php.ini to 8M, 800, or any other number, restart Apache, and the reset RL seems to be ignored. When looking at phpinfo, upload_max_filesize is RL *always* 2M. RL Adding the directive post_max_size = 16M to my php.ini did nothing except RL change my include_path settings ?%!?!*. (I can see in phpinfo that the RL default is 8M, but there is no setting in my php.ini) RL In reply to Tom's comment, there is no difference between master and local RL settings; however, there are no separate settings in my php.ini either. RL Do you have any other thoughts on this? RL Regards, RL Roger TR A shot in the dark check for: TR file_uploads = On TR -- TR regards, TR Tom file_uploads = 1. I presume this is means on, right? Roger I think I figured it out. The clue was that phpinfo() would show changes that I wasn't making. I concluded that it might be a syntax error in my php.ini due to some weird line wrapping that was going on. (I can't see the entire text on my telnet screen). I deleted my entire section on Paths and Directories and replaced with a clean section. Then reset upload_max_filesize and restarted Apache. Wadda you know! It worked. Thanks for all the comments and suggestions. Roger PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max File Size
Are you sure you're looking at the right php.ini? Try calling phpinfo() and check where PHP is looking for the ini file. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! ---BeginMessage--- Hi, I'm having a problem uploading files greater than 2mb, but I believe the problem is related to php.ini. UPLOAD_MAX_FILESIZE in my submit form is set to 1000. Also, I set upload_max_filesize = 1000 in php.ini. After changing php.ini, I stopped and then started httpd. I thought this was enough to be able to upload files greater than the default 2mb. Even though php.ini has been changed, when I check phpinfo.php, I see that upload_max_filesize is still 2mb and my file is not being uploaded. Can anyone tell me what I am missing here. Thanks, Roger Lewis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Size
Yep, Mine is in /etc/httpd/php.ini and that's what phpinfo gives me Roger -Original Message- From: Marco Tabini [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 3:19 PM To: Roger Lewis Cc: PHP-General Subject: Re: [PHP] Max File Size Are you sure you're looking at the right php.ini? Try calling phpinfo() and check where PHP is looking for the ini file. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Size
On Wednesday, December 04, 2002 3:03 PM, I wrote Hi, I'm having a problem uploading files greater than 2mb, but I believe the problem is related to php.ini. UPLOAD_MAX_FILESIZE in my submit form is set to 1000. Also, I set upload_max_filesize = 1000 in php.ini. After changing php.ini, I stopped and then started httpd. I thought this was enough to be able to upload files greater than the default 2mb. Even though php.ini has been changed, when I check phpinfo.php, I see that upload_max_filesize is still 2mb and my file is not being uploaded. Can anyone tell me what I am missing here. Thanks, Roger Lewis Further to my original post, to check if my php.ini was being recognized I temporarily changed some other configuration options, i.e. register_globals and include_path, and reloaded phpinfo.php. All options, except for upload_max_filesize, were changed per my input. Does anyone know why upload_max_filesize is not being reset? The following is from my php.ini showing upload_max_filesize = 750: ; ; Paths and Directories ; ; include_path= .:/home/sites/home/users/demo/phpinclude ; UNIX: /path1:/path2 Windows: \path1;\path2 doc_root= ; the root of the php pages, used only if nonempty user_dir= ; the directory under which php opens the script using /~username, used only if nonempty ;upload_tmp_dir = ; temporary directory for HTTP uploaded files (will use system default if not specified) upload_max_filesize = 750 ; 2 Meg default limit on file uploads extension_dir = /usr/lib/apache/php ; directory in which the loadable extensions (modules) reside Thanks for any help on this, Roger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Size
From phpinfo.php I see that post_max_size is 8M; however, I don't find a setting for this in php.ini. Although I can live with 8M, can you tell me how to change this setting. I am using php 4.0.6 Also I understand that memory_limit may be affecting things, but I don't seem to have access to this setting. Roger -Original Message- From: David Banks [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 5:22 PM To: 'Roger Lewis' Subject: RE: [PHP] Max File Size Don't forget to increase post_max_size as well See also http://www.php.net/manual/en/features.file-upload.php -Original Message- From: Roger Lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 5:00 PM To: Php-General Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Max File Size On Wednesday, December 04, 2002 3:03 PM, I wrote Hi, I'm having a problem uploading files greater than 2mb, but I believe the problem is related to php.ini. UPLOAD_MAX_FILESIZE in my submit form is set to 1000. Also, I set upload_max_filesize = 1000 in php.ini. After changing php.ini, I stopped and then started httpd. I thought this was enough to be able to upload files greater than the default 2mb. Even though php.ini has been changed, when I check phpinfo.php, I see that upload_max_filesize is still 2mb and my file is not being uploaded. Can anyone tell me what I am missing here. Thanks, Roger Lewis Further to my original post, to check if my php.ini was being recognized I temporarily changed some other configuration options, i.e. register_globals and include_path, and reloaded phpinfo.php. All options, except for upload_max_filesize, were changed per my input. Does anyone know why upload_max_filesize is not being reset? The following is from my php.ini showing upload_max_filesize = 750: ; ; Paths and Directories ; ; include_path = .:/home/sites/home/users/demo/phpinclude ; UNIX: /path1:/path2 Windows: \path1;\path2 doc_root = ; the root of the php pages, used only if nonempty user_dir = ; the directory under which php opens the script using /~username, used only if nonempty ;upload_tmp_dir= ; temporary directory for HTTP uploaded files (will use system default if not specified) upload_max_filesize = 750 ; 2 Meg default limit on file uploads extension_dir = /usr/lib/apache/php ; directory in which the loadable extensions (modules) reside Thanks for any help on this, Roger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Size
Thanks for the suggestion. I'll try ini_set although I'm not yet certain of how to use it. It still seems odd that I can't simply set upload_max_filesize to whatever value I want. I checked again and post_max_size is not in my php.ini, but perhaps I should just add it. Also, I was wrong before - I do have a directive for memory_limit. It is 8M Regardless, this doesn't explain why I can't upload a file that exceeds 2M, except that I don't seem to be able to reset upload_max_filesize to greater than 2M. If you have any other thoughts, they are much appreciated. Roger -Original Message- From: David Banks [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 5:57 PM To: 'Roger Lewis' Subject: RE: [PHP] Max File Size post_max_size *should* be in php.ini, I think I ususally leave these things up to our sysop ;) Checking back to when I was coding for file uploading, I see that there were 4 settings to ensure were 'high enough' max_execution_time memory_limit post_max_size upload_max_filesize I *think* that ini_set may be used to change these settings, but I could be wrong. Cheers Dave -Original Message- From: Roger Lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 5:48 PM To: David Banks Cc: Php-General Subject: RE: [PHP] Max File Size From phpinfo.php I see that post_max_size is 8M; however, I don't find a setting for this in php.ini. Although I can live with 8M, can you tell me how to change this setting. I am using php 4.0.6 Also I understand that memory_limit may be affecting things, but I don't seem to have access to this setting. Roger -Original Message- From: David Banks [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 5:22 PM To: 'Roger Lewis' Subject: RE: [PHP] Max File Size Don't forget to increase post_max_size as well See also http://www.php.net/manual/en/features.file-upload.php -Original Message- From: Roger Lewis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 5:00 PM To: Php-General Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Max File Size On Wednesday, December 04, 2002 3:03 PM, I wrote Hi, I'm having a problem uploading files greater than 2mb, but I believe the problem is related to php.ini. UPLOAD_MAX_FILESIZE in my submit form is set to 1000. Also, I set upload_max_filesize = 1000 in php.ini. After changing php.ini, I stopped and then started httpd. I thought this was enough to be able to upload files greater than the default 2mb. Even though php.ini has been changed, when I check phpinfo.php, I see that upload_max_filesize is still 2mb and my file is not being uploaded. Can anyone tell me what I am missing here. Thanks, Roger Lewis Further to my original post, to check if my php.ini was being recognized I temporarily changed some other configuration options, i.e. register_globals and include_path, and reloaded phpinfo.php. All options, except for upload_max_filesize, were changed per my input. Does anyone know why upload_max_filesize is not being reset? The following is from my php.ini showing upload_max_filesize = 750: ; ; Paths and Directories ; ; include_path = .:/home/sites/home/users/demo/phpinclude ; UNIX: /path1:/path2 Windows: \path1;\path2 doc_root = ; the root of the php pages, used only if nonempty user_dir = ; the directory under which php opens the script using /~username, used only if nonempty ;upload_tmp_dir= ; temporary directory for HTTP uploaded files (will use system default if not specified) upload_max_filesize = 750 ; 2 Meg default limit on file uploads extension_dir = /usr/lib/apache/php ; directory in which the loadable extensions (modules) reside Thanks for any help on this, Roger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Size
Tom Rogers responded on Wednesday, December 04, 2002 6:11 PM Hi, Thursday, December 5, 2002, 11:54:08 AM, you wrote: RL Tom, RL Thanks for your response. If this is so, can you tell me how I check it out RL and fix things. RL Roger TR Unless you have set it yourself that is probably not the reason. TR Try setting it like this TR upload_max_filesize = 8M TR maybe there are too many digits for php to cope :) TR -- TR regards, TR Tom I tried using 8M, but no difference. The original setting was 200, and that didn't seem to be too many digits. I'm going to check out ini_set as suggested by David Banks and will post the outcome in due course. Thanks, Roger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max File Size
On Thursday 05 December 2002 10:14, Roger Lewis wrote: Thanks for the suggestion. I'll try ini_set although I'm not yet certain of how to use it. As has already been pointed out, the uploads take place *before* your script is run. The manual has table which shows what you can and cannot change using ini_set(). THE place to change it is in php.ini. I checked again and post_max_size is not in my php.ini, but perhaps I should just add it. Perhaps you should indeed. I think it defaults to 2M, so if you haven't set it 2MB is your limit. Also, I was wrong before - I do have a directive for memory_limit. It is 8M I think this only has effect if php was compiled with --enable-memory-limit. Regardless, this doesn't explain why I can't upload a file that exceeds 2M, except that I don't seem to be able to reset upload_max_filesize to greater than 2M. You mean you set it in php.ini and phpinfo() reports something different? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* The things that interest people most are usually none of their business. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Max File Size
Jason Wong responded Wednesday, December 04, 2002 10:24 PM On Thursday 05 December 2002 10:14, Roger Lewis wrote: Thanks for the suggestion. I'll try ini_set although I'm not yet certain of how to use it. As has already been pointed out, the uploads take place *before* your script is run. The manual has table which shows what you can and cannot change using ini_set(). THE place to change it is in php.ini. I checked again and post_max_size is not in my php.ini, but perhaps I should just add it. Perhaps you should indeed. I think it defaults to 2M, so if you haven't set it 2MB is your limit. Also, I was wrong before - I do have a directive for memory_limit. It is 8M I think this only has effect if php was compiled with --enable-memory-limit. Regardless, this doesn't explain why I can't upload a file that exceeds 2M, except that I don't seem to be able to reset upload_max_filesize to greater than 2M. You mean you set it in php.ini and phpinfo() reports something different? -- Jason Wong - Gremlins That's what I've been trying to say, Jason. I set upload_max_filesize in php.ini to 8M, 800, or any other number, restart Apache, and the reset seems to be ignored. When looking at phpinfo, upload_max_filesize is *always* 2M. Adding the directive post_max_size = 16M to my php.ini did nothing except change my include_path settings ?%!?!*. (I can see in phpinfo that the default is 8M, but there is no setting in my php.ini) In reply to Tom's comment, there is no difference between master and local settings; however, there are no separate settings in my php.ini either. Do you have any other thoughts on this? Regards, Roger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max file size on uploading files
On Thursday 28 November 2002 02:02, Nick Wilson wrote: Hi all, I must be missunderstanding something here, I have this in an php 'upload form': input type=hidden name=MAX_FILE_SIZE value=10 So why won't it upload a 1.5MB file? manual - Handling File Uploads -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Leave no stone unturned. -- Euripides */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max file size on uploading files
* and then Jason Wong declared On Thursday 28 November 2002 02:02, Nick Wilson wrote: Hi all, I must be missunderstanding something here, I have this in an php 'upload form': input type=hidden name=MAX_FILE_SIZE value=10 So why won't it upload a 1.5MB file? manual - Handling File Uploads Why don't you just not reply? -- It's the first place I went I must be missunderstanding something --- Every time I post here you come along with some rude unhelpfull comment. Go and annoy someone else, I'm here to ask for help not rude unhelpful comments (again, and again and again) -- Nick Wilson // www.tioka.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] max file size on uploading files
One problem may be your browser timing out before the end of the script. Another may be (although I'm not 100% sure) is that the file excedes the max memory set aside by PHP. Robbert van Andel -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 27, 2002 10:03 AM To: php-general Subject: [PHP] max file size on uploading files Hi all, I must be missunderstanding something here, I have this in an php 'upload form': input type=hidden name=MAX_FILE_SIZE value=10 So why won't it upload a 1.5MB file? Many thanks -- Nick Wilson // www.tioka.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max file size on uploading files
On Thursday 28 November 2002 02:40, Nick Wilson wrote: * and then Jason Wong declared On Thursday 28 November 2002 02:02, Nick Wilson wrote: Hi all, I must be missunderstanding something here, I have this in an php 'upload form': input type=hidden name=MAX_FILE_SIZE value=10 So why won't it upload a 1.5MB file? manual - Handling File Uploads Why don't you just not reply? -- It's the first place I went I must be missunderstanding something --- Every time I post here you come along with some rude unhelpfull comment. Did you read the manual then? The bit after the 1st paragraph Related Configurations Note ?? How about the section on Common Pitfalls? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Existence of programs that do the impossible is not a proof that that impossible is now possible. - Tigran Aivazian */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max file size on uploading files
At 19:02 27.11.2002, Nick Wilson spoke out and said: [snip] Hi all, I must be missunderstanding something here, I have this in an php 'upload form': input type=hidden name=MAX_FILE_SIZE value=10 So why won't it upload a 1.5MB file? [snip] I can just guess here... you've got 1 billion in max_file_size, maybe this is way too big for the browser's (integer?) math? Does it upload without max_file_size? Did you try setting max_file_size to 1572864 (which is exactly 1.5 MB)? I found no mention of problems _refusing_ upload (except size exceeds, of course) in the online manual. I only found that browsers can be directrd to easily circumvent the limit (save html locally, edit form action to point to your server, edit max_file_size, and there you go...) Try the above hints and tell us about the outcome. -- O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/
Re: [PHP] max file size on uploading files
At 19:45 27.11.2002, Jason Wong spoke out and said: [snip] Did you read the manual then? The bit after the 1st paragraph Related Configurations Note ?? [snip] Jason, you may be a genius programmer, but you certainly lack style and social skills. -- O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/
Re: [PHP] max file size on uploading files
* and then Ernest E Vogelsinger declared I can just guess here... you've got 1 billion in max_file_size, maybe this is way too big for the browser's (integer?) math? Does it upload without max_file_size? Did you try setting max_file_size to 1572864 (which is exactly 1.5 MB)? Nope, that doesn't do it Try the above hints and tell us about the outcome. Well, I checked the php.ini and all the other things that could possibly go wrong *before I originally posted* but have now done it again. No joy there either ;-( Next step, try the script on another machine I guess Thnaks for the help Ernest... -- Nick Wilson // www.tioka.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max file size on uploading files
* and then Nick Wilson declared Next step, try the script on another machine I guess Thnaks for the help Ernest... Could it be an Apache 2.0 thing? -- just upgraded. THis is what I get: Request entity too large! The POST method does not allow the data transmitted, or the data volume exceeds the capacity limit. If you think this is a server error, please contact the webmaster Error 413 Thanks... -- Nick Wilson // www.tioka.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max file size on uploading files
At 20:12 27.11.2002, Nick Wilson spoke out and said: [snip] Request entity too large! The POST method does not allow the data transmitted, or the data volume exceeds the capacity limit. If you think this is a server error, please contact the webmaster Error 413 [snip] Ooops - you should normally only get this with GET requests where the max. query string size is exceeded - I'd check the Apache docs though... seems positively to be connected to the web server. Simple check - write some log file at the very beginning of your script to see if the web server runs your script, or not (what I assume). -- O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/
Re: [PHP] max file size on uploading files
* and then Van Andel, Robert declared One problem may be your browser timing out before the end of the script. Another may be (although I'm not 100% sure) is that the file excedes the max memory set aside by PHP. Thanks Robert, that's not it though -- Nick Wilson // www.tioka.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max file size on uploading files
At 20:11 27.11.2002, Ernest E Vogelsinger spoke out and said: [snip] Ooops - you should normally only get this with GET requests where the max. query string size is exceeded - I'd check the Apache docs though... seems positively to be connected to the web server. [snip] wrong. From RFC2616 (http://ftp.rfc-editor.org/in-notes/rfc2616.txt): 10.4.14 413 Request Entity Too Large The server is refusing to process a request because the request entity is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request. If the condition is temporary, the server SHOULD include a Retry- After header field to indicate that it is temporary and after what time the client MAY try again. 10.4.15 414 Request-URI Too Long The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret. This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into a URI black hole of redirection (e.g., a redirected URI prefix that points to a suffix of itself), or when the server is under attack by a client attempting to exploit security holes present in some servers using fixed-length buffers for reading or manipulating the Request-URI. Error 413 certainly denotes that the web server refuses to handle the request. No idea how to configure this value but I'm sure it can be done with Apache. I see a better chance of getting this answere on the apache mailing list. -- O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/
Re: [PHP] max file size on uploading files
At 20:18 27.11.2002, Ernest E Vogelsinger spoke out and said: [snip] Error 413 certainly denotes that the web server refuses to handle the request. No idea how to configure this value but I'm sure it can be done with Apache. I see a better chance of getting this answere on the apache mailing list. [snip] I should check first and holler later. From the Apache docs (1.3.2): LimitRequestBody directive Syntax: LimitRequestBody bytes Default: LimitRequestBody 0 Context: server config, virtual host, directory, .htaccess Status: core Compatibility: LimitRequestBody is only available in Apache 1.3.2 and later. This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body. The default value is defined by the compile-time constant DEFAULT_LIMIT_REQUEST_BODY (0 as distributed). The LimitRequestBody directive allows the user to set a limit on the allowed size of an HTTP request message body within the context in which the directive is given (server, per-directory, per-file or per-location). If the client request exceeds that limit, the server will return an error response instead of servicing the request. The size of a normal request message body will vary greatly depending on the nature of the resource and the methods allowed on that resource. CGI scripts typically use the message body for passing form information to the server. Implementations of the PUT method will require a value at least as large as any representation that the server wishes to accept for that resource. This directive gives the server administrator greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks. If, for example, you are permitting file upload to a particular location, and wich to limit the size of the uploaded file to 100K, you might use the following directive: LimitRequestBody 102400 [snip] Try this directive if you have access to the server configuration. If you have only a virtual directory you might also use your .htaccess file, provided the directory has been configured using AllowOverride Limit, or AllowOverride All. -- O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/
Re: [PHP] max file size on uploading files
On Wed, 27 Nov 2002, Nick Wilson wrote: * and then Nick Wilson declared Next step, try the script on another machine I guess Thnaks for the help Ernest... Could it be an Apache 2.0 thing? -- just upgraded. THis is what I get: That's actually a downgrade these days. I'd strongly suggest sticking with Apache 1.3.x for the time being. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max file size on uploading files
* and then Ernest E Vogelsinger declared At 20:18 27.11.2002, Ernest E Vogelsinger spoke out and said: [snip] Error 413 certainly denotes that the web server refuses to handle the request. No idea how to configure this value but I'm sure it can be done with Apache. I see a better chance of getting this answere on the apache mailing list. [snip] I should check first and holler later. From the Apache docs (1.3.2): Many thanks Ernest. It works fine on my hosts machine running 1.3 so I'll downgrade my version as well, as rasmus has pointed out Thanks for all your help ;-) -- Nick Wilson // www.tioka.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max file size of 2 bytes exceeded
On Monday 02 April 2001 10:44, you wrote: Hi guys, I seem to be having a problem uploading images. My server is running on FreeBSD and i am using PHP ver 4 I have checked all the settings in my php.ini file. max_execution_time = 30 memory_limit = 8M post_max_size = 8M file_uploads = On upload_max_filesize = 2M Warning: Max file size of 2 bytes exceeded - file [image1] not saved in Unknown on line 0 PHP doesn't process the "M". Specify the sizes in bytes -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Pretty cool, the kind of power information technology puts in our hands these days. - Securityfocus on probing 3600 hosts for known problems in 3 weeks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]