FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Can't change upload_max_filesize
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Can't change upload_max_filesize [message #183165 is a reply to message #183157] Fri, 11 October 2013 02:46 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 10/10/2013 8:32 PM, Tobiah wrote:
> On 10/10/2013 3:07 PM, Jerry Stuckle wrote:
>> On 10/10/2013 4:32 PM, Tobiah wrote:
>>> On 10/09/2013 02:49 PM, Christoph Michael Becker wrote:
>>>> Tobiah wrote:
>>>>
>>>> > I set upload_max_filesize, and post_max_size in my
>>>> > php.ini to very large values, and restarted apache. I still can't
>>>> > upload
>>>> > files larger than about 1MB. They just silently fail.
>>>> > I check phpinfo() and both of the limits are listed
>>>> > as the small defaults (2M and 8M). Why do the php.ini
>>>> > settings have no effect? I Googled and found at least
>>>> > one person with the exact same complaint.
>>>> >
>>>> > PHP 5.3.10
>>>>
>>>> Have you checked that t his php.ini is actually in use? See
>>>> phpinfo()'s
>>>> "Configuration File (php.ini) Path" and the following entries.
>>>>
>>>
>>> That's a great idea, but it seems that I was editing the
>>> correct file:
>>>
>>> /etc/php5/apache2/php.ini
>>>
>>> as reported by phpinfo()
>>>
>>> In that file, I've changed upload_max_filesize and post_max_size
>>> to 200M, also tried 200000000 but phpinfo still reports their
>>> values at 2M and 8M, and large uploads still fail.
>>>
>>> Thanks,
>>>
>>> Tobiah
>>
>> In addition to restarting Apache as Dennis said, do you have the one or
>> both values defined anywhere else? grep might help you here. It might,
>> for instance, be in an Apache configuration file, a .htaccess file or
>> even a local php.ini file.
>
> Well, I haven't been too concerned about that, because this is just
> a straight Ubuntu install on my own machine. Do you think it's possible
> that Ubuntu did something so horrible as to hide overrides to these
> configuration options somewhere other than the php.ini? Also, I tried
> a .htaccess in the directory I'm running from, and it didn't work.
> Wouldn't that take precedence over the httpd.conf? I'm not sure.
> Anywhere else I should look?
>

OK, let's start at the beginning. You said you have a stock Ubuntu
installation, so /etc/php5/apache2/php.ini would be the correct
configuration file. However, what about other configuration files being
parsed? They will be done after the php.ini file. Any one of them
could override it.

As to whether you can use .htaccess or not depends Apache options. The
default for Ubuntu is to not allow overrides from .htaccess, which is
why it didn't work (see the AllowOverrides Apache command).

I installed Apache and PHP on a test Ubuntu system I have here, and made
the following changes to the /etc/php5/apache2/php.ini file

post_max_size=16M
upload_max_filesize=8M

and restarted Apache. The changes were reflected in the phpinfo() page,
so it does work. Please check your changes again. Exactly what did you
enter in the file?

BTW, standard Ubuntu and Debian operation is to NOT change the default
configuration files. Rather, you add the parameters you want to a new
file in a directory reserved for it - in this case,
/etc/php5/apache2/conf.d. That way when you update a package, your
customized changes don't get lost. Placing these same changes in
/etc/php5/apache2/conf.d/zzzmyconfig.ini also worked.


> Thanks for your help,
>
> Tobiah
>
>> P.S. Don't concern yourself with T.L. It isn't his ears that are
>> pointed.
>
> Thanks for that. Why is he so abrasive?
>
> Tobiah
>
>

That's just "Pointed Head". He has his own rules for usenet, and thinks
the rest of the world should follow them.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to transfer value to iframe?
Next Topic: counting the plays
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 04:10:24 GMT 2024

Total time taken to generate the page: 0.05099 seconds