News:

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

Main Menu

Undefined index: 28 ?action=dlattach;attach=3528;type=avatar

Started by Game.ruler, September 02, 2012, 05:45:41 PM

Previous topic - Next topic

Game.ruler

I am getting too much errors in my error log.

Apply Filter: Only show the error messages of this URL
/index.php?action=dlattach;attach=3528;type=avatar
Apply Filter: Only show the errors with the same message
8: Undefined index: 28
Apply Filter: Only show the errors from this file
File: /public_html/Sources/Subs.php
Line: 3729


Here is code of subs.php from line 3721 to 3740-

if (empty($db_character_set) || $db_character_set != 'utf8')
{
$clean_name = strtr($filename,
"\x8a\x8e\x9a\x9e\x9f\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xff",
'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
$clean_name = strtr($clean_name, array("\xde" => 'TH', "\xfe" =>
'th', "\xd0" => 'DH', "\xf0" => 'dh', "\xdf" => 'ss', "\x8c" => 'OE',
"\x9c" => 'oe', "\c6" => 'AE', "\xe6" => 'ae', "\xb5" => 'u'));
}
// Sorry, no spaces, dots, or anything else but letters allowed.
$clean_name = preg_replace(array('/\s/', '/[^\w_\.\-]/'), array('_', ''), $clean_name);

$enc_name = $attachment_id . '_' . strtr($clean_name, '.', '_') . md5($clean_name);
$clean_name = preg_replace('~\.[\.]+~', '.', $clean_name);

if ($attachment_id == false || ($new && empty($modSettings['attachmentEncryptFilenames'])))
return $clean_name;
elseif ($new)
return $enc_name;


Using version 2.0 and installed mods are-
1. Personal Messages to Membergroups 1.4.2 9
2. Sortable Packages (and Installed Time) 1.3.3
3. Alternate User Posting 1.0.1
4. Smart Pagination 0.6
5. Show BBCode to guests 0.1.7
6. Restrict Quote 2.0
7. PM to New Members 1.2
8. Optimus Brave 1.6.6
9. NoFollow All Links 1.2.1
10. Thank-o-matic 3.0
11. Mobile Device Detect 0.2.2
12. Enable or Disable "Last Edit: by" for Administrators 1.4
13. Activity in Profile 1.1
14. Activity Bar 1.1
15. SimpleAds 1.0.1
16. Bookmarks 2.5
17. Ultimate Profile 0.9.1
18. Ohara YouTube Embed 1.0
19. Relative Dates 1.2
20. Tidy Child Boards 1.4
21. SimplePortal 2.3.5


Also i have moved today to a new host.
And 2 of my attachments directories have been lost. There were avatars in these directories too.

Please help how to solve this problem.
Thank you.

Kays

Hi, got into the Admin CP > Forum > Attachments and avatars > Attachment settings On that page is a [Configure Multiple Attachment Directories] link. Click on that and it'll take you the a page where the attachment directories are listed. Make sure the paths for both directories are correct. If they are not correct, you'll see a warning to that effect.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

mashby

QuoteAlso i have moved today to a new host.
And 2 of my attachments directories have been lost. There were avatars in these directories too.
That's the core of the issue. How did you transfer hosts? Also, what Kays said...
Always be a little kinder than necessary.
- James M. Barrie

Game.ruler

thanks kays and mashby. Yes i have configured few directories, but there are 2 directories which are empty. And i am able to see repair option there.
If i repair it, then if i again manually upload attachments in those directories, then those attachments will start working na?

Kays

No, do not use repair_settings.php to correct the attachments paths. That'll mess you up.

It's best to do that in the Admin CP

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Game.ruler

hi kays, i was also talking about doing it in admin cp.
But if i repair in that way, all those missing entries will be removed from smf_attachments table.
If i browse to avatars in admin cp, and remove them manually, is it will be good?
Because i want to keep other attachments entry in smf_attachments table, because i will upload them within few days.

Kays

I'm refering to just correcting the paths. Don't do a repair there while those directories or files are missing.

Do you have the missing directories and can they be uploaded?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Game.ruler

yes i can upload them. I have removed all avatar's entries from admin cp. Now its working fine.
Thank you.

Advertisement: