Fatal error Admin Dashboard

I was following some instructions on adding a menu item to the admin section. I kept receiving an error so gave up, but when I went to refresh my screen I got this

Parse error: syntax error, unexpected '}' in inc/admin_design.inc.php(119) : runtime-created function on line 1

Fatal error: Function name must be a string in /inc/admin_design.inc.php on line 120

Here is the code from that section of the file lines 118 to 122

{
$func = create_function( '', $aItem['Check'] );
if( !$func() )
return '';
}

I have no idea what happend I never opened this file I was only in my admin dashboard.

Any help would be great

Thanks
Adam

Quote · 31 May 2009

Please I really need help on this one. I went to a back up and copied the file in question and still get the same error. I even replaced it with a fresh file from a the orginal download.

I cant get into my dashboard!!

Quote · 31 May 2009

someone i hope will be able to help you soon, keep trying for now.

 

Quote · 31 May 2009

I messaged support as well. Worst case scenriao sp? I will have to have my hosting company to restor the whole site back to yesterday.

Quote · 31 May 2009

I'm guessing your stuck between what you were building and not completing the process. Check SQL DB and ensure what you try to create is dropped from the DB. They try to access your Admin Dash.

 

Also ensure you don't have spaces in your scripts. What Editor do you use?

Quote · 31 May 2009

My Html editor is Dreamweaver.

I deleted my last two entrances into the database and still get the error.

It looks like I may have to revert to yesterdays back up completly

Quote · 31 May 2009

Well its gonna cost $150 to do a restore. So if there is anyone out there that can help me on this I would be greatfull

Quote · 1 Jun 2009

You can try dropping the two admin menu tables in your database and run a query with the originals. That will put the menus back to where you started with a fresh install.

 

Those two are

  • Browse AdminMenu
  • Browse AdminMenuCateg
  •  

    If you are using 6.16 I can give you the replacement from my database as it hasn't been altered.

    Quote · 2 Jun 2009

    THIS IS FOR 6.16

    --
    -- Table structure for table `AdminMenuCateg`
    --

    CREATE TABLE IF NOT EXISTS `AdminMenuCateg` (
      `ID` int(10) unsigned NOT NULL auto_increment,
      `Title` varchar(50) NOT NULL default '',
      `Order` int(11) NOT NULL default '0',
      `Icon` varchar(50) NOT NULL default '',
      `Icon_thumb` varchar(50) NOT NULL default '',
      `User` enum('admin','aff','moderator') NOT NULL default 'admin',
      PRIMARY KEY  (`ID`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

    --
    -- Dumping data for table `AdminMenuCateg`
    --

    INSERT INTO `AdminMenuCateg` (`ID`, `Title`, `Order`, `Icon`, `Icon_thumb`, `User`) VALUES
    (1, 'Users', 0, 'guy.png', 'guy_t.png', 'admin'),
    (2, 'Content', 1, 'attach.png', 'attach_t.png', 'admin'),
    (3, 'Tools', 2, 'tools.png', 'tools_t.png', 'admin'),
    (4, 'Plugins', 3, 'plugin.png', 'plugin_t.png', 'admin'),
    (5, 'Settings', 5, 'setup.png', 'setup_t.png', 'admin'),
    (6, 'Affiliate', 6, 'guy.png', 'guy_t.png', 'aff'),
    (7, 'Builders', 4, 'cubes.png', 'cubes_t.png', 'admin');

    Quote · 2 Jun 2009

    AGAIN - FOR 6.16

     

    --
    -- Table structure for table `AdminMenu`
    --

    CREATE TABLE IF NOT EXISTS `AdminMenu` (
      `ID` int(10) unsigned NOT NULL auto_increment,
      `Title` varchar(50) NOT NULL default '',
      `Url` varchar(255) NOT NULL default '',
      `Desc` varchar(255) NOT NULL default '',
      `Check` varchar(255) NOT NULL default '',
      `Order` float NOT NULL default '0',
      `Categ` int(10) unsigned NOT NULL default '0',
      `Icon` varchar(100) NOT NULL default '',
      PRIMARY KEY  (`ID`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=83 ;

    --
    -- Dumping data for table `AdminMenu`
    --

    INSERT INTO `AdminMenu` (`ID`, `Title`, `Url`, `Desc`, `Check`, `Order`, `Categ`, `Icon`) VALUES
    (1, 'Members', 'profiles.php', 'For members profiles management\n', '', 0, 1, 'members.gif'),
    (2, 'Affiliates', '../aff/partners.php', 'This is for setting up your affiliate programs and your affiliate program members', '', 1, 1, 'affilates.gif'),
    (3, 'Moderators', 'moderators.php', 'For managing your moderators who can help you with site administration', '', 2, 1, 'moderators.gif'),
    (4, 'Events', 'sdating_admin.php', 'Provides you with the ability to manage Events created by members and by the administrator, too. You have the capacity to edit, delete or view event participants and matches', '', 6, 2, 'events.gif'),
    (5, 'Groups', 'groups.php', 'Here you are able to manage groups and its categories', '', 8, 2, 'groups.gif'),
    (6, 'Feedback', '../story.php', 'This is for feedback administration, and you can edit, delete or activate site member feedback', '', 12, 2, 'feedback.gif'),
    (8, 'Links Page', 'links.php', 'Here you can manage links on your links page', '', 4, 3, 'links_page.gif'),
    (9, 'Admin Articles', 'articles.php', 'This is the place for controlling your site articles: edit, delete or add them', '', 5, 3, 'articles.gif'),
    (10, 'Site News', 'news.php', 'This is for managing the news area on your web site - add, edit, activate or delete the old items', '', 6, 3, 'site_news.gif'),
    (11, 'Random Quotes', 'quotes.php', 'You can manage quotes, which appear on the index page, from this section', '', 7, 3, 'random_quotes.gif'),
    (12, 'Mass Mailer', 'notifies.php', 'Using this function you are able to send a newsletter to your site members', '', 0, 3, 'mass_mailer.gif'),
    (13, 'Money Calculator', 'finance.php', 'Provides you with site income information to help you in administration', '', 1, 3, 'money_calculator.gif'),
    (14, 'Database Backup', 'db.php', 'Make a backup of your site database with this utility', '', 2, 3, 'database_backup.gif'),
    (15, 'Ray Suite', 'javascript:openRayWidget(''global'', ''admin'', ''{adminLogin}'', ''{adminPass}'');', 'Ray Community Widget Suite administration panel is available here', 'return ( ''on'' == getParam( ''enable_ray'' ) );', 0, 4, 'boonex_ray_widgets.gif'),
    (16, 'Orca Forum', '../orca/', 'Administration Panel for Orca - Interactive Forum Script', '', 1, 4, 'boonex_orca_forum.gif'),
    (17, 'Polls', 'post_mod_ppolls.php', 'Members can create their own polls, and you can moderate them right here', '', 10, 2, 'polls.gif'),
    (19, 'Banners', 'banners.php', 'Provides you with the ability to manage banners on your web site', '', 8, 3, 'banners.gif'),
    (20, 'Photos', 'browseMedia.php?type=photo', 'For management of pictures uploaded / shared by site members', '', 0, 2, 'photos.gif'),
    (22, 'Blogs', 'post_mod_blog.php', 'Site administrators can check the content written in the users'' blog to avoid unwanted or prohibited expressions', '', 4, 2, 'blogs.gif'),
    (23, 'Profiles', '../aff/profiles.php', '', '', 0, 6, ''),
    (24, 'Money Calculator', '../aff/finance.php', '', '', 1, 6, 'money_calculator.gif'),
    (25, 'My Link', '../aff/help.php', '', '', 2, 6, 'links_page.gif'),
    (26, 'Admin Password', 'global_settings.php?cat=ap', 'Change a password for access to administration panel here', '', 0, 5, 'admin_password.gif'),
    (27, 'Email Templates', 'global_settings.php?cat=4', 'For setting up email texts which are sent from your website to members automatically', '', 3, 5, 'email_templates.gif'),
    (28, 'Membership Levels', 'memb_levels.php', 'For setting up different membership levels, different actions for each membership level and action limits', '', 5, 5, 'membership_levels.gif'),
    (31, 'CSS Styles Editor', 'css_file.php', 'For CSS files management: to make changes in your current template', '', 6, 5, 'css_styles_editor.gif'),
    (34, 'Payments Settings', 'payment_providers.php', 'For setting up Payment Providers you want to use', '', 8, 5, 'payment_settings.gif'),
    (35, 'Fields Builder', 'fields.php', 'For member profile fields management', '', 0, 7, 'photo_page_builder.gif'),
    (39, 'Blogs Settings', 'global_settings.php?cat=22', 'For member blogs settings management', '', 9, 5, 'blogs_settings.gif'),
    (40, 'News Settings', 'global_settings.php?cat=10', 'For setting up News parameters', '', 10, 5, 'news_settings.gif'),
    (41, 'Polls Settings', 'global_settings.php?cat=20', 'For enabling/disabling polls, setting up number of polls a site member can create', '', 13, 5, 'polls.gif'),
    (42, 'Groups Settings', 'global_settings.php?cat=24', 'Group feature management: notification emails, the thumbs size, etc.', '', 11, 5, 'groups_settings.gif'),
    (43, 'Tags Settings', 'global_settings.php?cat=25', 'For tags settings, which will work for search and browse options', '', 12, 5, 'tags_settings.gif'),
    (66, 'Advanced Settings', 'global_settings.php?cat=1&', 'More enhanced settings for your site features', '', 2, 5, 'adv_settings.gif'),
    (50, 'Database Pruning', 'global_settings.php?cat=11', 'For Database management: clearing of old, unnecessary information', '', 15, 5, 'database_prunning.gif'),
    (52, 'Basic Settings', 'basic_settings.php', 'For managing site system settings', '', 1, 5, 'basic_settings.gif'),
    (55, 'Meta Tags', 'global_settings.php?cat=19', 'Setting up Meta Tags to facilitate search engine indexing for your website', '', 16, 5, 'meta_tags.gif'),
    (59, 'Moderation Settings', 'global_settings.php?cat=6', 'To enable/disable pre-moderation of members profiles, members photos, etc.', '', 14, 5, 'members.gif'),
    (60, 'Languages Settings', 'lang_file.php', 'For languages management your website is using and making changes in your website content', '', 4, 5, 'languages_settings.gif'),
    (62, 'Pages Builder', 'pageBuilder.php', 'Compose blocks for the site pages here', '', 2, 7, 'homepage_builder.gif'),
    (63, 'Navigation Menu Builder', 'menu_compose.php', 'For top menu items management', '', 1, 7, 'navigation_menu_builder.gif'),
    (65, 'Classifieds', 'manage_classifieds.php', 'Administrator can manage classifieds categories, subcategories, etc.', '', 11, 2, 'classifieds.gif'),
    (67, 'Videos', 'browseMedia.php?type=video', 'For management of video files which have been uploaded / shared by site members', '', 1, 2, 'videos.gif'),
    (68, 'Music', 'browseMedia.php?type=music', 'For management of music files which have been uploaded / shared by site members', '', 2, 2, 'music.gif'),
    (74, 'Admin Polls', 'polls.php', 'For site poll posting and management', '', 3, 3, 'admin_polls.gif'),
    (76, 'Profile Photos', 'post_mod_photos.php?media=photo&status=passive', 'For pictures uploaded by a member for pre-moderation. This can be helpful to protect your site from nude or other unsuitable pics', '', 3, 2, 'photos.gif'),
    (77, 'Profile Music', 'post_mod_audio.php', 'For management of music files which have been uploaded by members to their profiles.', '', 7, 2, 'music.gif'),
    (78, 'Profile Videos', 'javascript:window.open(''../ray/modules/video/app/admin.swf?nick={adminLogin}&password={adminPass}&url=../../../XML.php'',''RayVideoAdmin'',''width=700,height=330,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=0'');', 'For management of video files which have been uploaded by members to their profiles.', '', 5, 2, 'videos.gif'),
    (79, 'Profile Backgrounds', 'post_mod_profiles.php', 'For post-moderation of pictures which have been uploaded by members for their profile background.', '', 9, 2, 'backgrounds.gif'),
    (80, 'Modules', 'modules.php', 'Manage and configure integration modules for 3d party scripts', '', 9, 3, 'modules.gif'),
    (81, 'Permalinks', 'global_settings.php?cat=26', 'Friendly permalinks activation', '', 17, 5, 'permalinks.gif'),
    (82, 'Predefined Values', 'preValues.php', '', '', 7, 5, 'preValues.gif');

    Quote · 2 Jun 2009

    WOW thanks,


    For the post I will give this a try in the morning when I a little less tired and frustrated.

    Quote · 2 Jun 2009

    Good luck in the morning then!

    Quote · 2 Jun 2009

    OK so with a little help from both you and l LeonidS I was able to get working.


    From LeonidS
    Hello!

    Try to reinstall admin menu using this commands:
    TRUNCATE `AdminMenu`;
    And then execute part from install/sql/v61.sql file from string:

    INSERT INTO `AdminMenu` VALUES(1, 'Members', 'profiles.php', 'For members profiles management\n', '', 0, 1, 'members.gif');

    to

    INSERT INTO `AdminMenu` VALUES(82, 'Predefined Values', 'preValues.php', '', '', 7, 5, 'preValues.gif');

    Regards



    Thank you everyone for your help!!!!!
    Quote · 2 Jun 2009
     
     
    Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
    The new Dolphin solution is powered by UNA Community Management System.