vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   [Solved] Attachment Permissions error (https://vborg.vbsupport.ru/showthread.php?t=324454)

Stratis 02-16-2017 03:58 AM

[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

MarkFL 02-16-2017 04:14 AM

Does that table have a prefix that's different than what you have specified in your config.php file?

Stratis 02-16-2017 04:27 AM

Quote:

Originally Posted by MarkFL (Post 2582408)
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.

MarkFL 02-16-2017 04:34 AM

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...:)

Stratis 02-16-2017 04:43 AM

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?

MarkFL 02-16-2017 05:02 AM

I generally use phpMyAdmin to investigate database issues. First check to see if the table in question is there. :)

Stratis 02-16-2017 05:43 AM

1 Attachment(s)
Quote:

Originally Posted by MarkFL (Post 2582412)
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?

MarkFL 02-16-2017 06:11 AM

Yes, that's what's causing the db error, that table appears to be missing. :(

Stratis 02-16-2017 06:30 AM

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.


All times are GMT. The time now is 11:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01040 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete