473,231 Members | 1,807 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,231 software developers and data experts.

Overcoming upload_max_filesize

Hi All,

Is there any way for me to overcome the php.ini configuration
upload_max_filesize? I cannot use ini_set() since upload_max_filesize can
only be set in httpd.conf or php.ini. Are there any other options?

I have an image gallery script that I wrote that will take a very large
image, and resize it down to a reasonable size for the web. This makes it
easy for me to grab very high resolution images from my camera, and just
shoot them off to the web without messing with them in a separate program.
Unfortunately, I not infrequently have images that are bigger than 2 megs,
which is the default upload_max_filesize limit.

Any ideas? Or am I stuck asking my webhost to change the
upload_max_filesize?

Sincerely,
-Josh
Jul 17 '05 #1
13 64229
"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> wrote in message
news:21*****************@nwrddc03.gnilink.net...
Hi All,

Is there any way for me to overcome the php.ini configuration
upload_max_filesize? I cannot use ini_set() since upload_max_filesize can
only be set in httpd.conf or php.ini. Are there any other options?

I have an image gallery script that I wrote that will take a very large
image, and resize it down to a reasonable size for the web. This makes it
easy for me to grab very high resolution images from my camera, and just
shoot them off to the web without messing with them in a separate program.
Unfortunately, I not infrequently have images that are bigger than 2 megs,
which is the default upload_max_filesize limit.

Any ideas? Or am I stuck asking my webhost to change the
upload_max_filesize?

Sincerely,
-Josh


Nope, there is not usually a way to overcome this.
You should ask your host if they will change the php.ini.

Regards
Richard Grove

http://shopbuilder.org - ecommerce systems
Become a Shop Builder re-seller:
http://www.affiliatewindow.com/affil...ls.php?mid=611
http://www.affiliatewindow.com/a.pl?590

Jul 17 '05 #2

"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> schreef in bericht
news:21*****************@nwrddc03.gnilink.net...

Any ideas? Or am I stuck asking my webhost to change the
upload_max_filesize?


You could try to put an .htaccess file in your website's root with the
following entry:

<IfModule mod_php4.c>
php_value upload_max_filesize 8M
</IfModule>

Besides php_value, you can also use php_flag to toggle directives which only
can be switched on or off.
JW

Jul 17 '05 #3
I think you can't without accessing the root configuration files : it's a bandwidth protection.
Install a local server, or use php alone to be able to use your script.
Jul 17 '05 #4

"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> schreef in bericht
news:21*****************@nwrddc03.gnilink.net...

Is there any way for me to overcome the php.ini configuration
upload_max_filesize? I cannot use ini_set() since upload_max_filesize can
only be set in httpd.conf or php.ini. Are there any other options?


You could try to put an .htaccess file in your website's root with the
following entry:

<IfModule mod_php4.c>
php_value upload_max_filesize 8M
</IfModule>

Besides php_value, you can also use php_flag to toggle directives which only
can be switched on or off.
JW

Jul 17 '05 #5
Joshua Beall wrote:
Hi All,

Is there any way for me to overcome the php.ini configuration
upload_max_filesize? I cannot use ini_set() since upload_max_filesize can
only be set in httpd.conf or php.ini. Are there any other options?

I have an image gallery script that I wrote that will take a very large
image, and resize it down to a reasonable size for the web. This makes it
easy for me to grab very high resolution images from my camera, and just
shoot them off to the web without messing with them in a separate program.
Unfortunately, I not infrequently have images that are bigger than 2 megs,
which is the default upload_max_filesize limit.

Any ideas? Or am I stuck asking my webhost to change the
upload_max_filesize?

I think the rest of this threads means you are out of luck changing this
property.

Why not change your process so you break the images up into chunks for
uploading, and then assemble them locally. There are all kinds of
external apps that break images into pieces, and there must be PHP code
(or even libraries) that can reassemble these pieces once received.

Jul 17 '05 #6

"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> schreef in bericht
news:21*****************@nwrddc03.gnilink.net...

Is there any way for me to overcome the php.ini configuration
upload_max_filesize? I cannot use ini_set() since upload_max_filesize can
only be set in httpd.conf or php.ini. Are there any other options?


You could try to put an .htaccess file in your website's root with the
following entry:

<IfModule mod_php4.c>
php_value upload_max_filesize 8M
</IfModule>

BTW, besides php_value, you can also use php_flag to toggle directives which
only
can be switched on or off.
JW

Jul 17 '05 #7
"clvrmnky" <cl************@coldmail.com.invalid> wrote in message
news:XP**********************@nnrp1.uunet.ca...
I think the rest of this threads means you are out of luck changing this
property.

Why not change your process so you break the images up into chunks for
uploading, and then assemble them locally. There are all kinds of
external apps that break images into pieces, and there must be PHP code
(or even libraries) that can reassemble these pieces once received.


But to do this, I would have to split the file locally, myself (unless I
misunderstand the idea); in this case it sounds like I would be better off
just resizing the image locally, instead of having to split the file.
Jul 17 '05 #8
"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:3f*********************@news.wanadoo.nl...

You could try to put an .htaccess file in your website's root with the
following entry:

<IfModule mod_php4.c>
php_value upload_max_filesize 8M
</IfModule>


Interesting... according to the PHP manual, this should not work - the
upload_max_filesize setting is supposed to only be settable in php.ini and
httpd.conf, not in .htaccess files.

But, I decided to try it anyway. And it worked! I am using PHP 4.3.4. Is
this a bug in PHP that I am able to set it in .htaccess files?

-Josh
Jul 17 '05 #9
On Tue, 16 Dec 2003 21:59:39 GMT, "Joshua Beall"
<jb****@donotspam.remove.me.heraldic.us> wrote:
"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:3f*********************@news.wanadoo.nl...

You could try to put an .htaccess file in your website's root with the
following entry:

<IfModule mod_php4.c>
php_value upload_max_filesize 8M
</IfModule>


Interesting... according to the PHP manual, this should not work - the
upload_max_filesize setting is supposed to only be settable in php.ini and
httpd.conf, not in .htaccess files.

But, I decided to try it anyway. And it worked! I am using PHP 4.3.4. Is
this a bug in PHP that I am able to set it in .htaccess files?


It's a documentation bug.

PHP 4.3.4, main/main.c:343

STD_PHP_INI_ENTRY("upload_max_filesize", "2M",
PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateInt,
upload_max_filesize, php_core_globals, core_globals)

The manual claims only PHP_INI_SYSTEM.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #10
Andy Hassall wrote:
It's a documentation bug.


#24955 ;-)

--
Jock
Jul 17 '05 #11
"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> wrote:
Is there any way for me to overcome the php.ini configuration
upload_max_filesize? I cannot use ini_set() since upload_max_filesize
can only be set in httpd.conf or php.ini. Are there any other
options?

I have an image gallery script that I wrote that will take a very
large image, and resize it down to a reasonable size for the web.
This makes it easy for me to grab very high resolution images from my
camera, and just shoot them off to the web without messing with them
in a separate program. Unfortunately, I not infrequently have images
that are bigger than 2 megs, which is the default upload_max_filesize
limit.

Any ideas? Or am I stuck asking my webhost to change the
upload_max_filesize?


Hi Josh,

Either that or you install Apache, PHP, (Mysql) on your local machine
and run the resize script there and then upload them to your web host.

JOn
Jul 17 '05 #12
You could use ftp functions of php instead of normal HTTP upload. This will
sneak the limit thing.

Kman
"Joshua Beall" <jb****@donotspam.remove.me.heraldic.us> wrote in message
news:21*****************@nwrddc03.gnilink.net...
Hi All,

Is there any way for me to overcome the php.ini configuration
upload_max_filesize? I cannot use ini_set() since upload_max_filesize can
only be set in httpd.conf or php.ini. Are there any other options?

I have an image gallery script that I wrote that will take a very large
image, and resize it down to a reasonable size for the web. This makes it
easy for me to grab very high resolution images from my camera, and just
shoot them off to the web without messing with them in a separate program.
Unfortunately, I not infrequently have images that are bigger than 2 megs,
which is the default upload_max_filesize limit.

Any ideas? Or am I stuck asking my webhost to change the
upload_max_filesize?

Sincerely,
-Josh

Jul 17 '05 #13
"Kman" <km*********@yahoo.com> wrote in message
news:j2******************@news20.bellglobal.com...
You could use ftp functions of php instead of normal HTTP upload. This will sneak the limit thing.

Kman


How would I do this? Would not the user have to open an FTP connection
manually, or be running his own FTP server in order to allow the php script
to connect to him and grab the file?

If you have an example I would be most curious to look at it.

-jb
Jul 17 '05 #14

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

Similar topics

2
by: Mike | last post by:
I want to allow my students to upload small text files (perhaps just a few bytes in size) just to show them how to upload using a PHP form. For security reasons -- I don't want them uploading MP3...
4
by: Jole | last post by:
Hi I'm using serialization to read in an object from a file. My code basically does this: 1)MyClass obj = (MyClass) in.readObject(); ('in' is an ObjectInputStream wrapped around a...
4
by: kj | last post by:
I'm a Perlhead (there, I said it). Years ago I made a genuine attempt to learn Python, but my intense disappointed with the way Python deals with scopes ultimately sapped my enthusiasm. I...
3
by: kingsleymyers | last post by:
I have a client with a need for an "upload_max_filesize" directive in excess of 10MB. Their current host will not budge. They need something in the range of 15MB to 20MB. Will this require a...
1
by: Mick | last post by:
Hi there, I am using the following : - Win XP - Easyphp v 1-7 - PHP 4.3.10 I am getting the following error in my apache error log file when attempting
6
by: hannu | last post by:
Hello all good PHP people I have a really frustrating problem with php5.1.2+apache2 on OpenSuse 10.1 (X86-64) environment. Though I set the upload_max_filesize setting in php.ini file to any...
1
by: pittendrigh | last post by:
If I want to control (max) upload file size on a Suse10.2 box running php5.0.3, in php.ini, does max_post_size matter? Or is upload_max_filesize the only relevant directive?
3
by: David | last post by:
I am puzzled, I want to change the upload_max_filesize setting, if I do this with ini_set('upload_max_filesize', 8000000); the upload_max_filesize is not set. However, if I make the change in...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.