Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2017, 03:58 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [Solved] Attachment Permissions error

When i press button to see "Attachment Permissions" i get this error:

Code:
Database error in vBulletin 4.2.0:

Invalid SQL:

        SELECT usergroupid, extension, attachmentpermissionid
        FROM attachmentpermission AS attachmentpermission;

MySQL Error   : Table 'MY DATABASE.attachmentpermission' doesn't exist
Error Number  : 1146
Script        : http://MY DOMAIN/admincp/attachmentpermission.php
Referrer      : https://MY DOMAIN/admincp/index.php?do=nav
Classname     : vB_Database_MySQLi
MySQL Version : 5.5.54-MariaDB
File, "admincp/attachmentpermission.php" is in ftp as supposed to be.
I am sure that it worked before 5-6 months. Any help please to fix this problem.

Thanks
Reply With Quote
  #2  
Old 02-16-2017, 04:14 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does that table have a prefix that's different than what you have specified in your config.php file?
Reply With Quote
  #3  
Old 02-16-2017, 04:27 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
Does that table have a prefix that's different than what you have specified in your config.php file?
Thanks Mark for the answer, but i do not understand what you ask.

Just now i test and the Attachment Manager, canot create new extention and not edit an excisting, when i press save i get an error here to.

Code:
Database error in vBulletin 4.2.0:

Invalid SQL:

        SELECT
            atype.extension, atype.height AS default_height, atype.width AS default_width, atype.size AS default_size, atype.contenttypes,
            aperm.height AS custom_height, aperm.width AS custom_width, aperm.size AS custom_size,
            aperm.attachmentpermissions AS custom_permissions, aperm.usergroupid
        FROM attachmenttype AS atype
        LEFT JOIN attachmentpermission AS aperm USING (extension)
        ORDER BY extension;

MySQL Error   : Table 'MY DATABASE.attachmentpermission' doesn't exist
Error Number  : 1146
Script        : http://MY DOMAIN/admincp/attachment.php?do=doupdatetype
Referrer      : https://MY DOMAIN/admincp/attachment.php?do=updatetype

I did not change any thing about prefixes or what else, thank you.
Reply With Quote
  #4  
Old 02-16-2017, 04:34 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It appears to me that the constant "TABLE_PREFIX" used in vB queries in PHP code (and determined by the value given in your config.php file) is not the same as the prefix for that table, either that or the table has been dropped from the db.

Check your database to make sure the table is there...
Reply With Quote
  #5  
Old 02-16-2017, 04:43 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cannot check this right now from my work. I will see it after 7 hours, But i do not understand what to search, i just see some tittles you wrote here so will go with this.


In my test forum it is ok, test forum is a copy from my live forum, that means something happened after that.


If something missing from database? can this be fixed some how?
Reply With Quote
  #6  
Old 02-16-2017, 05:02 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I generally use phpMyAdmin to investigate database issues. First check to see if the table in question is there.
Reply With Quote
  #7  
Old 02-16-2017, 05:43 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
First check to see if the table in question is there.
Sorry but do not understand, find this? because do not now what and where exactly search for?

I looked though in my databases,
1) Test forum - "attachmentpermission" is present.
Attachment 155818


2) Live forum - "attachmentpermission" is missing
Attachment 155817

Is this something to start with?
Reply With Quote
  #8  
Old 02-16-2017, 06:11 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that's what's causing the db error, that table appears to be missing.
Reply With Quote
  #9  
Old 02-16-2017, 06:30 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made these steps:

1) i export "attachmentpermission" as sql from my test forum that had this table.
2) i changed the database name in the sql file with the live forum database name.
3) i inport this sql file in database of live forum.

Now there where i had errors work fine.
I want to know if this i done is ok and safe for all forum (database tables or whatwever)?

Thanks for focusing help.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:11 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04024 seconds
  • Memory Usage 2,260KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete