PHP upload_max_filesize problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hannu

    PHP upload_max_filesize problem

    Hello all good PHP people

    I have a really frustrating problem with php5.1.2+apache 2 on OpenSuse 10.1
    (X86-64) environment.

    Though I set the upload_max_file size 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 LimitRequestBod y 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:



    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


  • Andy Hassall

    #2
    Re: PHP upload_max_file size problem

    On Tue, 14 Nov 2006 12:08:03 +0200, "hannu" <hn@invalid.net wrote:
    >I have a really frustrating problem with php5.1.2+apache 2 on OpenSuse 10.1
    >(X86-64) environment.
    >
    >Though I set the upload_max_file size 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 LimitRequestBod y 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_file size /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 :: andy@andyh.co.u k :: http://www.andyh.co.uk
    http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

    Comment

    • David T. Ashley

      #3
      Re: PHP upload_max_file size problem

      "Andy Hassall" <andy@andyh.co. ukwrote in message
      news:j3fkl2df25 ft5rlriumtp9u1j ir8ao8p4a@4ax.c om...
      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.



      Comment

      • hannu

        #4
        Re: PHP upload_max_file size problem


        "Andy Hassall" <andy@andyh.co. ukwrote in message
        news:j3fkl2df25 ft5rlriumtp9u1j ir8ao8p4a@4ax.c om...
        >
        You have multiple ini files loaded, so check all of them.
        >
        grep upload_max_file size /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


        Comment

        • hannu

          #5
          Re: PHP upload_max_file size problem


          "David T. Ashley" <dta@e3ft.comwr ote in message
          news:wgr6h.9810 5$mP4.19259@fe2 9.usenetserver. com...
          "Andy Hassall" <andy@andyh.co. ukwrote in message
          news:j3fkl2df25 ft5rlriumtp9u1j ir8ao8p4a@4ax.c om...
          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


          Comment

          • hannu

            #6
            Re: PHP upload_max_file size problem - SOLVED

            It's really strange, but I got it working now.

            It worked just like it should but only when I moved the upload_max_file size
            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


            Comment

            • hannu

              #7
              Re: PHP upload_max_file size problem - SOLVED


              "hannu" <hn@invalid.net wrote in message
              news:3lA6h.5250 1$1B.27080@read er1.news.jippii .net...
              It worked just like it should but only when I moved the
              upload_max_file size
              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


              Comment

              Working...