Re: File Upload Problems

From: Date: Wed, 11 Aug 2004 21:37:09 +0000
Subject: Re: File Upload Problems
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-193509@lists.php.net to get a copy of this message
On 11 Aug 2004 21:30:38 -0000, Mark Collin <mark@ardescosolutions.co.uk> wrote: > (Sorry if this is a repost, had some problems with my news client not > sending properly) > > Thanks for the pointers Raditha, unfortunately I still can't get it > working. > > I have been banging away at this for a few days now, and I currently > have the following my script: > > ini_set(max_execution_time, 600); > ini_set(max_input_time, 600); > > also tried > > set_time_limit(600) > > The following displaying in phpinfo(): > > upload_max_filesize 2M > post_max_size 8M > memory limit 8M > > and in an .htaccess file in the directory. > > LimitRequestBody 2000000 > > httpd.conf does not have LimitRequestBody set. > > I either get a white screen with no errors displayed or a 404 page and > really cannot work out what is going on. > > Does anybody have any other ideas as to where I may have gone wrong ? > > "jabber@raditha.com" <jabber@raditha.com> wrote in message > news:4112D933.3060508@raditha.com: > > > > Mark Collin wrote: > > > > >I'm having problems with my file upload code. If I start to upload > > >files larger than a approx 400k the page seems to time out and I get a > > >page cannot be displayed error. > > >I have checked the php.ini on the server and max file size is 2Mb and > > >max Post size is 8Mb. > > > > > > > > > > > This is typical of the default setting for LimitRequestBody directive of > > > > apache - which is set to 512kb please look at your httpd.conf file and > > see if this is set - just deleting that line would do. If it still does > > not work you might find this link usefull > > http://www.radinks.com/upload/config.php - it shows how to > > configure php > > > > for handling large uploads. > > > > > > > > > 1) Have you checked the temp dir where these files are uploaded? Is it perhaps full? 2) Are the images you're uploading the right format? GD can't read non-RGB jpegs, for instance. 3) Are the file names strange at all? Filenames with spaces or special / international chars can cause problems. 4) Have you checked memory usage while the script is running? If you're in Linux, use "top" on the command-line. 5) Have you checked the Apache logs? Specifically, look int he error log for crashes. If it's crashing, you've probably hit your memory limit or a bug in PHP or GD. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#193509) next »