Attachment Mod

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
2035
71%
Very Good
444
16%
Good
175
6%
Fair
54
2%
Poor
156
5%
 
Total votes: 2864

User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Attachment Mod

Post by Brf »

Do you have a error_log file somewhere in your millions or millions/admin directory?
Scott Ozzie
Registered User
Posts: 9
Joined: Sun May 27, 2007 2:49 am
Location: Brisbane

Re: Attachment Mod

Post by Scott Ozzie »

no error_log in any of the directories.
crag364
Registered User
Posts: 97
Joined: Thu Jul 26, 2007 1:24 pm

Re: Attachment Mod

Post by crag364 »

Brf wrote:
DavidIQ wrote:30...seconds? Can you download a 10mb file in 30 seconds? I don't think I can outside of a T3 connection. I think that's your culprit.

Hahah Dave... You must not have a modern Cable ISP. Mine promises speeds up to 10mb/s, with my current connection clocking at 5mb/s. This means that I can upload a 10MB file in about 20 seconds.

Wait... that is download speed, not upload isnt it? :P My upload is probably closer to 1mb/s, meaning a 10MB file would take about 2-minutes....

As for the user's problem,
Have you checked the maxupload and maxpost settings in the php.ini file?
Yep both are set to 10mb. My download rate is 8mb/s so this is well in time for a 3mb file.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Attachment Mod

Post by Brf »

If the largest upload you can do is 1.9M, that would tell me that there is still something in the server settings limiting you to 2M uploads. Have you restarted the server since changing settings?
crag364
Registered User
Posts: 97
Joined: Thu Jul 26, 2007 1:24 pm

Re: Attachment Mod

Post by crag364 »

Brf wrote:If the largest upload you can do is 1.9M, that would tell me that there is still something in the server settings limiting you to 2M uploads. Have you restarted the server since changing settings?

I have got them to restart the server many times but to no effect.

Here is my code:

Code: Select all

PHP Core
Directive	Local Value	Master Value
allow_call_time_pass_reference	On	On
allow_url_fopen	On	On
always_populate_raw_post_data	Off	Off
arg_separator.input	&	&
arg_separator.output	&	&
asp_tags	Off	Off
auto_append_file	no value	no value
auto_globals_jit	On	On
auto_prepend_file	no value	no value
browscap	no value	no value
default_charset	no value	no value
default_mimetype	text/html	text/html
define_syslog_variables	Off	Off
disable_classes	no value	no value
disable_functions	show_source, system, passthru, popen, proc_open, allow_url_fopen	show_source, system, passthru, popen, proc_open, allow_url_fopen
display_errors	On	On
display_startup_errors	Off	Off
doc_root	no value	no value
docref_ext	no value	no value
docref_root	no value	no value
enable_dl	Off	Off
error_append_string	no value	no value
error_log	error_log	error_log
error_prepend_string	no value	no value
error_reporting	2039	2039
expose_php	On	On
extension_dir	/usr/local/lib/php/extensions/no-debug-non-zts-20020429	/usr/local/lib/php/extensions/no-debug-non-zts-20020429
file_uploads	On	On
highlight.bg	#FFFFFF	#FFFFFF
highlight.comment	#FF8000	#FF8000
highlight.default	#0000BB	#0000BB
highlight.html	#000000	#000000
highlight.keyword	#007700	#007700
highlight.string	#DD0000	#DD0000
html_errors	On	On
ignore_repeated_errors	Off	Off
ignore_repeated_source	Off	Off
ignore_user_abort	Off	Off
implicit_flush	Off	Off
include_path	.:/usr/lib/php:/usr/local/lib/php	.:/usr/lib/php:/usr/local/lib/php
log_errors	On	On
log_errors_max_len	1024	1024
magic_quotes_gpc	On	On
magic_quotes_runtime	Off	Off
magic_quotes_sybase	Off	Off
mail.force_extra_parameters	no value	no value
max_execution_time	60	60
max_input_time	60	60
open_basedir	no value	no value
output_buffering	no value	no value
output_handler	no value	no value
post_max_size	8M	8M
precision	12	12
register_argc_argv	On	On
register_globals	Off	Off
register_long_arrays	On	On
report_memleaks	On	On
report_zend_debug	On	On
safe_mode	Off	Off
safe_mode_exec_dir	no value	no value
safe_mode_gid	Off	Off
safe_mode_include_dir	no value	no value
sendmail_from	no value	no value
sendmail_path	/usr/sbin/sendmail -t -i	/usr/sbin/sendmail -t -i
serialize_precision	100	100
short_open_tag	On	On
SMTP	localhost	localhost
smtp_port	25	25
sql.safe_mode	Off	Off
track_errors	Off	Off
unserialize_callback_func	no value	no value
upload_max_filesize	10M	10M
upload_tmp_dir	no value	no value
user_dir	no value	no value
variables_order	EGPCS	EGPCS
xmlrpc_error_number	0	0
xmlrpc_errors	Off	Off
y2k_compliance	On	On
zend.ze1_compatibility_mode	Off	Off
I still think its a forum setting but not sure which one.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Attachment Mod

Post by DavidIQ »

Again...it is not a forum setting. There is nothing in the mod or forum that would cut off a download after 1.9MB nor is there a setting that says "Stop downloading after #.#MB". This is strictly a server issue.

How long does it take to get to 1.9MB? It would help if we had a link to the topic with this large file.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
crag364
Registered User
Posts: 97
Joined: Thu Jul 26, 2007 1:24 pm

Re: Attachment Mod

Post by crag364 »

OK I have opened up a testing area to the public so you don't have to register.

I have put a test clip in there, try downloading it.

http://underwaterclipsource.net/forum/v ... .php?t=345

Cheers,

Craig
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Attachment Mod

Post by DavidIQ »

Hmmm...it might be a PHP 5 bug. If you're running PHP 5 then to get around this edit download.php and change all of the "readfile(" references to "readfile_chunked(" and see if that helps you out any.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
crag364
Registered User
Posts: 97
Joined: Thu Jul 26, 2007 1:24 pm

Re: Attachment Mod

Post by crag364 »

Ok I will get to work on this and get back to you later...

thanks
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Attachment Mod

Post by Brf »

I do notice that your post_max_size is still too small too. It has to be larger than max_filesize
crag364
Registered User
Posts: 97
Joined: Thu Jul 26, 2007 1:24 pm

Re: Attachment Mod

Post by crag364 »

Ok edited the post max size to match the upload value.

After altering the code, the files upload fine but now when you come to download them it says they are only 157 bytes big!

Take a look and you will see what I mean.

cheers.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Attachment Mod

Post by Brf »

Is the multi-part section being added to the form correctly? I cannot tell as a guest.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Attachment Mod

Post by DavidIQ »

It would help if I provided the readfile_chunked function wouldn't it :roll:

Code: Select all

#
# ----- [OPEN]-----
#
attach_mod/includes/functions_includes.php

#
# ----- [FIND] -----
#
?>

#
# ----- [BEFORE, ADD] -----
#
function readfile_chunked($filename,$retbytes=true)
{
   $chunksize = 1*(1024*1024); // how many bytes per chunk
   $buffer = '';
   $cnt =0;
   // $handle = fopen($filename, 'rb');
   $handle = fopen($filename, 'rb');
   if ($handle === false)
   {
       return false;
   }
   while (!feof($handle))
   {
       $buffer = fread($handle, $chunksize);
       echo $buffer;
       if ($retbytes)
       {
           $cnt += strlen($buffer);
       }
   }
   $status = fclose($handle);
   if ($retbytes && $status) 
   {
       return $cnt; // return num. bytes delivered like readfile() does.
   }
   return $status;
}
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
mocap69
Registered User
Posts: 25
Joined: Sat Aug 14, 2004 3:49 am
Location: LA, CA, USA
Contact:

Re: Attachment Mod

Post by mocap69 »

Where can I get the pre-modded files so I can check some of my files to make sure I modded them correctly?
This is a commercial forum and since there are so many modded files I CANNOT mess this install up. I cannot
use the pre-modded files since I have multiple mods installed on the forum.

I was able to get the forum running on my test server at home and I fixed a couple of parse errors, but
I do not see the attachment option at all on my forum when I click on New Topic. Any ideas?

More testing confirmed that it only does not work on the Topic level but does work for Private Messages.
HELP!!!
Last edited by mocap69 on Fri Aug 03, 2007 12:37 am, edited 2 times in total.
Talk to REAL NFL players on the LARGEST forum on the WEB!!
http://www.thefanseye.com
crag364
Registered User
Posts: 97
Joined: Thu Jul 26, 2007 1:24 pm

Re: Attachment Mod

Post by crag364 »

Don't know where my last messages went to but that worked a treat david!!

Thanks for all your help and hard work.
Post Reply

Return to “[2.0.x] MOD Database Releases”