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


Groups > comp.lang.php > #11393

Re: Can't change upload_max_filesize

Message-ID <2033215.bEuLlM5jFn@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2013-10-12 02:45 +0200
Subject Re: Can't change upload_max_filesize
Newsgroups comp.lang.php
References (3 earlier) <l3761r$lqf$5@dont-email.me> <OCH5u.48477$K71.37672@fx21.iad> <l394s1$hql$1@dont-email.me> <3017330.KgCX0VFtND@PointedEars.de> <l39u1g$f34$1@dont-email.me>

Show all headers | View raw


Fiver wrote:

> On 2013-10-11 19:23, Thomas 'PointedEars' Lahn wrote:
>> Denis McMahon wrote:
>>> cd /etc
>>> 
>>> sudo grep -R upload_max_filesize *
>> 
>>   sudo grep --color -Irwe upload_max_filesize /etc/
>> 
>> is infinitely more useful.
> 
> Maybe for your personal definition of "useful" (or infinity).

… which is currently based on more than 13 years of *professionally* 
maintaining GNU/Linux systems, including Debian and Ubuntu based ones, 
running PHP-powered Web sites.  You would do well to listen to that.
 
> -I
>   skips all files detected as binary; probably makes no difference in
>   this case, but might hide information you're looking for

Nonsense.  This is a full-*text* search; it does not make sense to search in 
binaries at all.  [Which is why ack(1) does not do that by default.]

> -r
>   skips symlinked files that the GP would have included with -R;
>   definitely a bad choice when searching for a mystery config setting

[Only wannabes talk about computer technology in terms of mysticism and 
incantations.  There is no “mystery config setting” here.  It is simply 
binary logic instead: either there is something causing this behavior, then 
this problem can be solved by changing the configuration; or there is not, 
then this problem can only be solved by exchanging the software.]

“-r” instead of “-R” prevents grep(1) from going into an endless loop (which 
is allowed for symlinks).

> -w
>   pointless, unless you expect upload_max_filesize to be part of a
>   longer word

“-w” searches for *words*, not just for substrings.  No, that is _not_ 
pointless here.  It might be even better to search for 
'\<upload_max_filesize[[:space:]]*=', 
'\<php_\(admin_\)\?value[[:space:]]upload_max_file\>' (or its egrep 
equivalent instead.

> -e
>   pointless, unless you're using a regex, which you're not

Nonsense.  GNU grep(1) as in Ubuntu uses POSIX Basic Regular Expressions
*by default* (“-F” searches for fixed strings).  “-e” is merely used so that 
expressions starting with “-” are not considered options.  I am using it out 
of good habit; it is not strictly necessary *here* because the pattern does 
not start with “-”.
 
>> In general, phpinfo() shows *all* relevant files (short of PHP source
>> files), so there is hardly a need for a recursive fulltext search.
> 
> That's not true: phpinfo() doesn't show the Apache config files.

True.  “upload_max_filesize” is a PHP_INI_PERDIR directive since PHP 4.2.4; 
it can be set in the Virtual Host configuration as well.   (As far as PHP is 
concerned, the Virtual Host configuration is the same as httpd.conf because 
those files are merely includes of that file or its distribution adjunct, 
apache2.conf.  It *cannot* be set with ini_set() or in the Windows registry 
anymore.  That is what RTFM gives you, for free.)

> For example, with a default Ubuntu setup, there are vhost config files
> linked from /etc/apache2/sites-enabled, where PHP config settings can be
> made with the "php_value" directive.

I am aware of that (the OP is not, because they would not RTFM); the link 
targets are in /etc/apache2/sites-available/ (the a2ensite and a2dissite 
commands then make it easy to enable and disable Virtual Hosts by just 
adding and removing those symlinks).  That makes this recursive search even 
more a waste of time.  The *exact* config file for the *used* Virtual Host, 
its includes, and the server/PHP configuration files in and under its 
DOCUMENT_ROOT should be consulted instead.


PointedEars
-- 
var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
)  // Plone, register_function.js:16

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web