1 (edited by Frank H 2003-09-04 14:27)

Topic: Linux configuration, php and mysql for file uploads

Well I'm putting up my new server with redhat, and I will run apache, php and mysql on it also ... everything is working splendid, the attachment mod is moved to 1.0.1, but I cannot get larger files to upload, and I want to be able to be sure that everything work before I release the mod sad

in php.ini I have altered so that I have:

file_uploads=1
memory_limit=110M
post_max_size=105M
upload_max_filesize=100M

and in my.cnf I have

[mysqld]
set-variable = max_allowed_packet=100M

does anyone have an idea why I only can upload smaller files, and put them onto the database, but as soon as I try with a larger file, let say 1mb I click 'Submit' and I get the error page for not beeing able to find the server (the IE default page, not the errorpage from apache) ... instantly, so it's not an timeout problem sad

Re: Linux configuration, php and mysql for file uploads

Do you have the hidden field MAX_FILE_SIZE in your upload form?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Linux configuration, php and mysql for file uploads

yep

<input type="hidden" name="MAX_FILE_SIZE" value="10000000"><input type="file" name="attached_file" size="80" tabindex="3">

in front of the file input field, as it should be

4 (edited by Frank H 2003-09-04 15:25)

Re: Linux configuration, php and mysql for file uploads

phpmyadmin confirms that the max_allowed_packet is set to max
(from mysql manual: "The protocol limits for max_allowed_packet is 16M in MySQL 3.23 and 1G in MySQL 4.0")

max_allowed_packet   16776192

i.e. 16Mb ... but I cannot upload a 1mb file so far ...

Re: Linux configuration, php and mysql for file uploads

Hmm, a tricky one. Do you get anything in the apache error log about it?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6 (edited by Frank H 2003-09-04 17:32)

Re: Linux configuration, php and mysql for file uploads

duh ... there it was something ... so it was apache ... hmm...

[Thu Sep 04 19:05:27 2003] [error] [client xxx.xxx.xxx.xxx] Requested content-length of 787231 is larger than the configured limit of 524288, referer: http://www.xxx.com/forum/post.php?tid=152

Thanks Kennel, now I just have to find where in the apache that's configured tongue

Edit: I guess it's something from this http://httpd.apache.org/docs-2.0/mod/core.html#limit

Re: Linux configuration, php and mysql for file uploads

You will want to have a look at this: http://httpd.apache.org/docs/mod/core.h … equestbody

Re: Linux configuration, php and mysql for file uploads

yep ... was restarting apache when I refreshed the foru m... that's what I've altered ... hopefully it will work

Re: Linux configuration, php and mysql for file uploads

used that, both within the <directory> , <virtual host> and outside ... but didn't affect it ... sad

I'm giving up for today ... dunno how many hours I've spent on it today ... I just hope that I don't have to recompile the whole thingie hmm

Re: Linux configuration, php and mysql for file uploads

Which apache version are you running?

11 (edited by Frank H 2003-09-05 08:18)

Re: Linux configuration, php and mysql for file uploads

Apache/2.0.40 ... but I found the string now ... it was in /etc/httpd/conf.d/php.conf ... setting that max limit to all php files ... and my <directory> statement obv didn't overrule it smile


sometimes it's good to use the extended server-info ... as I saw that that line was defined, and then I remembered about the included conf files for mysql, php etc smile

currrently restarting ... to see if it solved it...

Edit:

wee...

Attachment: toyota_le_mans_98.zip   Size: 1,483,273 bytes     Downloads: 0

I managed to get something over 512kb uploaded ... time to finish up the attachment mod ...

but after I've gone to the univ and fixed the papers I need to fill in for my Master thesis ...

Thanks all who helped! :up:

12 (edited by RNilsson 2003-09-05 11:21)

Re: Linux configuration, php and mysql for file uploads

Oh, sorry then, the link i found was for 1.3 (the version i'm running)

And good you solved it, keep the good work up smile

Re: Linux configuration, php and mysql for file uploads

if you look in the link I posted in the message above yours' you'll see thet they're referring to the same place in each documentation ... only thing was that I used the url for the start of the <Limit> statements, and you to the specific LimitRequestBody that was the value that needed to be increased (although I disabled it, by putting it to 0)

so it's the same for both versions... and the thing that annoyed me for a whole day big_smile