SimplePortal

Support => English Support => Topic started by: candidosa2 on September 16, 2008, 11:53:56 PM

Title: Database Error
Post by: candidosa2 on September 16, 2008, 11:53:56 PM
i upgrad my database and uninstall Sp install new  i see that error..

(http://i276.photobucket.com/albums/kk39/apllic/sshot-1-17.png)

thank you
Title: Re: Database Error
Post by: Nathaniel on September 17, 2008, 12:01:52 AM
Which versions of SimplePortal and SMF are you running?

Where are you receiving these errors?
Title: Re: Database Error
Post by: candidosa2 on September 17, 2008, 12:08:37 AM
smf 1.1.6
SP 2.04
When in home page....
Title: Re: Database Error
Post by: Nathaniel on September 17, 2008, 12:19:48 AM
Try uninstalling and reinstalling the mod, its likely that there are some errors with the Simple Portal tables (remember to back it up). This will only work if you remove the 'sp_' tables, which will remove your data...

You could also try running this query in phpmyadmin:
Quote
ALTER TABLE {db_prefix}sp_blocks ADD force_view tinyint(2) unsigned NOT NULL default 0,

Replace '{db_prefix}' with 'smf_' or your database prefix.
Title: Re: Database Error
Post by: candidosa2 on September 17, 2008, 12:52:55 AM
where can finder that query

Code: [Select]
# mf_attachments
# Browse smf_ban_groups
# Browse smf_ban_items
# Browse smf_boards
# Browse smf_board_permissions
# Browse smf_calendar
# Browse smf_calendar_holidays
# Browse smf_categories
# Browse smf_collapsed_categories
# Browse smf_groupmods
# Browse smf_log_actions
# Browse smf_log_activity
# Browse smf_log_banned
# Browse smf_log_boards
# Browse smf_log_errors
# Browse smf_log_floodcontrol
# Browse smf_log_karma
# Browse smf_log_mark_read
# Browse smf_log_notify
# Browse smf_log_online
# Browse smf_log_polls
# Browse smf_log_search_messages
# Browse smf_log_search_results
# Browse smf_log_search_subjects
# Browse smf_log_search_topics
# Browse smf_log_topics
# Browse smf_membergroups
# Browse smf_members
# Browse smf_messages
# Browse smf_message_icons
# Browse smf_moderators
# Browse smf_package_servers
# Browse smf_pagerank
# Browse smf_permissions
# Browse smf_personal_messages
# Browse smf_pm_recipients
# Browse smf_polls
# Browse smf_poll_choices
# Browse smf_sessions
# Browse smf_settings
# Browse smf_smileys
# Browse smf_sp_articles
# Browse smf_sp_blocks
# Browse smf_sp_categories
# Browse smf_sp_functions
# Browse smf_themes
# Browse smf_topics
Title: Re: Database Error
Post by: Nathaniel on September 17, 2008, 12:55:40 AM
The correct table is 'smf_sp_blocks' for you.
Title: Re: Database Error
Post by: [SiNaN] on September 17, 2008, 04:18:10 AM
Just upload the file attached to you forum root and call it from your browser.
Title: Re: Database Error
Post by: candidosa2 on September 17, 2008, 08:38:06 AM
thank you
Now she work Fine


Title: Re: Database Error
Post by: Ace on September 21, 2008, 09:29:54 PM
Hi i get same exact error

from the same location, at my homepage

heres a list of the mods i have installed:

1. SMF Arcade 2.0.15
2. Google Member Map 1.0 beta
3. SMFShop 3.0
4. SMF Shop Lottery 1.0 
5. Welcome Topic Mod 1.1 
6. audiblepm 1.5 1.5 
7. leaders 1.0 
8. simplemp 3.1 
9. SMFPets 0.2 
10. MoodBobels 2.1 
11. SMF 1.0.14 / 1.1.6 Update 1.0 
12. SMF Shop - Jeeves The Butler 1.0.2 
13. Custom_Greeting_Depending_on_Time 0.4 
14. Tar Game Uploader 1.0 
15. Global Headers Footers 1.4.1 
16. Metal Gear Avatars 1.0 
17. Futurama Avatars 1.0 
18. Gaming Avatars 1.0 
19. NHL Team Logos 1.0 
20. Invite 1.14 
21. SMFShop Inventory Post Mod 0.2 
22. Global Announcements 1.0 
23. The Simpsons Avatars 1.0 
24. SMFChess 1.0 
25. Paid Subscriptions 0.18 
26. Colorized Membergroups 1.0 
27. SMF Arcade Shop Mod 1.0.0
28. Streaming 3 4.2.2b
29. VisualWarning 1.42 
30. Colorize Boards 3.0 
31. Reg Bar 1.0.2
32. RSS Feed Icon 1.1 
33. Shop Item: Profile Image 0.1 
34. Password Protect Boards 0.2 
35. SMF Arcade Trophies Mod 1.1.1
36. Affiliates 1.1 
37. SimplePortal 2.0.4
Title: Re: Database Error
Post by: Nathaniel on September 21, 2008, 09:37:26 PM
Have you tried running the 'upgrade.php' file attached to [SiNaN]'s post (http://simpleportal.net/index.php?topic=334.msg2036#msg2036)?
Title: Re: Database Error
Post by: Ace on September 22, 2008, 08:30:18 AM
Have you tried running the 'upgrade.php' file attached to [SiNaN]'s post (http://simpleportal.net/index.php?topic=334.msg2036#msg2036)?

Yes, but it didnt work
Title: Re: Database Error
Post by: Nathaniel on September 22, 2008, 08:33:01 AM
Okay, what errors are you receiving in your forum error log?
Title: Re: Database Error
Post by: Ace on September 22, 2008, 09:57:54 AM
Okay, what errors are you receiving in your forum error log?

These are the errors

8: Undefined index: pets
File: /home/snake/public_html/forum/Sources/Load.php
Line: 1203

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: gameDirectory
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 79

8: Undefined index: arcade_mins
File: /home/snake/public_html/forum/Sources/ArcadeStats.php
Line: 275

8: Undefined index: arcade_hours
File: /home/snake/public_html/forum/Sources/ArcadeStats.php
Line: 274

8: Undefined index: arcade_days
File: /home/snake/public_html/forum/Sources/ArcadeStats.php
Line: 273

8: Undefined index: arcade_weeks
File: /home/snake/public_html/forum/Sources/ArcadeStats.php
Line: 272

Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAR_LENGTH(b.passwd) = 0
AND approved = 1
AND publish = 1' at line 6
File: /home/snake/public_html/forum/Sources/SPortal.php
Line: 132

2: Cannot modify header information - headers already sent by (output started at /home/snake/public_html/smf/index.php:83)
File: /home/snake/public_html/forum/Sources/Subs.php
Line: 3396

2: Cannot modify header information - headers already sent by (output started at /home/snake/public_html/smf/index.php:83)
File: /home/snake/public_html/forum/Sources/Subs.php
Line: 3393

2: Cannot modify header information - headers already sent by (output started at /home/snake/public_html/smf/index.php:83)
File: /home/snake/public_html/forum/Sources/Subs.php
Line: 3387

2: Cannot modify header information - headers already sent by (output started at /home/snake/public_html/smf/index.php:83)
File: /home/snake/public_html/forum/Sources/Subs.php
Line: 3386

2: Cannot modify header information - headers already sent by (output started at /home/snake/public_html/forum/index.php:83)
File: /home/snake/public_html/forum/Sources/Load.php
Line: 2033

2: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/snake/public_html/forum/index.php:83)
File: /home/snake/public_html/forum/Sources/Load.php
Line: 2029

2: Cannot modify header information - headers already sent by (output started at /home/snake/public_html/forum/index.php:83)
File: /home/snake/public_html/forum/Sources/Subs.php
Line: 3290


theres 15 pages all together

I can give you access if you like...
Title: Re: Database Error
Post by: Runic on September 22, 2008, 01:47:03 PM
im curious are you running it while logged in?
Title: Re: Database Error
Post by: asude on September 22, 2008, 02:10:03 PM
turn off the Arcade block, you probably have a different version than portal supports.

and to people developing this, it could be also about this error:

Code: [Select]
Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAR_LENGTH(b.passwd) = 0
AND approved = 1
AND publish = 1' at line 6
File: /home/snake/public_html/forum/Sources/SPortal.php
Line: 132

i guess it is Password Protect Boards by Dragooon. it modifies the $user_info['query_see_board'] and you use it in article query. maybe a conflict or maybe a problem caused by that mod.
Title: Re: Database Error
Post by: Ace on September 22, 2008, 02:25:21 PM
Yes im loggin and when i go to homepage its there, when i log out its there..but only on homepage.
Title: Re: Database Error
Post by: Ace on September 22, 2008, 02:29:21 PM
turn off the Arcade block, you probably have a different version than portal supports.

and to people developing this, it could be also about this error:

Code: [Select]
Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHAR_LENGTH(b.passwd) = 0
AND approved = 1
AND publish = 1' at line 6
File: /home/snake/public_html/forum/Sources/SPortal.php
Line: 132



i guess it is Password Protect Boards by Dragooon. it modifies the $user_info['query_see_board'] and you use it in article query. maybe a conflict or maybe a problem caused by that mod.


Yes you are correct!!! it was that password board mod... i uninstalled it and everything came back... THANKS!!!
Title: Re: Database Error
Post by: asude on September 22, 2008, 02:39:06 PM
actually i tested and didn't get any problems. no conflict. don't know what happened but i'm sure it is about $user_info['query_see_board']. maybe there was a problem with installation of the other mod.
Title: Re: Database Error
Post by: Ace on September 22, 2008, 02:45:04 PM
I now only have this error still showing..

8: Undefined index: pets
File: /home/snake/public_html/forum/Sources/Load.php
Line: 1184

Title: Re: Database Error
Post by: Eliana Tamerin on September 22, 2008, 02:46:00 PM
That's unrelated to SimplePortal. My guess is you have SMF Shop installed, with the SMF Pets addon. I'd suggest reporting that error to the Pet's author.
Title: Re: Database Error
Post by: Ace on September 22, 2008, 02:47:01 PM
ok how about this one it came up after i refreshed..

8: Undefined index: action
File: /home/snake/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 19
Title: Re: Database Error
Post by: Ace on September 22, 2008, 02:52:01 PM
Found it, its in this code that was told to me that it was for the version of SMF and simple portal im using.

Quote
function hof($count = 10, $time = - 1)
{
   global $db_prefix, $scripturl, $txt,  $modSettings;

   $where = '';

   if ($time == 'current')
      $where = 'AND championTo = 0';
   elseif ($time != -1)
      $where = "AND championFrom > $time";

   $results = db_query("
      SELECT  game.ID_GAME, game.gameName,game.thumbnail, game.gameDirectory, score.score, score.position,
         IF(championFrom > 0, (IF(championTo = 0, UNIX_TIMESTAMP(), championTo) - championFrom), 0) AS championDuration,
         IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem.realName, '') AS realName, IF(championTo = 0, 1, 0) AS current
      FROM ({$db_prefix}arcade_scores AS score, {$db_prefix}arcade_games AS game)
         LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = score.ID_MEMBER)
      WHERE game.ID_GAME = score.ID_GAME
         $where
      HAVING championDuration > 0
      ORDER BY IF(championFrom > 0, (IF(championTo = 0, UNIX_TIMESTAMP(), championTo) - championFrom), 0) DESC
      LIMIT $count", __FILE__, __LINE__);

   $top = array();
   $max = -1;

   while ($score = mysql_fetch_assoc($results))
   {
      if ($max == -1)
         $max = $score['championDuration'];

      $top[] = array(
         'game_name' => $score['gameName'],
         'game_link' => '<a href="' . $scripturl . '?action=arcade;sa=play;game=' . $score['ID_GAME'] . '">' .  $score['gameName'] . '</a>',
         'member_name' => $score['realName'],
         'member_link' => !empty($score['realName']) ? '<a href="' . $scripturl . '?action=profile;u=' . $score['ID_MEMBER'] . '">' .  $score['realName'] . '</a>' : $txt['arcade_guest'],
         'duration' => format_time_ago($score['championDuration']),
         'precent' => ($score['championDuration'] / $max) * 100,
         'current' => $score['current'] == 1,
         'thumbnail' =>$score['gameDirectory']."/".$score['thumbnail'],
            'score' => round($score['score'],3),
      );
   }

   if (count($top) == 0)
      return false;
   elseif ($count > 1)
      return $top;
   else
      return $top[0];
}
   global $scripturl, $txt,  $boardurl, $context, $settings, $arcsettings;

$top_player = hof(10);
   $i=0; //players position
         echo '
   <table width="100%"  border="0" cellspacing="1" cellpadding="1">
       <tr>
       <td width="20%" align="center" nowrap class="titlebg">
         <b>Champion in Game</b>
       </td>
       <td width="25%" align="center" nowrap class="titlebg">
         <b>Champions Name</b>
       </td>
       <td width="15%" align="center" nowrap class="titlebg">
         <b>High Score</b>
       </td>
       <td width="20%" align="center" nowrap class="titlebg">
         <b>Champion Since</b>
       </td>
       </tr>
      </table>';
     foreach ($top_player as $row)
      {
         echo '
<table width="100%" border="0" cellspacing="1" cellpadding="4">
    <tr>
      <td align="left" width="20%" class="windowbg">
          <img src="',$boardurl,'/','Games',$row['gameDirectory']."/".$row['thumbnail'],'"></a>  ', $row['game_link'],'<br/>
        </td>
      <td align="center" width="25%" nowrap class="windowbg2">
          ', $row['member_link'],'
        </td>
      <td align="center" width="15%" nowrap="nocrap" class="windowbg">
          ', $row['score'],'
        </td>
      <td align="center" width="20%" class="windowbg2">
        ', $row['duration'],'
        
     </td>
   </tr>
   ';
     $i++;
      }
      echo '
</table>';

i removed the code and only 1 error remains  8)  Thanks i go with 1 error over 15 pages of error any day, but would like zero errors  8) but we can't have everything
Title: Re: Database Error
Post by: Ace on September 22, 2008, 05:17:18 PM
I now only have this error still showing..

8: Undefined index: pets
File: /home/snake/public_html/forum/Sources/Load.php
Line: 1184




Well incase anyone else ask i found the answer where i was told to look

http://www.daniel15.com/forum/index.php/topic,836.msg5177/topicseen.html#msg5177 (http://www.daniel15.com/forum/index.php/topic,836.msg5177/topicseen.html#msg5177)

Just had to edit

change:
'pets' => $profile['pets'],

to
'pets' => &$profile['pets'],



Thanks Eliana Tamerin

SimplePortal 2.3.8 © 2008-2024, SimplePortal