473,406 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Increasing upload file limits ?

My hosting company has a default 2M limit on file uploads.
I tried to override this using .htaccess containing line
php_value upload_max_filesize 8388608
But placing this in the upload script folder causes apache errors when
serving scripts in that folder. The error states something like "php_value
not recognized as valid"
In the end I created a php.ini file containing line
upload_max_filesize = 8M
which I placed in the folder containing the upload script.
This works ok but why ? I cannot find any reference to using this approach
to override global php.ini directives ?
Jul 15 '08 #1
4 1369
..oO(Tony B)
>My hosting company has a default 2M limit on file uploads.
I tried to override this using .htaccess containing line
php_value upload_max_filesize 8388608
But placing this in the upload script folder causes apache errors when
serving scripts in that folder. The error states something like "php_value
not recognized as valid"
PHP directives in the .htaccess are only possible if PHP is installed as
a server module. With (Fast)CGI this won't work.
>In the end I created a php.ini file containing line
upload_max_filesize = 8M
which I placed in the folder containing the upload script.
This works ok but why ? I cannot find any reference to using this approach
to override global php.ini directives ?
Some hosts allow a custom php.ini, usually placed in the document root
or one level above.

Micha
Jul 15 '08 #2
Tony B wrote:
My hosting company has a default 2M limit on file uploads.
I tried to override this using .htaccess containing line
php_value upload_max_filesize 8388608
But placing this in the upload script folder causes apache errors when
serving scripts in that folder. The error states something like "php_value
not recognized as valid"
In the end I created a php.ini file containing line
upload_max_filesize = 8M
which I placed in the folder containing the upload script.
This works ok but why ? I cannot find any reference to using this approach
to override global php.ini directives ?
What are you actually putting in the .htaccess file?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 15 '08 #3
"Jerry Stuckle" <js*******@attglobal.netwrote in message
news:g5**********@registered.motzarella.org...
Tony B wrote:
>My hosting company has a default 2M limit on file uploads.
I tried to override this using .htaccess containing line
php_value upload_max_filesize 8388608
But placing this in the upload script folder causes apache errors when
serving scripts in that folder. The error states something like
"php_value not recognized as valid"
In the end I created a php.ini file containing line
upload_max_filesize = 8M
which I placed in the folder containing the upload script.
This works ok but why ? I cannot find any reference to using this
approach to override global php.ini directives ?

What are you actually putting in the .htaccess file?
php_value upload_max_filesize 8388608
is the only text in the file.

Tony
Jul 15 '08 #4
Tony B wrote:
"Jerry Stuckle" <js*******@attglobal.netwrote in message
news:g5**********@registered.motzarella.org...
>Tony B wrote:
>>My hosting company has a default 2M limit on file uploads.
I tried to override this using .htaccess containing line
php_value upload_max_filesize 8388608
But placing this in the upload script folder causes apache errors when
serving scripts in that folder. The error states something like
"php_value not recognized as valid"
In the end I created a php.ini file containing line
upload_max_filesize = 8M
which I placed in the folder containing the upload script.
This works ok but why ? I cannot find any reference to using this
approach to override global php.ini directives ?
What are you actually putting in the .htaccess file?
php_value upload_max_filesize 8388608
is the only text in the file.

Tony
Tony,

It looks OK. Sounds like your host has disabled it in the .htaccess
file. They obviously don't want you uploading large files via http.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 15 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jerry Camel | last post by:
I'm using the file upload control form the HTML tab in VS. I can upload small files successfully, but if I try to upload larger files, say 300MB, the upload fails and I get "Page could not be...
8
by: Uncle Ben | last post by:
I'm looking for an ASP.NET solution which will allow my website to receive huge files in the size of 4GB and up. This solution needs to be integrated with a front-end. Users will have to...
2
by: Joseph Geretz | last post by:
I'm developing a Web Service using DIME to download and upload files from and to an IIS server. In order to increase the download filesize to unlimited, I have the following block in my App.config...
1
by: Redapple | last post by:
Hello everybody, Im a beginner in PHP and i'm thinking how i can make more things on my own made upload script: Sorry if this is the wrong forum or if its not allowed to ask for script...
1
by: walterbyrd | last post by:
If so, why? My webhoster, dreamhost, just informed me that my php apps can not upload files over 7mb, because of a PHP limitation. I don't know a lot about it, but I thought those limits were...
5
chunk1978
by: chunk1978 | last post by:
hi there... i have the following codes (HTML and PHP) on my Apache Localhost: HTML: titled "Form.html" <form enctype="multipart/form-data" action="uploader.php" method="POST"> <input...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
16
by: Lawrence Krubner | last post by:
To guard against our users possibly uploading huge files, I've got this in my php.ini file: ; Maximum size of POST data that PHP will accept. post_max_size = 10M On a server running Ubuntu...
2
by: =?Utf-8?B?TWlrZSBLcmFsZXk=?= | last post by:
In my ASP.NET application, I'd like to set limits on the maximum size of an uploaded file. Normally I'd just set the maxRequestLength of the httpRuntime element in web.config. But in this case,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.