FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Attachments and Windows
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Attachments and Windows [message #21835] Mon, 20 December 2004 17:47 Go to next message
Nick72 is currently offline  Nick72   United States
Messages: 8
Registered: December 2004
Karma: 0
Junior Member
Hi, dunno if this counts as a bug or not, but...

I'm on Win2003 and IIS (I know, I know, but certain business requirements, well, require it Wink My attachments upload fine (I can see them in the files folder. However, in the actual post the path to them seems to be wrong. If I include an image in the message for example, I just get a broken x.

In the DB, the first part of the path's don't have \ between them. E.g:

C:domainsmydomain.comFiles\fudforum\3814588639\files\24.atch

I manual inserted \ and it still didn't work.

I have placed \\ instead and the db still doesn't seem to get updated.

Thoughts?
Re: Attachments and Windows [message #21836 is a reply to message #21835] Mon, 20 December 2004 17:54 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Check your GLOBALS.php and make sure all windows paths that use \ have \\ or / instead of \.

FUDforum Core Developer
Re: Attachments and Windows [message #21838 is a reply to message #21836] Mon, 20 December 2004 18:18 Go to previous messageGo to next message
Nick72 is currently offline  Nick72   United States
Messages: 8
Registered: December 2004
Karma: 0
Junior Member
Wow, that was fast.

The only way I could get the slashes correct in the DB was setting:

$FILE_STORE = "C:\\\domains\\\mydomain.com\\\Files\\\fudforum/3814588639/files/";

If I // between say fudforum and 3814588639 no pages would appear.

(Setting \\\ instead of \\ in some other paths tho broke the app.)

So, now the path in the db looks like:

C:\domains\mydomain.com\Files/fudforum/3814588639/files/28.atch

However, I still get a red x. I tried manually setting the / to \ and still got a red x.

Re: Attachments and Windows [message #21839 is a reply to message #21838] Mon, 20 December 2004 18:23 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm \\\ is definately not right, \\ should be enough. Have you tried changing them to / instead of \?

To ensure that the file appears you need to update the database, since the file paths are cached.



FUDforum Core Developer
Re: Attachments and Windows [message #21840 is a reply to message #21839] Mon, 20 December 2004 19:01 Go to previous messageGo to next message
Nick72 is currently offline  Nick72   United States
Messages: 8
Registered: December 2004
Karma: 0
Junior Member
OK - so changing \\\ to / works. If

$FILE_STORE = "C:/domains/mydomain.com/Files/fudforum/3814588639/files/";

Then the path in the DB is:

C:/domains/projects.danikmedia.com/Files/fudforum/3814588639/files/30.atch

The image still doesn't show up in the message though. Where should I change the path to reset the cache?
Re: Attachments and Windows [message #21841 is a reply to message #21840] Mon, 20 December 2004 19:02 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You need to change the value of the location field inside the attach table.

FUDforum Core Developer
Re: Attachments and Windows [message #21842 is a reply to message #21841] Mon, 20 December 2004 19:12 Go to previous messageGo to next message
Nick72 is currently offline  Nick72   United States
Messages: 8
Registered: December 2004
Karma: 0
Junior Member
Ah, that's what I thought. But I've been trying that. At the moment it's:

C:/domains/mydomain.com/Files/fudforum/3814588639/files/30.atch

I've also tried manually chaning it to:

C:\\domains\mydomain.com\Files\fudforum\3814588639\files\30.atch

or

C:\\domains\\mydomain.com\\Files\\fudforum\\3814588639\\files\\30.atch

and it doesn't work.

Can I echo something somewhere to see what path it's really looking for?
Re: Attachments and Windows [message #21843 is a reply to message #21842] Mon, 20 December 2004 19:14 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Sure... open getfile.php inside theme/default directory and put var_dump($r, exit()); somewhere before the normal output.

FUDforum Core Developer
Re: Attachments and Windows [message #21844 is a reply to message #21843] Mon, 20 December 2004 19:22 Go to previous messageGo to next message
Nick72 is currently offline  Nick72   United States
Messages: 8
Registered: December 2004
Karma: 0
Junior Member
Odd, tried it and didn't see anything different. Is there a log file of something I should be checking?

Also, would this write the path that the page is looking for in the actual display of the message?
Re: Attachments and Windows [message #21845 is a reply to message #21844] Mon, 20 December 2004 19:23 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
where did you put that code? it should be near the end of the file.

FUDforum Core Developer
Re: Attachments and Windows [message #21846 is a reply to message #21845] Mon, 20 December 2004 19:37 Go to previous messageGo to next message
Nick72 is currently offline  Nick72   United States
Messages: 8
Registered: December 2004
Karma: 0
Junior Member
I put it on the last line before ?>

However, I tried just

http://mydomain.com/fudforum/3814588639/index.php?t=getfile&id=31

In my browser and the image displayed. However, when I viewed in the message ( http://projects.danikmedia.com/fudforum/3814588639/index.php?t=msg&goto =15&#msg_15), I still got a red x, which doesn't seem to make a lot of sense.
Re: Attachments and Windows [message #21847 is a reply to message #21846] Mon, 20 December 2004 19:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hmm you are using FUDforum as part of eGW...

Putting it before the ?> is a bit too late, you need to have it before the contents and the file headers are sent.

If you are seeing a 404 for getfile, try rebuilding the theme.


FUDforum Core Developer
Re: Attachments and Windows [message #21848 is a reply to message #21847] Mon, 20 December 2004 19:49 Go to previous messageGo to next message
Nick72 is currently offline  Nick72   United States
Messages: 8
Registered: December 2004
Karma: 0
Junior Member
I am using it as part of egw.

I've tried placing it in a couple of spots and get nothing. Is there a particular function I should place it after?

I'm not getting a 404, but I rebuilt the theme and it didn't work.

Thanks for all the help btw - where can I make a donation?
Re: Attachments and Windows [message #21849 is a reply to message #21848] Mon, 20 December 2004 19:53 Go to previous messageGo to next message
Nick72 is currently offline  Nick72   United States
Messages: 8
Registered: December 2004
Karma: 0
Junior Member
Well, I dunno what kind of voodoo you did on your end, but it just started working. Was caching old values perhaps? Anyway, thanks for all the help.
Re: Attachments and Windows [message #21850 is a reply to message #21849] Mon, 20 December 2004 20:27 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
As far as making things work, I am sure that the theme rebuild is what did the trick.

If you want to make a donation, you can do so via Paypal using the link in my signature.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Wrong link in Admin Panel (PDF)
Next Topic: Disabling PDF of whole forum doesn't disable
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 17:14:37 GMT 2024

Total time taken to generate the page: 0.02640 seconds