TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 369
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 298
  • Total: 299
  • lurkalot

Only can Download 1.9mg

Started by Ray, April 07, 2005, 04:39:26 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Ray

I got a little problem-- if I upload a 30mg file then try to download it will only download 1.9mg -- all the info saids it is the right size even in the folder it will say 30mg -- php.ini is set to 500mg and SMF attachments is also set to really big -- any ideas??

Bjørn

maybe a option in SMF that limits it...I seem to recall that in the newer versions at least.

Bjørn

No, I was wrong. Got to have something to do with the server then..but I am clueless there...

IchBin

Is it just you having this problem Ray, or are others too?

Ray

#4
IchBin -- others also -- I didnÃÆ'ââ,¬Å¡ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢t think to try to upload from a different location to see if maybe where IÃÆ'ââ,¬Å¡ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢m at is causing the problem.

Note : I host all my own programs

Fixed:
had to make some changes to display.php

In Display.php, find :
Code:

   if (!empty($modSettings['enableCompressedOutput']) && @version_compare(PHP_VERSION, '4.2.0') >= 0)
      @ob_start('ob_gzhandler');
   else


replacing that code with:

Code:

header('Content-Encoding: none');

--------------------------------------------------------------------------------------------------

Then find:
Code:

   if (@readfile($filename) === null)
      echo implode('', file($filename));


Replace:
Code:

   if (filesize($filename) > 1024 * 1024)
   {
      @ob_end_clean();
      @ob_end_clean();
      @ob_end_clean();

      $fp = fopen($filename, 'rb');
      while (!feof($fp))
      {
         echo fread($fp, 8192);
         flush();
      }
      fclose($fp);
   }
   elseif (@readfile($filename) === null)
      echo implode('', file($filename));
----------------------------------------------------------------------------------------
Credit goes to -
[Unknown]
Lead Developer
Simple Machines

This website is proudly hosted on Crocweb Cloud Website Hosting.