Previous Thread
Next Thread
Print Thread
Hop To
#225160 04/01/2009 12:36 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
I recently discovered that any post attachments in my forums do not open. The files upload and do exist in the attachments folder. Clicking on the attachment link brings up a blank .php document instead of the image, .pdf or .txt file.

I uploaded a few attachments to test this, a JPG and a PDF file opens up a blank PHP file in my HTML editor and a text file gives me this error:

"http://www.forddoctorsdts.com/forums/ubbthreads.php?ubb=showflat&Number=21261 www.forddoctorsdts.com 198.139.65.244 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648) /forums/user_files/82.txt 404"

Any ideas?


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
I believe there was a reported bug on this issue and was addressed in 7.5. Let me look for it.
If you look at the change log for 7.5 in the bugs section you will see this type of problem that was addressed.
Also HERE is one post on the issue.

Last edited by Ruben; 04/01/2009 4:30 PM. Reason: Corrected spelling

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #225181 04/01/2009 4:32 PM
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
BTW the link does not work because you don't allow guests to view. And your registrations are moderated.
Oh also we are on the same host and I did not have the issue. So go figure.
But in any case I have since upgraded to 7.5.2.

Last edited by Ruben; 04/01/2009 4:42 PM. Reason: Added comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #225227 04/01/2009 10:31 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Thanx for the reply Ruben. I haven't uploaded any attachments since moving the site and upgrading to 7.4. I suppose I should get of me arse and try 7.5 and see if that addresses it. Oh, I was only posting the error - didn't intend for a link.


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Okay, I upgraded to 7.5.3 and well, the file attachments issue still exists. I have the same directory I originally set up and in the control panel the directory test good "is readable and writable." If I create a new post with an attachment all goes as it is supposed to when the post is submitted - the attachment is displayed with the file number and name...

When I click on the attachment link the page loads and in the case of an image, all you see is an image place holder. When I look on the server in the "user_files" directory, the new file is not there!!! I reset the folder and file permissions to 777 for giggles and tried it again but I get the same deal.

Uuuuuuuuuuuuuuuugh! cry


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
My upload area is set to 755 the actual upload files set by the server are 644.
Just in case something happened to the config file did you double check the file type is allowed.
I just don't get it, same host and I don't have this issue.
My server is bobert.

Might be time to open a support ticket so Rick can take a look.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #227403 06/28/2009 5:58 PM
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
This probably is not the problem but I have found on occasion when upgrading that I find a couple of files with 0 bytes. When I
re-upload the files the problem goes away. But I get a error so I know something is wrong.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #227404 06/28/2009 7:21 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Interesting but I don't get any errors nor do I have any empty files... The file upload USED to work and I discovered this when I upgraded to 7.4.X. I thought I read somewhere here that this was fixed for 7.5?

Anyway - I see you have registered so I'll approve your reg so you can see what's up - I made a test post in the "Site Hub & Member Involvement" category called "Test Post." Clickie on the attachment linkie and see for yourself or try to attach something in a reply.


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Okay I tried a test upload all went well but the same problem.
What happens is the browser just returns the path to the file using ubb such as "http://www.forddoctorsdts.com/forums/ubbthreads.php?ubb=download&Number=103&filename=Blue%20hills.jpg"
I don't get a 404 message it just prints out the path on the screen.
Since I don't know what the actual path is but it should be something like "http://www.forddoctorsdts.com/blabla/103.jpg"
So I can't tell if the actual file uploaded.

Here is a wild guess. In Cpanel do you have hotlinking enabled.
Maybe the settings are incorrect.
Or again open a support ticket.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #227406 06/28/2009 8:15 PM
Joined: Jun 2006
Posts: 1,344
G
veteran
veteran
G Offline
Joined: Jun 2006
Posts: 1,344
Its the % symbol. The file name has a space in it so it is adding the % in it's place. I do recall it being said it was gona be fixed

Last edited by gliderdad; 06/28/2009 8:15 PM.
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Originally Posted by gliderdad
Its the % symbol. The file name has a space in it so it is adding the % in it's place. I do recall it being said it was gona be fixed
Thats not the problemo.
Just tried a straight file name no go.
Time to have Rick take a peek.

It appears that the file does not save to the server so it must be some permission issue. Possibly on the server side.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Originally Posted by gliderdad
Its the % symbol. The file name has a space in it so it is adding the % in it's place. I do recall it being said it was gona be fixed

I was thinking along those lines too so I tried different files with no spaces or underscores etc. - no luck.


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Ruben #227409 06/28/2009 9:27 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Originally Posted by Ruben
Here is a wild guess. In Cpanel do you have hotlinking enabled.
Maybe the settings are incorrect.
Or again open a support ticket.


Thanks for taking a peek Ruben. I turned off hot linking protection - I had it on and it was causing an issue somewhere - I forget the details but it wasn't with my forums. But it is off at the moment. I guess I will need support for this one - it has been malfunctioning for too long... I too think it is likely a server issue but what is causing this behavior is beyond my knowledge and ability to determine.
Attachments
injector.gif


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Here is one last item to check.
Since you already did this below there should be a file in the attachment folder.
When you test the attachment directory in the ubb control panel. It will write a file called "test.file"
Ubb had to write this file somewhere because thats how it knows the path and permission checked out ok.

See if you can find this file anywhere on your site.
Maybe you have a redirect/rewrite running in htaccess and it is not where you think it is.

Last edited by Ruben; 06/29/2009 3:30 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #227419 06/29/2009 7:41 PM
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
On the subject of hot linking protection in cpanel at lunar.
I just noticed today that all added style image sets don't display anymore. so I had to turn it off to make the images appear.
Also I noticed that file ownership has changed in the group/ownership of the files.
So this may be a double whammy to your problem.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #227424 06/29/2009 10:26 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
I knew about the test file, and as a test I deleted it and just reran the test which as usual states the folder exists and is writable. I went back into the directory and the file "test.file" reappeared. So I tries another post with a file attachment and it still does not work from there.


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Ruben #227432 06/30/2009 11:24 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Originally Posted by Ruben
On the subject of hot linking protection in cpanel at lunar.
I just noticed today that all added style image sets don't display anymore. so I had to turn it off to make the images appear.

I don't think this is related but I cannot toggle my hot linking protection on. It stays in disabled mode no matter what I do. I guess the most baffling thing here is that UBB Threads/server writes the test file but doesn't write any other file.

I have had enough for now... this is wayyyy too much for me to deal with any more. frown I do appreciate your trying though!


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
If you want to go ahead and open up a support ticket on this then I can take a closer look.

Rick #227440 07/01/2009 1:53 PM
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
On the subject of hotlinking though I did find the problem. Using cpanel to change the settings that it had written a duplicate rewrite rule in htaccess. But it did not include the referrer so it was working kinda weird that none of my background images were working. So I manually edited htaccess and removed the duplicate line.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
We can chalk this one up to a non-bug which I think we all assumed from the beginning as this was likely either a server issue or human error. The latter is the truth in this case. My bad. blush

In the attachments storage directory box I had entered "../user_files" instead of the FULL PATH which is the correct entry. The test script worked with this but it caused errors when attaching files with posts.

Why did I do it this way? Good question. When I was hosted on Network Solutions the path to the directory did not work for some reason and I resorted to the "../" method and it worked there. Earlier this year I changed to a new hosting company I kept the setting and like I mentioned, it worked in the test... but not in posts. One other oddity about this is that I also set the avatar storage directory the same way yet it worked.

Moral of the story: Just because it works doesn't mean it is correct.

And thank you Rick for the support.


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
That's weird. I would have though the same as you if the test.file worked then the path was okay.
Even though I know it is the absolute path that is needed, not a relative path. Still I would think the test link should have tested as such.
Oh well, live and learn.
At least the issue should be done with now. smile


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #227503 07/05/2009 11:43 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Definitely need to adjust the test script so it reports properly, but here's why it reports correct, but doesn't work.

The test script runs from the admin directory, so ../user_files looks one directory back from the admin directory.

When you try to actually attach a file, it runs from the forum root directory, so it looks for ../user_files, one directory above the forum root, which obviously doesn't exist wink

Rick #227620 07/11/2009 11:12 AM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Just to update this topic, everything that was corrected has worked flawlessly for the last week. I do have a question about the 2M limit on file attachments. Is that something that can be changed? I don't have any reason to so but you never know. Just curious.


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
This is set in the php.ini file by lunar.
There is a tuturial at lunar to change it.
HERE
Since 2MB is set by the php.ini.
You still have the limits imposed by UBB.
Whichever one is less will be the limit for file uploads.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Ruben #227631 07/12/2009 12:56 PM
Joined: Jun 2006
Posts: 287
enthusiast
enthusiast
Joined: Jun 2006
Posts: 287
Thank you sir! 2M seems to be adequate and I don't think anyone had needed to upload anything larger. At no one has reported an issue with it. Looks like a 20 M cap is max on Lunar. Jeez! that is asking for trouble.


Ford diesel master technician by day...
Webmaster by night! cool
FordDoctorsDTS.com running UBB Threads 7.5.4.2p2
Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
You bet.
I had one member that had a 9mb file he wanted to upload.
So I just FTP'd to the site and added a link to it.
By the way that WIKI site at lunar has a lot of good stuff to research when you have a question with them.
A lot better than the FAQ.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
1 members (Ruben), 802 guests, and 202 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)