Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43293
Total Topics: 7522
Most Online Today: 118
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 103
Total: 104

Author Topic: Update... Crashed Forum  (Read 6444 times)

0 Members and 1 Guest are viewing this topic.

Offline Saftek

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Update... Crashed Forum
« on: March 11, 2014, 11:15:08 pm »
Ran the 5.0.6 - over the version I downloaded 03/07... now get

Fatal error: Cannot redeclare GalleryMemberUnviewedItems() (previously declared in /home/content/78/9133478/html/forum/Sources/Subs.php:4456) in /home/content/78/9133478/html/forum/Sources/Subs.php on line 4534

cannot get anywhere in SMF, can't get to package manager to uninstall.

How do I fix this!

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16451
    • View Profile
Re: Update... Crashed Forum
« Reply #1 on: March 11, 2014, 11:17:48 pm »
Either attach your Sources/Subs.php

Or remove the duplicate function called " GalleryMemberUnviewedItems"  from that file.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Saftek

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Re: Update... Crashed Forum
« Reply #2 on: March 11, 2014, 11:29:58 pm »
Okay, apparently the old subs.php file was "~"d  and a new one created. I deleted the new one and renamed the old one. Looks like everything is working.

I'm not sure what happened here. Thanks for the prompt response. 

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16451
    • View Profile
Re: Update... Crashed Forum
« Reply #3 on: March 11, 2014, 11:32:01 pm »
Glad to help.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Michel68

  • SMF Gallery Pro Customer
  • Full Member
  • *****
  • Posts: 165
    • View Profile
Re: Update... Crashed Forum
« Reply #4 on: May 30, 2015, 12:31:36 pm »
I ran today into the same problem, while the database says I am on 7.0 instead of 7.0.3 I already had ....I just installed 7.0.3 again with the result of this error - blank screen only with php debug I see the error. It seems that the installer insert at the end the code double. I did a compare with the working and the not working version of subs.php

at the end end this is entry double

Code: [Select]
function GalleryMemberUnviewedItems()
{
global $txt, $context, $smcFunc, $mbname, $modSettings, $scripturl, $user_info;

if (empty($modSettings['gallery_show_unviewed_items']))
return '';

if ($context['user']['is_guest'] == 1)
return '';

if (($total = cache_get_data('smfgallery_unseen_' . $user_info['id'], 10)) == null)
{

if (!$context['user']['is_guest'])
$groupsdata = implode($user_info['groups'],',');
else
$groupsdata = -1;

$dbresult = $smcFunc['db_query']('', "
SELECT
COUNT(*) as total
FROM {db_prefix}gallery_pic as p
LEFT JOIN {db_prefix}members AS m ON (p.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}gallery_catperm AS c ON (c.ID_GROUP IN ($groupsdata) AND c.ID_CAT = p.ID_CAT)
LEFT JOIN {db_prefix}gallery_log_mark_view AS v ON (p.ID_PICTURE = v.ID_PICTURE AND v.ID_MEMBER = " . $user_info['id'] . " AND v.user_id_cat = p.user_id_cat)
LEFT JOIN {db_prefix}gallery_usersettings AS s ON (s.ID_MEMBER = m.ID_MEMBER)
WHERE v.ID_PICTURE IS NULL AND (((s.private =0 || s.private IS NULL ) AND (s.password = '' || s.password IS NULL )  AND p.USER_ID_CAT !=0 AND p.approved =1) || (p.approved =1 AND p.USER_ID_CAT =0 AND (c.view IS NULL || c.view =1)))
 ");
$row = $smcFunc['db_fetch_assoc']($dbresult);
$total = $row['total'];
$smcFunc['db_free_result']($dbresult);
cache_put_data('smfgallery_unseen_' . $user_info['id'], $total, 10);
}

if (!empty($total))
$total = ' [' . $total .']';

return $total;

}

function GalleryMemberUnviewedItems()
{
global $txt, $context, $smcFunc, $mbname, $modSettings, $scripturl, $user_info;

if (empty($modSettings['gallery_show_unviewed_items']))
return '';

if ($context['user']['is_guest'] == 1)
return '';

if (($total = cache_get_data('smfgallery_unseen_' . $user_info['id'], 10)) == null)
{

if (!$context['user']['is_guest'])
$groupsdata = implode($user_info['groups'],',');
else
$groupsdata = -1;

$dbresult = $smcFunc['db_query']('', "
SELECT
COUNT(*) as total
FROM {db_prefix}gallery_pic as p
LEFT JOIN {db_prefix}members AS m ON (p.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}gallery_catperm AS c ON (c.ID_GROUP IN ($groupsdata) AND c.ID_CAT = p.ID_CAT)
LEFT JOIN {db_prefix}gallery_log_mark_view AS v ON (p.ID_PICTURE = v.ID_PICTURE AND v.ID_MEMBER = " . $user_info['id'] . " AND v.user_id_cat = p.user_id_cat)
LEFT JOIN {db_prefix}gallery_usersettings AS s ON (s.ID_MEMBER = m.ID_MEMBER)
WHERE v.ID_PICTURE IS NULL AND (((s.private =0 || s.private IS NULL ) AND (s.password = '' || s.password IS NULL )  AND p.USER_ID_CAT !=0 AND p.approved =1) || (p.approved =1 AND p.USER_ID_CAT =0 AND (c.view IS NULL || c.view =1)))
 ");
$row = $smcFunc['db_fetch_assoc']($dbresult);
$total = $row['total'];
$smcFunc['db_free_result']($dbresult);
cache_put_data('smfgallery_unseen_' . $user_info['id'], $total, 10);
}

if (!empty($total))
$total = ' [' . $total .']';

return $total;

}

just removing it and all is fine, the same code stands already above.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16451
    • View Profile
Re: Update... Crashed Forum
« Reply #5 on: May 30, 2015, 12:33:24 pm »
That would only happen if you did a full install twice or files were not removed when you uninstalled the old version.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Michel68

  • SMF Gallery Pro Customer
  • Full Member
  • *****
  • Posts: 165
    • View Profile
Re: Update... Crashed Forum
« Reply #6 on: May 30, 2015, 12:41:06 pm »
I was playing with a database convert latin1 <> utf-8 and so I already had 7.0.3 as gallery code but the database was a restore.
However I just want give you feedback, possible you can catch up this, because you will see after a reinstall only a blank screen and getting in panic
while the whole board is gone *lol*

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
4470 Views
Last post August 27, 2007, 07:04:37 pm
by tadams720
1 Replies
3766 Views
Last post November 09, 2007, 12:34:50 pm
by Jump1979man
2 Replies
3650 Views
Last post January 13, 2014, 04:15:55 pm
by Gman
1 Replies
3938 Views
Last post June 12, 2014, 07:57:35 am
by SMFHacks
1 Replies
2344 Views
Last post June 30, 2017, 07:19:57 am
by SMFHacks

+- Recent Topics

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

Powered by EzPortal