News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Uploaded attachments/avatars not showing

Started by Jirsh, March 31, 2010, 11:56:04 AM

Previous topic - Next topic

Jirsh

Uploaded attachments and avatars are not showing. I have also tried to look at them in the attachements file manager but they give a 404 error. If I try to look at them externally the give a 403. But I can see them from the FTP so they are there. Please help. I am running RC3 btw.

Arantor


Jirsh

1.     E-Arcade      Beta4-SMF2rc1       [ Uninstall ]  [ List Files ]  [ Delete ]
2.    Aeva Media    1.1b    [ Uninstall ] [ List Files ] [ Delete ]
3.    AjaxChat Integration    3.2.1 (modified for SMF 2 RC3)    [ Uninstall ] [ List Files ] [ Delete ]
4.    Favicon    1.3    [ Uninstall ] [ List Files ] [ Delete ]
5.    ENotify    1.0.7    [ Uninstall ] [ List Files ] [ Delete ]
6.    Downloads System    1.3    [ Uninstall ] [ List Files ] [ Delete ]
7.    Contact Page    2.0    [ Uninstall ] [ List Files ] [ Delete ]
8.    BoardHover Mod    1.6.0    [ Install Mod ] [ List Files ] [ Delete ]
9.    Birthday Posts    0.12.1 Beta    [ Uninstall ] [ List Files ] [ Delete ]
10.    Karma Description Mod    2.6.8    [ Install Mod ] [ List Files ] [ Delete ]
11.    Advanced Reputation System    1.8.1    [ Install Mod ] [ List Files ] [ Delete ]
12.    AJAX Instant Quick Reply    1.0.3    [ Install Mod ] [ List Files ] [ Delete ]
13.    Ultimate Profile    0.9.1    [ List Files ] [ Delete ]
14.    Twitter and Facebook Publisher mod    2.4    [ Install Mod ] [ List Files ] [ Delete ]
15.    SMF XboxLIVE    0.1 Beta 3    [ Install Mod ] [ List Files ] [ Delete ]
16.    SMF Links    2.1.3    [ Uninstall ] [ List Files ] [ Delete ]
17.    SA FBConnect    0.1 RC3    [ Install Mod ] [ List Files ] [ Delete ]
18.    SA Battle    1.0 RC1 Rev144    [ Install Mod ] [ List Files ] [ Delete ]
19.    Referrals Mod    2.2.7.2    [ Uninstall ] [ List Files ] [ Delete ]
20.    Google Member Map 3.0    2.0 beta 2    [ Install Mod ] [ List Files ] [ Delete ]
21.    No More Ugly Avatar Scrollbars    1.0    [ Install Mod ] [ List Files ] [ Delete ]
22.    SMF Chess    2.1.2    [ Install Mod ] [ List Files ] [ Delete ]
23.    SMFShop    3.1.5.2    [ Install Mod ] [ List Files ] [ Delete ]

Arantor

And did this just start happening recently?

Jirsh

Yes. I have ran repair settings and everything is fine there as well as ran the kb exploit utility and it found no problems as well. The last two things I did before noticing this were installing smf chess and smf shop; both of which I uninstalled to see if that would fix the issue but no luck.

CapadY

Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Jirsh

I have tested those too and they seem fine.

Arantor


Jirsh

Couple of these

2: fopen(/hsphere/local/home/user/site.com/smf2/attachments/ust_Place_0U-0U-a00O.JPG) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory

8: Undefined index: login_url

8: Undefined index: chat

Arantor

Does that file exist and is it in that place?

Jirsh

That one is not.

But for example. In this thread all images are present and verified with FTP. The last image that does not show up despite the file being there. All three images are in the attachments folder with same permissions. I dont know if somehow the encryption is getting messed up or what.

Example

Arantor

That file name isn't an encrypted filename.

How old is your forum?

Jirsh

2005. But everything was working a couple days ago.

Arantor


Jirsh

Quote from: Jirsh on March 31, 2010, 12:38:56 PM
The last two things I did before noticing this were installing smf chess and smf shop; both of which I uninstalled to see if that would fix the issue but no luck.

Arantor

Yes, I read that.

So that was in the last couple of days or before/after that?

Jirsh

last couple days. I noticed the issue afterwards (yesterday).


Jirsh

Ok, I believe I have narrowed down the issue. If i use a stock subs.php from a new install on my forum; everything shows fine but when I use my subs.php they stop working. I remember doing a manual edit on this but I undid it. Maybe there is a space or something throwing it off. I have attached my subs.php. Thanks in advance.

Arantor

Well, you can run a compare just as easily as I did with WinMerge or similar to show you the full list of changes. There's quite a few, menu-related, Aeva related... but the one that stands out...

My RC3 - vanilla install
// Remove special accented characters - ie. sí.
$clean_name = strtr($filename, 'ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ', 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
$clean_name = strtr($clean_name, array('Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss', 'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u'));


Your RC3 Subs.php file
// Remove special accented characters - ie. sí.
$clean_name = strtr($filename, 'ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ', 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
$clean_name = strtr($clean_name, array('Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss', 'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u'));


Morale of the story: don't use a web editor to edit PHP files.

Jirsh


Arantor

*headdesk*

No, that's an SMF bug. Mine didn't have entities, yours did.

Grab WinMerge. Compare the files, you'll see the difference.

Jirsh

The line you pointed out was it. Do you know if any of the other files have that line which my editor may have changed

Arantor

You could always do a comparison using WinMerge of all the files...

Advertisement: