Jump to content

Recommended Posts

Posted

Hi I'm trying to upload large files, around 20 Mb, but so far I have only been able to upload files up to 8 Mb, I made the following modifications in the .htaccess file:

 

php_value upload_max_filesize 20M

php_value post_max_size 20M

php_value max_execution_time 200

php_value max_input_time 200

 

I'm getting a 413 error message with the following text:

 

Request Entity Too Large

The requested resource

/upload.php

does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

 

What can I do? FTP files is not an option, any suggestions?

Posted

According to this:

 

"All the configuration settings for your PHP installation are contained in the php.ini file. Sometimes these setting might be overridden by directives in apache .htaccess files or even with in the scripts themselves. However you cannot override the settings that affect file uploads with .htaccess directives or inside scripts in this way."

 

So it looks I'm stuck with the max post size, which is 8Mb.

 

I'm thinking this setting only applies for PHP, what about Perl? Has someone tried to upload files bigger than 8 megs using a CGI on TCH?

Posted

I have been modifying the htaccess file:

 

php_value upload_max_filesize 20M

php_value post_max_size 20M

php_value memory_limit 40M

php_value max_input_time 2400

php_value max_execution_time 2400

 

Still no success. Any other suggestion? :lol2:

Posted

Is your .htaccess located in the root of where you need the changes? (in your case it would appear to be your filedepot directory if I'm looking at the right site)

 

You could try putting a file in the directory your upload script resides that has "<?php phpinfo(); ?>" in it and check that your settings are taking effect properly.

 

I am also noticing your form has this in it:

>								<div id="input_boxes">
								<input type="hidden" name="MAX_FILE_SIZE" value="2621440" />
								<input type=file name=fileup_0 size="70">
							</div>

 

Without knowing your upload.php code though I don't know what affect that has.

Posted

Yes, you are looking at the right site. The htaccess file is located on the root directory for that subdomain, I have already tried the phpinfo() page to gather info.

 

The limit on the HTML code is not being enforced on the upload page.

 

I haven't got the chance to work on this today. But I hope I'm able to do some more tests later today...

Posted

Ok, I did some quick tests. You are right about this it was only 2.5 Mb, that was one of my last additions yesterday :) , anyway, I've modified that parameter to 20 Mb but I'm still hitting the 8 Mb limit imposed by the ini file :) .

 

I think I didn't mentioned this before, but I have already tried the phpinfo() page to gather info, that's how I learned the 8Mb defined on php.ini file.

 

Anyway, perhaps I will have to implement the upload mechanism via CGI ... :)

 

any other idea before dropping PHP on this part? :)

Posted

I forgot to mention that the line memory limit is already on the htaccess. I did after I posted.

 

Right now is like this:

 

php_value memory_limit 40M

 

 

:)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...