473,406 Members | 2,439 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.

PHP upload_max_filesize problem

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 setting,
it sticks with 2M.

I have changed it both into larger (which is my ultimate goal) and smaller
without any effect what so ever.

And yes, I have restarted apache2 after the changes. Heck, I even booted the
computer once, though I knew it wouldn't help.

I have checked the php.conf against LimitRequestBody directive - though even
that would allow me to set the limit lower, wouldn't it?

I have also checked post_max_size, and I can even change it. Only the
subject setting and upload_tmp_dir and uploads seem to be unaffected, though
I can't be 100% sure about that as I haven't checked them ALL. But the point
is that MOSTLY php.ini obeys my changes, the only problem so far seems to be
connected with file upload.

As I am starting to feel deperssed I hope someone could throw some light
into this.

My phpinfo() is available at:

http://appserver.padasjoenlentokerho.fi/index.php

I have been running Linux & PHP for maybe 5 years and even done this very
task on various computers, so I'm really perplexed.

HHHEEEELLPPP! ;)

regards

hannu
Nov 14 '06 #1
6 5358
On Tue, 14 Nov 2006 12:08:03 +0200, "hannu" <hn@invalid.netwrote:
>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 setting,
it sticks with 2M.

I have changed it both into larger (which is my ultimate goal) and smaller
without any effect what so ever.

And yes, I have restarted apache2 after the changes. Heck, I even booted the
computer once, though I knew it wouldn't help.

I have checked the php.conf against LimitRequestBody directive - though even
that would allow me to set the limit lower, wouldn't it?

I have also checked post_max_size, and I can even change it. Only the
subject setting and upload_tmp_dir and uploads seem to be unaffected, though
I can't be 100% sure about that as I haven't checked them ALL. But the point
is that MOSTLY php.ini obeys my changes, the only problem so far seems to be
connected with file upload.

As I am starting to feel deperssed I hope someone could throw some light
into this.

My phpinfo() is available at:

http://appserver.padasjoenlentokerho.fi/index.php

I have been running Linux & PHP for maybe 5 years and even done this very
task on various computers, so I'm really perplexed.
You have multiple ini files loaded, so check all of them.

grep upload_max_filesize /etc/php5/apache2/php.ini /etc/php5/conf.d/*

Also check for any php_value statements in any config file loaded by Apache -
see if it's including any other config files in addition to httpd.conf.

And do you have an .htaccess file in the same directory as index.php? Check
that too.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 14 '06 #2
"Andy Hassall" <an**@andyh.co.ukwrote in message
news:j3********************************@4ax.com...
task on various computers, so I'm really perplexed.
>
You have multiple ini files loaded, so check all of them.
Additonally, it isn't clear if parameters such as post_max_size can be
overridden using ini_set() from an individual PHP script. It may very well
be (possibly, if I haven't missed something) that some or all of your PHP
scripts override important settings in the .INI file(s).

Dave.

Nov 14 '06 #3

"Andy Hassall" <an**@andyh.co.ukwrote in message
news:j3********************************@4ax.com...
>
You have multiple ini files loaded, so check all of them.

grep upload_max_filesize /etc/php5/apache2/php.ini /etc/php5/conf.d/*
No other values encountered..
>
Also check for any php_value statements in any config file loaded by
Apache -
see if it's including any other config files in addition to httpd.conf.
None found
And do you have an .htaccess file in the same directory as index.php?
Check
that too.
Nope

Thank you for your pointers, but none mached my problem. Any others? ;)

hannu
Nov 15 '06 #4

"David T. Ashley" <dt*@e3ft.comwrote in message
news:wg*******************@fe29.usenetserver.com.. .
"Andy Hassall" <an**@andyh.co.ukwrote in message
news:j3********************************@4ax.com...
task on various computers, so I'm really perplexed.

You have multiple ini files loaded, so check all of them.

Additonally, it isn't clear if parameters such as post_max_size can be
overridden using ini_set() from an individual PHP script. It may very
well
be (possibly, if I haven't missed something) that some or all of your PHP
scripts override important settings in the .INI file(s).
The index.php contains ONLY

<?php
phpinfo();
?>

So this seems no to be the problem....

regards,

hannu
Nov 15 '06 #5
It's really strange, but I got it working now.

It worked just like it should but only when I moved the upload_max_filesize
to almost the top of the file.

It's just like there's a branch which was never traversed on the place it
used to be (I changed it over the commented example on the ini-file), though
I don't get it how's that possible.

Well, I'll dig into it later, but for now on I am just plain happy ;)

Thank you and sorry for the time you devoted to this problem...

Best regards

hannu
Nov 15 '06 #6

"hannu" <hn@invalid.netwrote in message
news:3l******************@reader1.news.jippii.net. ..
It worked just like it should but only when I moved the
upload_max_filesize
to almost the top of the file.
And to shoot down the obvious to begin with - yes, the semi-colon was ripped
off from the line also before moving the directive line ;)

hannu
Nov 15 '06 #7

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

Similar topics

13
by: Joshua Beall | last post by:
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...
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...
117
by: Peter Olcott | last post by:
www.halting-problem.com
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...
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
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
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.