#17606 [Csd]: File upload fails on large files

From: Date: Thu, 12 Dec 2002 15:12:41 +0000
Subject: #17606 [Csd]: File upload fails on large files
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27489@lists.php.net to get a copy of this message
ID: 17606 User updated by: luimarma@iti.upv.es Reported By: luimarma@iti.upv.es Status: Closed Bug Type: HTTP related Operating System: RedHat 7.3 PHP Version: 4.2.1 New Comment: It is very strange, I have been working OK uploading big files, also with the version you are using. I can only advice you 3 things more to check. 1.- Check that you dont override tmp dir and upload max file size on the script or includes of your problem machine. 2.- Diff the config files (you have already done this as you can swap them between machines) 3.- Check which files the httpd process and its children are using while uploading to see where it is stored tmp. 4.- Check that php.ini is readable. Previous Comments: ------------------------------------------------------------------------ [2002-12-12 08:42:29] mlampard@excite.com One php.ini file in /usr/local/lib. Been through all that - removed all previous (redhat standard install) incarnations of php. Doing a line by line comparison on the two boxes using phpinfo() shows they are configured identically also. The one box will just not write to the upload_tmp_dir, even when I chmod that directory to 777. I've changed the apache user and group thinking it may have been a wierd permissions problem. Not much memory in the box, but it doesn't fill up and swap is basically unused. ------------------------------------------------------------------------ [2002-12-12 03:28:26] luimarma@iti.upv.es Are you sure that both machines are using the equal compiled php version?, please double check with locate how many php.ini files do you have on the problem machine and to which is your php pointing at. ------------------------------------------------------------------------ [2002-12-11 14:29:44] mlampard@excite.com I think you closed this "bug" prematurely! I have two very similar machines - both running PHP 4.2.3 and apache 1.3.26 on Redhat Linux 2.4.7-10 (7.1). I have an upload script and can upload ANY size file to one machine, but am limited to about 9mb on the other box. The php.ini and httpd.conf files are identical (actually, I swapped them over just for the hell of it). I've even swapped the libphp4.so files in the apache libexec directory, between boxes! If this isn't a bug, why does the upload work flawlessly on one machine, but not the other? It will not write to the /tmp directory (or any directory, no matter what I set upload_tmp_dir to) on the one box, but does on the other. Permissions and apache user/group are identical across boxes. It has me stumped! It should either work on both, or neither! ------------------------------------------------------------------------ [2002-06-10 03:24:45] luimarma@iti.upv.es Well, I have been doing more tests and it seems that the system memory that is being used is for the catching of the filesystem. I dont know if it is a good thing that so many memory is eaten just for file catching but this is an operating system issue and not php related bug so If everyone agrees I close the bug. Regarding last message from Dreoth@houston.rr.com, did you double check the values for the php.ini file, related with post and file uploading? Remenber that post limit should be at least filesize+size of php script. memory_limit = ?? post_max_size = ?? file_uploads = On upload_max_filesize = ?? allow_url_fopen = On ------------------------------------------------------------------------ [2002-06-08 00:51:26] Dreoth@houston.rr.com I'm using debian with a packaged release of 4.2.1 I'm having the same problem with large uploads, 12 MB files. It will upload to the tmp directory, but fails to move it out of there to where I desire. It eats system memory as well. I've tried moving the uploaded file to a directory (checked the permissions so on and so forth) as well as moving the uploaded file into a mysql database as binary information. Nothing works. It uploads but wont do anything with it ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17606 -- Edit this bug report at http://bugs.php.net/?id=17606&edit=1

« previous php.bugs (#27489) next »