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

rkim
Registered User
Posts: 36
Joined: Tue Oct 24, 2006 2:12 pm

Post by rkim »

DavidIQ wrote:
rkim wrote:where can i get instructions on how to do that?

How can you set up a server and not know what a php.ini file is? :shock:
Find php.ini, open it, and edit the values, save, and restart services.


i've been looking for it but i can not seem to find it. is it just int he home directory?
rkim
Registered User
Posts: 36
Joined: Tue Oct 24, 2006 2:12 pm

Post by rkim »

nevermind. GOT IT! thanks for all the help david.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17326
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ »

rkim wrote:
DavidIQ wrote:
rkim wrote:where can i get instructions on how to do that?

How can you set up a server and not know what a php.ini file is? :shock:
Find php.ini, open it, and edit the values, save, and restart services.


i've been looking for it but i can not seem to find it. is it just int he home directory?

On a Windows server it's in the Windows directory. On a Linux/Unix/Apache server it's usually in the PHP directory (that's PHP NOT phpBB).
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.
lightwing
Registered User
Posts: 1
Joined: Mon Jan 22, 2007 11:58 pm

Re: attatchment mod PROBLEMS

Post by lightwing »

I'm in EXACTLY the same boat using a different template.

Right now I will PAY $$$ for SOMEONE to install this and get it running correctly!

ANYONE interested contact me via email off the board.

Thanks!

Patrick


falconier wrote: I tried installing the attatchement mod on phpbb2.0.22 everything went well it says it was installed correct but when i go to admin area i see the controls for the attatchments and when i click on any of them it said fatal error line XXX about the template cause im using another templete other then subsilver any ways i changed the default to subliver and now its saying
Code:
Fatal error: Call to undefined function include_attach_lang() in /san/home/ent4une/public_html/forums/admin/admin_extensions.php on line 54


I dont know what else to do..i got the mod from here so im gussing you'll help me out..lol..been working on this forever and it seems endless..I even tried reuploading reinstalling..help please.
silverdot
Registered User
Posts: 33
Joined: Sun May 29, 2005 12:18 am
Location: Austin, TX
Contact:

Post by silverdot »

Hey I'm a newbie to the site, but I've been installing mods for awhile and know a few things about php. Just a quick question. I installed the mod and i think i may have put some files in the wrong place. Whenever i go to the admin panel and click on any of the link i get theses errors

Template->make_filename(): Error - file admin/attach_cp_body.tpl does not exist
Template->make_filename(): Error - file admin/attach_extension_groups.tpl does not exist

etc.... with every link i click i get the same thing. The template I'm using is BlackBB and the version of phpBB2 is 2.0.21

I'm thinking i put the files in the admin section of phpbb2 not the admin section of BlackBB

It may be a simple error like that. I wanna see what everyone says before i start moving stuff around. Thanks for your help!!
User avatar
will_hough
Former Team Member
Posts: 1952
Joined: Mon Feb 06, 2006 8:47 pm
Location: Michigan
Name: Will Hough
Contact:

Post by will_hough »

Those files would go in your template/BlackBB/admin folder.
silverdot
Registered User
Posts: 33
Joined: Sun May 29, 2005 12:18 am
Location: Austin, TX
Contact:

Post by silverdot »

thanks i thought that was the problem, so basically i just put those files in the wrong folder. I guess the best way to go about fixing that would be to go through the file transfers one by one again. and then check it based on the errors I'm getting?
MXM
Registered User
Posts: 5
Joined: Fri Sep 08, 2006 12:04 pm
Location: Russia, Saint-Petersburg
Contact:

Post by MXM »

Situation:
It was necessary to attach by means of this MODe to the message a file: test.mpg - 3,17 Gb.
As on a server there was a restriction on upload - no more than 2 Mb, I
have made the following: first to the message I attached a small size
file, then on FTP uploaded with the same name on a server the big size
file, and has made some DB (MySQL).
Step by step it looked so:
1. To the message has attached a file test_file.mpg - 7 kb;
2. In a DB -> the table phpbb_attachments_desc, on a column
physical_filename has found the name of the generated file->
test_file_217.mpg;
2.1. The field filesize further has changed - has replaced value 7 kb on
3,17 Gb.
3. Then on a computer has renamed a file test.mpg on the name generated
file-> test_file_217.mpg;
3.1. After has filled in it through FTP in a folder files, that having
replaced an existing file in 7 kb.
What mistakes have got out:- The DB has replaced specified size a file 3405928452 on
2147483647, i.e. has cut down up to 2 Gb.
- At uploading from different computers выкидавает mistakes(errors):
Windows Media Player encountered an unknown error.
The file is downloading, but the size of the downloaded file makes 377
bytes, instead of 3,17 Gb. (look the attached figure below).
Image

Question: help to understand what there can be a reason? Where, in what, a mistake? How to correct?

P.S.1. Now only has noticed a mistake:
1 MISTAKE.
I come: Admin panel-> Appendices-> the Control Panel, in the right panel the message has jumped out:

Code: Select all

Warning: is_dir(): Stat failed for ../files/test_file_217.mpg (errno=75 - Value too large for defined data type) in /home/www/web1/web/attach_mod/includes/functions_admin.php on line 314 

Warning: is_link(): Lstat failed for (null) (errno=75 - Value too large for defined data type) in /home/www/web1/web/attach_mod/includes/functions_admin.php on line 314
I open a file attach_mod/includes/functions_admin.php

Code: Select all

/** 
* Returns the filesize of the upload directory in human readable format 
*/ 
function get_formatted_dirsize() 
{ 
   global $attach_config, $upload_dir, $lang; 

   $upload_dir_size = 0; 

   if (!intval($attach_config['allow_ftp_upload'])) 
   { 
      if ($dirname = @opendir($upload_dir)) 
      { 
         while ($file = @readdir($dirname)) 
         { 
            if ($file != 'index.php' && $file != '.htaccess' && !is_dir($upload_dir . '/' . $file) && !is_link($upload_dir . '/' . $file)) #### - LINE 314 - ####
            { 
               $upload_dir_size += @filesize($upload_dir . '/' . $file); 
            } 
         } 
         @closedir($dirname); 
      } 
      else 
      { 
         $upload_dir_size = $lang['Not_available']; 
         return $upload_dir_size; 
      } 
   } 
   else 
   {
2 MISTAKE.
I come: Admin-> Appendices-> Shadow appendices, in the right panel has jumped out the message:

Code: Select all

Warning: is_dir(): Stat failed for ../files/test_file_217.mpg (errno=75 - Value too large for defined data type) in /home/www/web1/web/attach_mod/includes/functions_admin.php on line 247 

Warning: is_link(): Lstat failed for (null) (errno=75 - Value too large for defined data type) in /home/www/web1/web/attach_mod/includes/functions_admin.php on line 247
I open a file attach_mod/includes/functions_admin.php

Code: Select all

/** 
* Collect all Attachments in Filesystem 
*/ 
function collect_attachments() 
{ 
   global $upload_dir, $attach_config; 

   $file_attachments = array(); 

   if (!intval($attach_config['allow_ftp_upload'])) 
   { 
      if ($dir = @opendir($upload_dir)) 
      { 
         while ($file = @readdir($dir)) 
         { 
            if ($file != 'index.php' && $file != '.htaccess' && !is_dir($upload_dir . '/' . $file) && !is_link($upload_dir . '/' . $file)) #### - LINE 247 - ####
            { 
               $file_attachments[] = trim($file); 
            } 
         } 
       
         closedir($dir); 
      } 
      else 
      { 
         message_die(GENERAL_ERROR, 'Is Safe Mode Restriction in effect? The Attachment Mod seems to be unable to collect the Attachments within the upload Directory. Try to use FTP Upload to circumvent this error. Another reason could be that the directory ' . $upload_dir . ' does not exist.'); 
      } 
   }
Prompt, please, if I am not mistaken:
That the type of data of this variable $upload_dir_size is too small to
write down value of the size of a file which is necessary to me (3 Gb)?
Can change type of data of this variable?
Where it is possible to make it?
User avatar
Makc666
Registered User
Posts: 358
Joined: Fri Mar 07, 2003 12:03 pm
Location: MSK-RU
Name: Maxim
Contact:

Post by Makc666 »

MXM wrote: Situation:
It was necessary to attach by means of this MODe to the message a file: test.mpg - 3,17 Gb.

Apache version 1.3.* doesn't work with files bigger than 2.1Gb.
Use Apache 2.* or cut the files.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31982
1.3 has known issues with 32 bit ints (signed or not) and has other problems when reaching the 2GB
limit. A complete fix is not in the cards for 1.3 and is a good reason to consider 2.x
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17326
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ »

I think you're also quoting the wrong lines...or you have a different version of the mod. The lines you have quoted return boolean values. However I think that anywhere you see the filesize function you are going to run into this error. The function filesize is an int function. The size of the number you're putting into the database is larger than an int so naturally this error happens. There is no way to fix this. The number you have used is more likely the length of a double or a floating number so you're stuck with these errors as there is no way to change the data type of the function.

P.S. Since these are only warnings I don't think you'll have trouble deleting or managing attachments via the ACP and the pages should still function properly...just with the error accross the top.
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.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52137
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf »

silverdot wrote: thanks i thought that was the problem, so basically i just put those files in the wrong folder. I guess the best way to go about fixing that would be to go through the file transfers one by one again. and then check it based on the errors I'm getting?


No. The easy way is to look for TPL files in your admin folder and move them to your template's admin folder where they belong.
falconier
Registered User
Posts: 8
Joined: Mon Jan 22, 2007 1:49 pm

Another problem..with uploading attachments

Post by falconier »

I have finally got it done from my earlier post but now after SEARCHING thier isnt any reply to threads asking for help :? anywho . when i try to upload something its giving me an error trying to upload a empty file..how can i fix this?
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17326
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Another problem..with uploading attachments

Post by DavidIQ »

falconier wrote: I have finally got it done from my earlier post but now after SEARCHING thier isnt any reply to threads asking for help :? anywho . when i try to upload something its giving me an error trying to upload a empty file..how can i fix this?

http://phpbb.davidiq.com/viewtopic.php?t=10
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.
goldhunter
Registered User
Posts: 1
Joined: Tue Jan 23, 2007 4:06 pm

Post by goldhunter »

need some help here:

i installed the phpbb2 attachment mod, and sofar, it sems to be working OK,exept that no one can see the attachment box. i can see it when im logged in ( im the admin) and i can upload photos,etc, but when anyone else logs in, it doesnt show the attachment add box.

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

Post by DavidIQ »

goldhunter wrote: need some help here:

i installed the phpbb2 attachment mod, and sofar, it sems to be working OK,exept that no one can see the attachment box. i can see it when im logged in ( im the admin) and i can upload photos,etc, but when anyone else logs in, it doesnt show the attachment add box.

any ideas?

Need to set Forum Permissions in the ACP. Change to advanced mode if you don't see the attachment mod options.
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.
Post Reply

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