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
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy » Wed Dec 14, 2005 2:15 am

ok i understand-you want to link it to an external directory. As far as I know, you will only be able to do this if you own another domainname. However, I dont know how to make it so that you cannot view where the file is originating from-sorry :cry:
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^

User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy » Wed Dec 14, 2005 2:17 am

I imagine that if the file they are trying to upload is too big, they will get a message like this:
tried to upload empty file


If you are getting an error about a certain file, it is possible that you edited something incorrectly...
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^

nfh
Registered User
Posts: 27
Joined: Tue Nov 08, 2005 11:34 am

Post by nfh » Wed Dec 14, 2005 2:29 am

sciguy wrote: ok i understand-you want to link it to an external directory. As far as I know, you will only be able to do this if you own another domainname. However, I dont know how to make it so that you cannot view where the file is originating from-sorry :cry:


I'm afraid that's still not what I want :).
The is this: if you keep all the attached files in a directory inside the web server directory, anyone can copy the link to the file and use it (leech) somewhere else.

example:
/public_html/
|
|... /attach_container/
___|... /onefile.zip
___|... /anotherfile.zip
___|... /oneimage.jpg
___|... /otherimage.jpg

then if you access
www.domain.com/attach_container/onefile.zip

even if you're not on the board, you can access the "onefile.zip" file. What I need is something like:

/public_html/
/dir_outside_webserver/
|
|... /attach_container/
___|... /onefile.zip
___|... /anotherfile.zip
___|... /oneimage.jpg
___|... /otherimage.jpg

this way I can never access the files using an URL. That would be done like:
www.domain.com/attach_container/getattach.php?id=35

supposing that the id=35 is the "onefile.zip" file, that "getattach.php" would open the file (assuming that PHP is configured in such way it allows to access files outside the web server root) and then send it by http.

I'll try to take some time and do some php programming in order to do this. If you allow me, I'll try to take your mod as a base for this.

User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy » Wed Dec 14, 2005 2:33 am

i get what ur saying, but i honestly don't know how to do it. Sorry. :cry:
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^

Sho-N
Registered User
Posts: 14
Joined: Wed Dec 14, 2005 12:21 am
Location: CANADA
Contact:

Post by Sho-N » Wed Dec 14, 2005 2:36 am

Um.... out of curiosity, is there any for sure way to solve my problem? The way my server is... well... I don't have direct access to the SQL Database to work around it.

CyanBlue
Registered User
Posts: 409
Joined: Mon Jul 28, 2003 9:55 am

Post by CyanBlue » Wed Dec 14, 2005 3:01 am

nfh wrote: then if you access
www.domain.com/attach_container/onefile.zip

even if you're not on the board, you can access the "onefile.zip" file.

Hi...

If your host is running Apache, you can utilize the .htaccess file to prevent the hotlinking...
This is what I've got from Googling...

Code: Select all

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|zip|rar|fla|swf)$ - [NC,F,L]
Well... Obviously I tried it and it did not work... Well... It did prevent the hotlinking but Attachment MOD was not reading the image as well, so there is no point of doing it... Maybe somebody who knows this stuff better can help you on that... :?

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

Post by DavidIQ » Wed Dec 14, 2005 3:20 am

Sho-N wrote: I don't really understand what this means. Basically, I only get this problem when I try to modify anything in "Extension Control". Did I forget to modify a file?

Image

Check your common.php file for this:

Code: Select all

# 
#-----[ OPEN ]--------------------------------------------- 
# 
common.php

#
#-----[ FIND ]---------------------------------------------
# around line 218
	$board_config[$row['config_name']] = $row['config_value'];
}

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# After the closing brace
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx);
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.

Sho-N
Registered User
Posts: 14
Joined: Wed Dec 14, 2005 12:21 am
Location: CANADA
Contact:

Post by Sho-N » Wed Dec 14, 2005 3:22 am

DavidIQ wrote: Check your common.php file for this:

Code: Select all

# 
#-----[ OPEN ]--------------------------------------------- 
# 
common.php

#
#-----[ FIND ]---------------------------------------------
# around line 218
	$board_config[$row['config_name']] = $row['config_value'];
}

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# After the closing brace
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx);


I looked. I have that in my common.php file.

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

Post by DavidIQ » Wed Dec 14, 2005 3:22 am

nfh wrote:
sciguy wrote:ok i understand-you want to link it to an external directory. As far as I know, you will only be able to do this if you own another domainname. However, I dont know how to make it so that you cannot view where the file is originating from-sorry :cry:


I'm afraid that's still not what I want :).
The is this: if you keep all the attached files in a directory inside the web server directory, anyone can copy the link to the file and use it (leech) somewhere else.

example:
/public_html/
|
|... /attach_container/
___|... /onefile.zip
___|... /anotherfile.zip
___|... /oneimage.jpg
___|... /otherimage.jpg

then if you access
www.domain.com/attach_container/onefile.zip

even if you're not on the board, you can access the "onefile.zip" file. What I need is something like:

/public_html/
/dir_outside_webserver/
|
|... /attach_container/
___|... /onefile.zip
___|... /anotherfile.zip
___|... /oneimage.jpg
___|... /otherimage.jpg

this way I can never access the files using an URL. That would be done like:
www.domain.com/attach_container/getattach.php?id=35

supposing that the id=35 is the "onefile.zip" file, that "getattach.php" would open the file (assuming that PHP is configured in such way it allows to access files outside the web server root) and then send it by http.

I'll try to take some time and do some php programming in order to do this. If you allow me, I'll try to take your mod as a base for this.

Well the way attachmod works it doesn't really give the location of the file. That's the whole reason a new window pops up whenever you try and download a file using this mod. Although after a bit of digging anyone can figure out the folder for the uploads. :roll:
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
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17002
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ » Wed Dec 14, 2005 3:25 am

Sho-N wrote:
DavidIQ wrote: Check your common.php file for this:

Code: Select all

# 
#-----[ OPEN ]--------------------------------------------- 
# 
common.php

#
#-----[ FIND ]---------------------------------------------
# around line 218
	$board_config[$row['config_name']] = $row['config_value'];
}

# 
#-----[ AFTER, ADD ]-------------------------------------- 
# After the closing brace
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx);


I looked. I have that in my common.php file.

Oops...wrong fix. I meant for you to open admin_extensions.php, find attach_mod_sql_escape and replace it with attach_mod_sql_build_array and you should be all set.
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
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17002
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ » Wed Dec 14, 2005 3:27 am

sciguy wrote: thanx by the way for the help
Here's the file link:
http://games.illusionmontages.com/forum/phpinfo.php :D

Ok so how big is the mp3? Bigger than 8MB?
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.

Sho-N
Registered User
Posts: 14
Joined: Wed Dec 14, 2005 12:21 am
Location: CANADA
Contact:

Post by Sho-N » Wed Dec 14, 2005 3:32 am

DavidIQ wrote: Oops...wrong fix. I meant for you to open admin_extensions.php, find attach_mod_sql_escape and replace it with attach_mod_sql_build_array and you should be all set.


Yes! Thank you so much!

*Runs off all happy*

huntd
Registered User
Posts: 8
Joined: Sat Sep 17, 2005 6:48 pm

Error after installation

Post by huntd » Wed Dec 14, 2005 3:49 am

Hi guys, kind of lost here and looking for a bit of assistance.

I just built a brand new server as follows.
Windows Server 2003 w/ SP1 w/ IIS
Installed MS SQL 2000 w/ SP3a
Installed PHP 4.4.0
Installed phpBB 2.0.18
Installed Attachment Mod 2.40a using "premodified files" as follows;
- Uploaded files from attach_mod_240a.zip
- Ran "http://mysite/phpbb2/install/install.php" completed 100% sucsefully
- uploaded files from _update_remodified_files_phpbb2018.zip

now, upon launching http://mysite/phpbb2/index.php i recieve the following message.
Warning: main(./common.php): failed to open stream: Permission denied in C:\Inetpub\wwroot\phpbb2\index.php on line 26

Warning: main(): Failed opening './common.php' for inclusion (include_path='.;c:\php4\pear') in C:\Inetpub\wwwroot\phpbb2\index.php on line 26

Fatal error: Call to undefined function: session_pagestart() in C:\Inetpub\wwwroot\phpbb2\index.php on line 31


Any ideas?

Dave

huntd
Registered User
Posts: 8
Joined: Sat Sep 17, 2005 6:48 pm

Post by huntd » Wed Dec 14, 2005 3:58 am

Sorry, figured it out, my bad....

When I uploaded the files, I forgot to check the NTFS permissions on the new files, IUSR_SERVERNAME did not have read permissions anymore....

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

Post by DavidIQ » Wed Dec 14, 2005 4:28 am

huntd wrote: Sorry, figured it out, my bad....

When I uploaded the files, I forgot to check the NTFS permissions on the new files, IUSR_SERVERNAME did not have read permissions anymore....

You know I had a thought as I read your post that it might have been permissions in Windows. Gotta love them for making it so "easy" huh :roll:
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”