Jump to content


Photo

Upload_max_filesize .htaccess


  • Please log in to reply
21 replies to this topic

#1 markhightower

markhightower
  • Members
  • 4 posts

Posted 03 May 2005 - 09:43 PM

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

#2 TCH-Andy

TCH-Andy

    Immediate Family

  • Members
  • PipPipPipPip
  • 4,699 posts

Posted 04 May 2005 - 12:53 AM

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 ?
Andy Beckett
-----------------
Part of the TCH family since the beginnings of time.

#3 TweezerMan

TweezerMan

    Immediate Family

  • Members
  • PipPipPipPip
  • 1,763 posts

Posted 04 May 2005 - 01:05 AM

Welcome to the forums, Mark! :lol:
David Phillips (TweezerMan)
The Tweezer's Edge v3

#4 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 19,960 posts

Posted 04 May 2005 - 07:16 AM

Welcome to the forums Mark :lol:

Bruce Richards
Forum Moderator
TotalChoice Hosting, Inc.
Webhosting by Total Choice Web Hosting - General Support Forum

I am a Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.


#5 TCH-Thomas

TCH-Thomas

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 14,908 posts

Posted 04 May 2005 - 08:11 AM

Welcome to the forum, Mark. :lol:

Thomas Jikrantz
Forum Moderator
TotalChoice Hosting, Inc.

Any links or suggestions for third party software/sites should be used at your own risk. My opinions and recommendations are not necessary those of TCH and TCH is not responsible.

As a Forum Moderator I can assist in answering many of your hosting related questions. However, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.
Web Hosting by Total Choice Web Hosting - 24/7 Help Desk


#6 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 04 May 2005 - 11:36 AM

Welcome to the forums, Mark :)

#7 markhightower

markhightower
  • Members
  • 4 posts

Posted 04 May 2005 - 03:40 PM

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 ?

<{POST_SNAPBACK}>



#8 TCH-Andy

TCH-Andy

    Immediate Family

  • Members
  • PipPipPipPip
  • 4,699 posts

Posted 04 May 2005 - 04:28 PM

Hi Mark,

Can you give us a link or something ?

Where are you getting the errors? On trying to upload the file? Does the script work OK for small files?
Andy Beckett
-----------------
Part of the TCH family since the beginnings of time.

#9 markhightower

markhightower
  • Members
  • 4 posts

Posted 04 May 2005 - 09:29 PM

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

#10 TCH-Andy

TCH-Andy

    Immediate Family

  • Members
  • PipPipPipPip
  • 4,699 posts

Posted 05 May 2005 - 01:30 AM

Hi Mark,

If you PM me a link, I'll take a look.
Andy Beckett
-----------------
Part of the TCH family since the beginnings of time.

#11 markhightower

markhightower
  • Members
  • 4 posts

Posted 05 May 2005 - 02:32 PM

Here is a sample link that should work. http://www.rcautomat...t_downloads.php

#12 seancb

seancb

    New To The Neighborhood

  • Members
  • Pip
  • 21 posts

Posted 17 June 2005 - 09:29 AM

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?

#13 norma-aguilera

norma-aguilera

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

Posted 22 March 2007 - 12:04 AM

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, 22 March 2007 - 12:07 AM.


#14 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 22 March 2007 - 12:20 AM

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.

#15 norma-aguilera

norma-aguilera

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

Posted 22 March 2007 - 12:29 AM

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!

#16 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 22 March 2007 - 12:38 AM

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.

#17 norma-aguilera

norma-aguilera

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

Posted 22 March 2007 - 01:17 AM

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, 22 March 2007 - 01:19 AM.


#18 TCH-Don

TCH-Don

    Immediate Family

  • Members
  • PipPipPipPip
  • 11,642 posts

Posted 22 March 2007 - 01:26 AM

are you using a script or ftp ?

Have you tried using file manager in your cpanel?

#19 norma-aguilera

norma-aguilera

    New To The Neighborhood

  • Members
  • Pip
  • 15 posts

Posted 22 March 2007 - 01:32 AM

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

#20 TCH-Bruce

TCH-Bruce

    Volunteer Moderator

  • Members
  • PipPipPipPip
  • 19,960 posts

Posted 22 March 2007 - 07:16 AM

I would check with the help desk. There is a limit to the size of files that can be uploaded even with FTP.

Bruce Richards
Forum Moderator
TotalChoice Hosting, Inc.
Webhosting by Total Choice Web Hosting - General Support Forum

I am a Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.


#21 cristian25m

cristian25m
  • Members
  • 1 posts

Posted 09 January 2010 - 02:29 PM

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, 09 January 2010 - 02:30 PM.


#22 boorsekala

boorsekala
  • Members
  • 1 posts

Posted 15 July 2012 - 06:48 AM

if you decided to can not all users write in .htaccess dont allow ovveride for all users and just put code to httpd.conf of apache and restart server




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users