A really weird issue - No one was able to answer

Started by 008Rohit, July 06, 2011, 01:17:56 AM

Previous topic - Next topic

008Rohit

After upgrading from 2.0 RC5 to 2.0 Gold, whenever I try to download any attachment or any other file on the server,It always says "Unknown Time Remaining" and doesn't show the total file size. The files get downloaded fine though. "x MB out of Unknown MB downloaded" still irritates me.
Now, I noticed that this is happening with only files smaller than 5MB. I've talked to my host and its not a problem with their server at all.

for example this file : http://forum.smartphonegeeks.in/index.php?action=dlattach;topic=536.0;attach=3567

they've replied :

It is a script issue, and not a server issue and I will explain how. 1. I took the file name of that attachment (Series60Skin.mif) and I found it in your database:
mysql> select * from smf_attachments WHERE filename = 'Series60Skin.mif';
+-----------+----------+--------+-----------+-----------+-----------------+------------------
+------------------------------------------+---------+---------+-----------+-------+--------+-----------+----------+
| id_attach | id_thumb | id_msg | id_member | id_folder | attachment_type | filename | file_hash
| fileext | size | downloads | width | height | mime_type | approved | +-----------+----------+--------+-----------+-----------+-----------------+------------------
+------------------------------------------+---------+---------+-----------+-------+--------+-----------+----------+
| 3567 | 0 | 16112 | 0 | 1 | 0 | Series60Skin.mif |
fe595114e459fe646fa207869ed23c018cc6a02e | mif | 3500928 | 13 | 0 | 0 | | 1 |
+-----------+----------+--------+-----------+-----------+-----------------+------------------
+------------------------------------------+---------+---------+-----------+-------+--------+-----------+----------+ 1 row in set (0.00 sec) I determined the file name in the actual file system was
"fe595114e459fe646fa207869ed23c018cc6a02e" as you can see from the result. You can see the file here:
root@gemini [/home/smartpho/forum/attachments]# ls -lh | grep
fe595114e459fe646fa207869ed23c018cc6a02e
-rw-r--r-- 1 smartpho smartpho 3.4M Apr 30 10:38
3567_fe595114e459fe646fa207869ed23c018cc6a02e I then downloaded the file via it's hash name (instead of the forum script) and I got a
download progress: http://www.screen-shot.net/2011-07-06_0046.png When downloading it via your script, I do not get this progress - this means it's a script issue
and not a server issue - or it wouldn't give progress in both cases. Feel free to try it yourself: http://forum.smartphonegeeks.in/
attachments/3567_fe595114e459fe646fa207869ed23c018cc6a02e

Any solutions?
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

008Rohit

TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

Antechinus

Excuse me? I didn't know that you had such a colossal ego. Looks like we both learned something today. :)

The crew here are volunteers. We all have other things to do as well. I've just spent the afternoon clearing scrub with a brushcutter and have just signed back in here to catch up on some development stuff and maybe help out someone who doesn't have a huge attitude problem. Obviously, that someone isn't you.

The policy here is that you shouldn't bump your topic within 24 hours, and when you do bump it you shouldn't be a dick about it. Take a hint.




008Rohit

SMF is free = Team Members are volunteers = No Support to Users if the issue is Complex = This is why its free!
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

Illori

we do provide support for complex issues if we know the answer. otherwise we have a right to not reply because we are volunteers and it is better to not reply giving a bad/wrong answer then to reply at all.

008Rohit

Can anyone assist me solve this problem or should I give up?
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

008Rohit

Is this issue too weird?
I hate vBulletin and phpBB. SMF is the only forum software that I like. My forum is a big one and I need immediate help!
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

008Rohit

TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

Aleksi "Lex" Kilpinen

Seriously 008Rohit, Bumping topics less than 24 hours old is frowned upon - and going on like that, starting to insult people who are here to help others is not going to help you get support any faster. More likely it is going to cause people to look away...

Quote from: Antechinus on July 06, 2011, 03:55:02 AM
The policy here is that you shouldn't bump your topic within 24 hours, and when you do bump it you shouldn't be a dick about it. Take a hint.

Also - This issue doesn't seem to be a critical one in any way, as it doesn't make your forum unusable, or actually break the attachments or anything.... There are bigger issues on these boards to handle.

If this is happening only with files smaller than X MB, then I'd say there is not a real obvious problem with the script either - if there were, it should happen with all files - Right?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

008Rohit

Not a specific X MB, but I noticed that files smaller than 5MB tend to have that problem. and this is happening after upgrading to SMF 2.0 Gold from RC5.
As far as I know, this could happen if the column "File Size" in the database is empty for smaller files.
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

Aleksi "Lex" Kilpinen

Looking at the DB snip above, there is a size defined for that file - Size:"3500928".
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

008Rohit

Quote from: Aleksi "Lex" Kilpinen on July 07, 2011, 01:15:39 AM
Looking at the DB snip above, there is a size defined for that file - Size:"3500928".
hmm.. so what might be the issue?
as you can see, I can download the same files with progress bar using its hash code directly from the server. So there's something wrong with the script. Memory Allocation etc?
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

live627

Your constant bumping within the space of a couple hours won't get you anywhere. In fact, the replies here suggest there's something wrong with you - go take a chill pill dude!

Now, you might not be expecting an answer from me. I gave up on support a year ago. But here's  one. It won't fix your problem. In fact, you might be overly picky about this.

You  mention it happens with files smaller than 5MB. That tells me that when the files are being gzipped, the total  filesize is not being sent. So the total is unknown and no progress bar increments.

So  disable  output gzip compression and try the download again. Remember that action will increase your bandwidth.

008Rohit

Thanks @live267
that fixed the problem. However, I'm curious to know why this problem occurs with Output Compression enabled only in SMF 2.0? It was working fine with RC5.
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

008Rohit

The problem was with the compressed output.
in load.php its set that files larger than 4MB won't be compressed so I could see the download progress for larger files. However, I want to use compressed output as that'll save me some bandwidth. Any fix for this?
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

live627

Hmm, gotta disable compression only for files.

So, in ./Sources/Display.php, find 4194304 and replace with 0. Do it to all three. I'll post a grep to help you.

Display.php:1322 : if (!empty($modSettings['enableCompressedOutput']) && @version_compare(PHP_VERSION, '4.2.0') >= 0 && @filesize($filename) <= 4194304 && in_array($file_ext, array('txt', 'html', 'htm', 'js', 'doc', 'pdf', 'docx', 'rtf', 'css', 'php', 'log', 'xml', 'sql', 'c', 'java')))
Display.php:1430 : if (empty($modSettings['enableCompressedOutput']) || filesize($filename) > 4194304)
Display.php:1448 : if (filesize($filename) > 4194304)
Found 3 matches for "4194304".

008Rohit

Nice idea. :) I'll definately try your method.
I thought these problems are occuring because my host recently enabled zlib compression in php.ini but I was wrong. its still off there. So My best bet is to turn off the compression for files. :-\
Probably a bug of SMF 2.0?
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

Aleksi "Lex" Kilpinen

No, since the size limit is intentionally written in the code - I don't think it's a bug.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

008Rohit

Quote from: Aleksi "Lex" Kilpinen on July 07, 2011, 03:10:28 AM
No, since the size limit is intentionally written in the code - I don't think it's a bug.
I'm not talking about that.
Since the total file size doesn't get shown if zlib output compression is on, it could be a bug of SMF 2.0 as I didn't face this on 2.0 RC5.
If I set that value to 0, then all the files won't be supplied compressed which is what I don't want.
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

Advertisement: