Jump to content

Upload_max_filesize .htaccess


markhightower

Recommended Posts

I have a webpage where I need to allow customers to upload large ( up to 50MB) files to a folder on the server. FTP is not an option for some of these users so it needs to be a web page. Right now files that are about 8MB's or lower work fine but larger ones fail. I have tried changing the .htaccess page with the following code snipets...

 

1.

upload_max_filesize

php_value post_max_size 22M

php_value upload_max_filesize 10M

 

 

2.

<IfModule mod_php4.c>

php_value upload_max_filesize 50M

</IfModule>

 

I have read that the php.ini file needs to be changed but I do not have access to do that. The above 2 code snipets supposedly should work but they dont allow for very large files.

 

Any help would be appreciated.

 

Thanks,

 

Mark

Link to comment
Share on other sites

Hi Mark,

 

Welcome to the forums :lol:

 

You will probably also need to increase the max_execution_time for files of that size.

 

php_value upload_max_filesize 50M

php_value max_execution_time 800

 

If you are trying to upload to mySQL, that may well be giving separate errors. What errors are you getting ?

Link to comment
Share on other sites

Using Firefox, I get a pop-up window error stating that the file contains no data. In IE i get page cannot be displayed error. I will try the execution time statement.

 

Thanks,

 

Mark

 

 

 

 

Hi Mark,

 

Welcome to the forums :clapping:

 

You will probably also need to increase the max_execution_time for files of that size.

 

php_value upload_max_filesize 50M

php_value max_execution_time  800

 

If you are trying to upload to mySQL, that may well be giving separate errors. What errors are you getting ?

Link to comment
Share on other sites

Yes. The upload works fine with anything smaller than 8MB's. I have uploaded several files already........as long as they are approx 8 MB's or smaller.

 

This is part of the form on the initial page:

<form enctype="multipart/form-data" action="ge_uploads.php" method="POST">

<!-- MAX_FILE_SIZE must precede the file input field -->

<input type="hidden" name="MAX_FILE_SIZE" value="50000000" />

 

This is the .htaccess code:

<IfModule mod_php4.c>

php_value upload_max_filesize 50M

php_value max_execution_time 800

</IfModule>

 

 

 

The pop up error in FireFox says "Document contains no data".

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
I put this in mt htaccess in the root of my public_html folder and it works for me:

php_value upload_max_filesize 50m

 

make sure your htaccess is saved in unix text format and not dos perhaps?

 

 

 

I am having the same problem. Small files are uploaded it, but bigger files than 8MB give an error page.

The error page that I get is the:

"The page cannot be displayed"

 

This is what I have on my .htaccess.1174279632

 

This .htaccess file is located both in my root public directory and my upload directory.

 

php_value upload_max_filesize 100MB

php_value max_execution_time 800

 

If anyone can help me, I can send them the link and username/password.

 

Thanks!

Norma

Edited by norma-aguilera
Link to comment
Share on other sites

Norma please do not give out your user / password to anyone except to the help desk

unless you know and trust the person.

 

This is what I have on my .htaccess.1174279632

the file must be named

.htaccess

and thats all

what you are looking at looks like a backup and will not be used.

 

 

If you do not see an .htaccess

then rename the file you have to

.htaccess

 

and it should work.

Link to comment
Share on other sites

Norma please do not give out your user / password to anyone except to the help desk

unless you know and trust the person.

the file must be named

.htaccess

and thats all

what you are looking at looks like a backup and will not be used.

If you do not see an .htaccess

then rename the file you have to

.htaccess

 

and it should work.

 

 

It didn't worked. I rename the file both in my root and the upload web page, but it still didn't work.

At this point, I am only trying to upload ZIP files. Do you know if there is any constraints on the zip files sizes?

 

Thanks!

Link to comment
Share on other sites

It didn't worked. I rename the file both in my root and the upload web page, but it still didn't work.

At this point, I am only trying to upload ZIP files. Do you know if there is any constraints on the zip files sizes?

 

Thanks!

 

 

I also tried adding these files to the .htaccess file but it didn't worked.

I picked these values because I read on another thread (outside TCH) that these values also need to be updated.

 

 

php_value upload_max_filesize 100M

php_value max_execution_time 800

php_value post_max_size 100M

php_value max_input_time 100

php_value memory_limit 120M

 

By the way, my goal is to upload files up lot 100MB each. My sites sells digital scrapbooks and the files are zipped.

Some of the files are much smaller, like 50MB each but sometimes the entire kit is on a single file and it could be as large

as 100 MB.

 

 

Thanks!

Norma

Edited by norma-aguilera
Link to comment
Share on other sites

Not that I know of

I have uploaded many large zip files

some as large as 60 megs but that is with ftp

 

are you using a script or ftp

 

if ftp then the .htacces file should not matter.

 

 

I am using my own upload web page (script). I can't use the ftp program because:

1) I couldn't propertly install it and upload anything to my site with them

2) I will have to ask each designer to install a particular ftp script version and I prefer not to do that.

 

Thanks!

Norma

Link to comment
Share on other sites

  • 2 years later...

Hi Mark,

 

Welcome to the forums :)

 

You will probably also need to increase the max_execution_time for files of that size.

 

php_value upload_max_filesize 50M

php_value max_execution_time 800

 

If you are trying to upload to mySQL, that may well be giving separate errors. What errors are you getting ?

 

 

Hy i have the same problem whit my .htaccess wen i try to add thos line upload_max_filesize = 100M

i weck up whit this error wen i modifie my .htaccess in the cpanel edit

 

 

open .htaccess failed: Permission denied at cpanel.pl line 667

Carp::croak('open .htaccess failed: Permission denied') called at /usr/local/cpanel/Cpanel/Fileman.pm line 1139

Cpanel::Fileman::fmsavefile('%2fhome2%2fcristi%2fpublic_html', '.htaccess', 'RewriteEngine On^M^JRewriteBase /^M^J^M^J#uploaded files^M^JRewriteRule ...', '', 1) called at cpanel.pl line 667

main::__ANON__('%2fhome2%2fcristi%2fpublic_html', '.htaccess', 'RewriteEngine On^M^JRewriteBase /^M^J^M^J#uploaded files^M^JRewriteRule ...', '', 1) called at cpanel.pl line 1789

main::exectag('<cpanel Fileman="fmsavefile($FORM{\'dir\'},$FORM{\'file\'},$FORM...') called at cpanel.pl line 4808

main::dotag(undef) called at cpanel.pl line 4691

main::cpanel_parseblock('SCALAR(0x91a0700)') called at cpanel.pl line 4643

main::cpanel_parse('GLOB(0xae0c4dc)') called at cpanel.pl line 1318

 

 

wen i modifie the file and upload him whit filazilla my wordpress mu dont work enemore my hole website is down i dont now way

my webhost company they say that i can modifie this value 128mb so can you help me plz

 

and i dont have any filezise limit to my ftp upload but i ned this for my users

Edited by cristian25m
Link to comment
Share on other sites

  • 2 years later...

Join the conversation

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

Guest
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...