Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #11328 > unrolled thread

Can't change upload_max_filesize

Started byTobiah <toby@tobiah.org>
First post2013-10-09 14:27 -0700
Last post2013-10-11 16:21 -0400
Articles 11 on this page of 31 — 7 participants

Back to article view | Back to comp.lang.php


Contents

  Can't change upload_max_filesize Tobiah <toby@tobiah.org> - 2013-10-09 14:27 -0700
    Re: Can't change upload_max_filesize Christoph Michael Becker <cmbecker69@arcor.de> - 2013-10-09 23:49 +0200
      Re: Can't change upload_max_filesize Tobiah <toby@tobiah.org> - 2013-10-10 13:32 -0700
        Re: Can't change upload_max_filesize Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-10 23:01 +0200
        Re: Can't change upload_max_filesize Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-10 21:26 +0000
          Re: Can't change upload_max_filesize Tobiah <toby@tobiah.org> - 2013-10-10 17:28 -0700
            Re: Can't change upload_max_filesize Denis McMahon <denismfmcmahon@gmail.com> - 2013-10-11 15:18 +0000
              Re: Can't change upload_max_filesize Tobiah <toby@tobiah.org> - 2013-10-11 10:05 -0700
              Re: Can't change upload_max_filesize Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-11 19:23 +0200
                Re: Can't change upload_max_filesize Fiver <numeralfive@gmail.com> - 2013-10-12 00:27 +0200
                  Re: Can't change upload_max_filesize Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-12 02:45 +0200
                    Re: Can't change upload_max_filesize Fiver <numeralfive@gmail.com> - 2013-10-12 04:32 +0200
                      Re: Can't change upload_max_filesize Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-11 22:47 -0400
                        Re: Can't change upload_max_filesize Fiver <numeralfive@gmail.com> - 2013-10-12 05:19 +0200
                      Re: Can't change upload_max_filesize Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-12 07:00 +0200
                        Re: Can't change upload_max_filesize Fiver <numeralfive@gmail.com> - 2013-10-12 09:15 +0200
                          Re: Can't change upload_max_filesize Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-12 19:51 +0200
                      Re: Can't change upload_max_filesize Twayne <nobody@spamcop.net> - 2013-10-12 10:08 -0400
                        Re: Can't change upload_max_filesize Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-12 10:12 -0400
                  Re: Can't change upload_max_filesize Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-11 21:48 -0400
        Re: Can't change upload_max_filesize Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-10 18:07 -0400
          Re: Can't change upload_max_filesize Tobiah <toby@tobiah.org> - 2013-10-10 17:32 -0700
            Re: Can't change upload_max_filesize Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-10 22:46 -0400
              Re: Can't change upload_max_filesize Tobiah <toby@tobiah.org> - 2013-10-11 10:16 -0700
                Re: Can't change upload_max_filesize Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-11 19:28 +0200
                  Re: Can't change upload_max_filesize Tobiah <toby@tobiah.org> - 2013-10-11 10:36 -0700
                    Re: Can't change upload_max_filesize Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-11 22:01 +0200
                Re: Can't change upload_max_filesize Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-11 13:29 -0400
                  Re: Can't change upload_max_filesize Tobiah <toby@tobiah.org> - 2013-10-11 10:34 -0700
                    Re: Can't change upload_max_filesize Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-11 14:20 -0400
    Re: Can't change upload_max_filesize Twayne <nobody@spamcop.net> - 2013-10-11 16:21 -0400

Page 2 of 2 — ← Prev page 1 [2]


#11353

FromJerry Stuckle <jstucklex@attglobal.net>
Date2013-10-10 18:07 -0400
Message-ID<l378fn$pk9$1@dont-email.me>
In reply to#11349
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.

P.S. Don't concern yourself with T.L.  It isn't his ears that are pointed.


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

[toc] | [prev] | [next] | [standalone]


#11361

FromTobiah <toby@tobiah.org>
Date2013-10-10 17:32 -0700
Message-ID<uGH5u.6335$i75.3867@fx03.iad>
In reply to#11353
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?

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

[toc] | [prev] | [next] | [standalone]


#11367

FromJerry Stuckle <jstucklex@attglobal.net>
Date2013-10-10 22:46 -0400
Message-ID<l37ops$t9s$1@dont-email.me>
In reply to#11361
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@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#11382

FromTobiah <toby@tobiah.org>
Date2013-10-11 10:16 -0700
Message-ID<5258327E.5060007@tobiah.org>
In reply to#11367
> 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.

Ding ding ding!

I put the to lines in question:

post_max_size = 200M
upload_max_filesize = 200M

into a new file in conf.d, and php.ini immediately
reflected the changes, and large uploads work now.  Yay.

Thanks for your help,

Tobiah

[toc] | [prev] | [next] | [standalone]


#11383

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-10-11 19:28 +0200
Message-ID<2934436.7dq2JcWlhJ@PointedEars.de>
In reply to#11382
Tobiah wrote:

>> 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.
> 
> Ding ding ding!
> 
> I put the to lines in question:
> 
> post_max_size = 200M
> upload_max_filesize = 200M
> 
> into a new file in conf.d, and php.ini immediately
> reflected the changes, and large uploads work now.  Yay.

As no doubt phpinfo() has told you to do.


PointedEars
-- 
> If you get a bunch of authors […] that state the same "best practices"
> in any programming language, then you can bet who is wrong or right...
Not with javascript. Nonsense propagates like wildfire in this field.
  -- Richard Cornford, comp.lang.javascript, 2011-11-14

[toc] | [prev] | [next] | [standalone]


#11387

FromTobiah <toby@tobiah.org>
Date2013-10-11 10:36 -0700
Message-ID<wGW5u.82383$bu1.37124@fx29.iad>
In reply to#11383
On 10/11/2013 10:28 AM, Thomas 'PointedEars' Lahn wrote:
> Tobiah wrote:
>
>>> 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.
>>
>> Ding ding ding!
>>
>> I put the to lines in question:
>>
>> post_max_size = 200M
>> upload_max_filesize = 200M
>>
>> into a new file in conf.d, and php.ini immediately
>> reflected the changes, and large uploads work now.  Yay.
>
> As no doubt phpinfo() has told you to do.

It mentions the conf.d directory, but it doesn't
tell me that changes in the php.ini won't take effect.

Always a pleasure...

Tobiah

[toc] | [prev] | [next] | [standalone]


#11389

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-10-11 22:01 +0200
Message-ID<1539123.arp0OAIgjY@PointedEars.de>
In reply to#11387
Tobiah wrote:

> On 10/11/2013 10:28 AM, Thomas 'PointedEars' Lahn wrote:
>> Tobiah wrote:
>>>> 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.
>>>
>>> Ding ding ding!
>>>
>>> I put the to lines in question:
>>>
>>> post_max_size = 200M
>>> upload_max_filesize = 200M
>>>
>>> into a new file in conf.d, and php.ini immediately
>>> reflected the changes, and large uploads work now.  Yay.
>>
>> As no doubt phpinfo() has told you to do.
> 
> It mentions the conf.d directory, but it doesn't
> tell me that changes in the php.ini won't take effect.

Because that is _not_ what happens.

> Always a pleasure...

Likewise.


PointedEars
-- 
    realism:    HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness:    XHTML 1.1 as application/xhtml+xml
                                                    -- Bjoern Hoehrmann

[toc] | [prev] | [next] | [standalone]


#11384

FromJerry Stuckle <jstucklex@attglobal.net>
Date2013-10-11 13:29 -0400
Message-ID<l39ci2$q96$1@dont-email.me>
In reply to#11382
On 10/11/2013 1:16 PM, Tobiah wrote:
>> 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.
>
> Ding ding ding!
>
> I put the to lines in question:
>
> post_max_size = 200M
> upload_max_filesize = 200M
>
> into a new file in conf.d, and php.ini immediately
> reflected the changes, and large uploads work now.  Yay.
>
> Thanks for your help,
>
> Tobiah
>

That's great.

I don't know why it didn't work in your php.ini file, unless you added 
the lines at the beginning of the file (and didn't delete the later 
entries).

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

[toc] | [prev] | [next] | [standalone]


#11386

FromTobiah <toby@tobiah.org>
Date2013-10-11 10:34 -0700
Message-ID<NEW5u.82382$bu1.81735@fx29.iad>
In reply to#11384
On 10/11/2013 10:29 AM, Jerry Stuckle wrote:
> On 10/11/2013 1:16 PM, Tobiah wrote:
>>> 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.
>>
>> Ding ding ding!
>>
>> I put the to lines in question:
>>
>> post_max_size = 200M
>> upload_max_filesize = 200M
>>
>> into a new file in conf.d, and php.ini immediately
>> reflected the changes, and large uploads work now.  Yay.

I meant that phpinfo() reflected the changes.

>> Thanks for your help,
>>
>> Tobiah
>>
>
> That's great.
>
> I don't know why it didn't work in your php.ini file, unless you added the lines at the beginning of the file (and didn't delete the
> later entries).
>

No, I just edited the values in place, and
the values don't exist anywhere else in the
file, or anywhere else in /etc for that matter.

Anyway, it seems that the conf.d method is
superior for reasons that you mentioned, so
I'm happy.

Tobiah

[toc] | [prev] | [next] | [standalone]


#11388

FromJerry Stuckle <jstucklex@attglobal.net>
Date2013-10-11 14:20 -0400
Message-ID<l39fi6$nr0$1@dont-email.me>
In reply to#11386
On 10/11/2013 1:34 PM, Tobiah wrote:
> On 10/11/2013 10:29 AM, Jerry Stuckle wrote:
>> On 10/11/2013 1:16 PM, Tobiah wrote:
>>>> 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.
>>>
>>> Ding ding ding!
>>>
>>> I put the to lines in question:
>>>
>>> post_max_size = 200M
>>> upload_max_filesize = 200M
>>>
>>> into a new file in conf.d, and php.ini immediately
>>> reflected the changes, and large uploads work now.  Yay.
>
> I meant that phpinfo() reflected the changes.
>
>>> Thanks for your help,
>>>
>>> Tobiah
>>>
>>
>> That's great.
>>
>> I don't know why it didn't work in your php.ini file, unless you added
>> the lines at the beginning of the file (and didn't delete the
>> later entries).
>>
>
> No, I just edited the values in place, and
> the values don't exist anywhere else in the
> file, or anywhere else in /etc for that matter.
>
> Anyway, it seems that the conf.d method is
> superior for reasons that you mentioned, so
> I'm happy.
>
> Tobiah
>

I don't know why it didn't work in your php.ini file, then.  It did when 
I made the change to my file.

But as long as you got it working, that's good.

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

[toc] | [prev] | [next] | [standalone]


#11390

FromTwayne <nobody@spamcop.net>
Date2013-10-11 16:21 -0400
Message-ID<l39ml6$r4s$1@speranza.aioe.org>
In reply to#11328
On 2013-10-09 5:27 PM, 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
>
> Thanks for any help!
>
> Tobiah
>

No time to read every post, but ... is it possible your servers are 
imposing the 1M limit? Some do.

Twayne`

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.php


csiph-web