How to increase file size

Help
tbwssco
2004-09-06
2013-05-17
  • tbwssco

    tbwssco - 2004-09-06

    Hello, could you post the lines i need to replace to increase the upload size to say 10mb

     
    • AlirezaN1

      AlirezaN1 - 2005-01-30

      I don't think you can do it. There is a function in fun_extra.php (get_max_file_size() ) that detects the PHP's maxinum upload size which is set by the hosting company.( unless if you are hosting your website). Try modifying the php configuration file.

      Alireza

       
    • James D. Lainton

      Yup...works when you edit the php.ini file to allow something more than 2M (thats what mine was defaulting to)

       
    • jerrycheung

      jerrycheung - 2005-10-30

      how to modify the php configuration file and php.ini.file??
      Do i need to change them:
        
      function get_max_file_size() {            // get php max_upload_file_size
          $max = get_cfg_var("upload_max_filesize");
          if(@eregi("G$",$max)) {
              $max = substr($max,0,-1);
              $max = round($max*1073741824);
          } elseif(@eregi("M$",$max)) {
              $max = substr($max,0,-1);
              $max = round($max*1084976);
          } elseif(@eregi("K$",$max)) {
              $max = substr($max,0,-1);
              $max = round($max*1024);
          }
         
          return $max;

       
    • Taffman

      Taffman - 2007-01-05

      whats the file name and where what I have to change? to upload more than 50mega etc. (I read something about php.inc (or something like that) but I don´t have such file.
      In .include something?

      with best,

      Taavi

       
      • John Fiala

        John Fiala - 2007-01-05

        >whats the file name and where what I have to change?

        A few people have asked this, and no one's answered - fair enough, here's a simple way of discussing it.

        1) You need to change your php.ini file.  You do have one, although it may be hidden away - different installers will put it in different places.  If you're working with a hosting company then you're pretty much stuck with the amount that they've set it to.  The easiest way to find your appropriate php.ini file is to create a page consisting of:
        ------
        <pre>
        <?PHP
        phpinfo();
        ?>
        </pre>
        ------
        When you browse to that page, you'll have a big listing of _every_ setting for your php system - it's a good command to remember because of that.  Among the settings, in the upper part, will be the path to the php.ini file that's being used.  (You'll want to remove this page after you've used it - there's no reason to let anyone other than you have access to this information.)

        2) Open that php.ini file in your favorite text editor - if you're using windows, I suggest notepad.exe if you don't know what I'm talking about.  Search for "upload_max_filesize" - you'll probably find something like "upload_max_filesize 2M", which basically means that the max filesize for uploads is 2 Megabytes.  To change that to 50M, or whichever, simply edit the file and save it.

        3) Restart Apache/IIS.  This will depend on your system, really - on my windows box it's as simple as finding the service and hitting a restart key.

        Once that's done your upload limit should be fixed.

        John

         
        • John Fiala

          John Fiala - 2007-01-05

          Forget the <pre></pre> tags in the message I just posted - I read a bit about how html tags would be presented in this board, and thought my helpful php would somehow be hidden because of that.  My bad, I don't use this service much, and apparently can't edit it.

           
    • hotellinavespone

      Hello, and thanks for your quixplorer.
      I have already the upload_max_filesize = 50 MB on my Linux webserver but I cannot upload a 15 MB file . Why this?

       
      • John Fiala

        John Fiala - 2007-06-11

        I'm not sure, but do you mind testing something?  Put up a test page on your server with the command phpinfo() - that will display what all your settings are at, and check the max filesize there.  It's possible that you changed the setting in the wrong php.ini file.

        If you've already double-checked that, let me know and I'll have a look at the code sometime soon.

        (In case you're unfamiliar with php, below the ---- is what I suggest putting in a phptest.php file.)
        ----
        <?php
        phpinfo();
        ?>

         
        • Claudio Klingler

          I solved the problem by providing our uploaders an ftp access to a specific directory on the server which is under QuiXplorer control. Via FTP there is no upload limit and our customers have no problems to deal with ftp.

          FTP uploads are a bit easier to manage compared with php uploads and this works fine. However, you'll need a ftp account for your uploaders and they have to be experienced with ftp.

           
      • Joe

        Joe - 2007-06-25

        You also may want to set the following in the PHP.INI file.

        post_max_size = 100M

        It doesn't have to be 100M, that is just what I use. This helped me have the ability to upload large files.

        Thanks,
        Joe

         
    • farshad abbasi

      farshad abbasi - 2008-03-04

      hi guys
      how can i changne timezone (file date) setting in QuiXplorer?

       
    • farshad abbasi

      farshad abbasi - 2008-03-04

      hello every body
      how can i change time zone in  (my file modified) to local time?

       
  • Anonymous - 2011-12-06

    I had the problem with the file size, I had set it at well over 100M using .htaccess but it still kept giving me a file too big message (the hosts default was 2MB but can be changed via .htacess only). So how I got around it was in fun_extra.php I just had the get_max_file_size function  return what my modified limit was and it worked fine.

    For example for 100MB change get_max_file_size ( in .include/fun_extra.php)

    $max=100*1048576;
    return $max;

    I am not sure if it's the best way, but it worked.

     
  • Claudio Klingler

    @Tammy:

    May you post your upload_max_filesize configuration variable from your php.ini file?

    Normally you don't have to change the get_max_file_size() function since this function reads out the maximum allowed value from your php configuration file. That the change you mentioned above works indicates that the get_max_file_size() function is not able to parse your php configuration correctly. Otherwise you should get an error because php should not allow to upload files bigger than the value configured in the php.ini.

    Many thanks..

    BTW: Meanwhile, the project is hosted at Github: http://github.com/realtimeprojects/quixplorer

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks