vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   You are not authorized to execute SQL queries (https://vborg.vbsupport.ru/showthread.php?t=144962)

PAKIDIL 04-15-2007 08:39 PM

You are not authorized to execute SQL queries
 
Can any 1 please tell me why i m having this error ? when every i click on execute sql queires option its shows "

"You are not authorized to execute SQL queries "

instead of login box so can any 1 please help me out in this thanks.

HMBeaty 04-15-2007 08:44 PM

You need to edit your includes/config.php file here:
PHP Code:

    //    ****** USERS WITH QUERY RUNNING PERMISSIONS ******
    //    The users specified here will be allowed to run queries from the control panel.
    //    See the above entries for more information on the format.
    //    Please note that the ability to run queries is quite powerful. You may wish
    //    to remove all user IDs from this list for security reasons.
$config['SpecialUsers']['canrunqueries'] = ''


washingtonboise 01-23-2010 05:38 AM

After doing so, I get the same message.

Code:

$config['SpecialUsers']['canrunqueries'] = '1,3';
It doesn't matter if I log in as user 1, or user 3.

Is there a plan B for what to check when this happens?

AMcDermott 10-18-2012 12:18 PM

Quote:

Originally Posted by washingtonboise (Post 1964095)
After doing so, I get the same message.

Code:

$config['SpecialUsers']['canrunqueries'] = '1,3';
It doesn't matter if I log in as user 1, or user 3.

Is there a plan B for what to check when this happens?

I've got the same issue - still getting "not authorized" message when 'canrunqueries' has my admin userid there. What should I check next?

kh99 10-18-2012 12:32 PM

If that's a "not authorized to do queries" specific message, the the only time that should happen is if the userid is not listed in $config['SpecialUsers']['canrunqueries']. We use APC for caching and I know we need to clear the cache before changes to php files will work, do you have something like that?

AMcDermott 10-18-2012 01:13 PM

Quote:

Originally Posted by kh99 (Post 2373980)
If that's a "not authorized to do queries" specific message, the the only time that should happen is if the userid is not listed in $config['SpecialUsers']['canrunqueries']. We use APC for caching and I know we need to clear the cache before changes to php files will work, do you have something like that?

Thanks for the reply, much appreciated.

Yes, the error is "Not authorized to execute SQL queries".

My userid is in $vbbinstallroot/includes/config.php like so, 5201 being my userid on this forum:

Code:

    //    ****** USERS WITH QUERY RUNNING PERMISSIONS ******
    //    The users specified here will be allowed to run queries from the control panel.
    //    See the above entries for more information on the format.
    //    Please note that the ability to run queries is quite powerful. You may wish
    //    to remove all user IDs from this list for security reasons.
$config['SpecialUsers']['canrunqueries'] = '5201';

The error message appears at the following location:

hxxp://forums.domain.com/admincp/queries.php?do=modify

I've tried an APC cache clearing script, server doesn't seem to be running APC.

Is there anything else it could be?

Edit: config file encoding seems ok, ANSI and it's obviously getting parsed correctly or VBB just wouldn't run, right?

Brandon Sheley 10-18-2012 01:42 PM

Do you need to be a "super user" as well
TBH, adding your userID to that line should work, it's always worked for me.
Are you sure that's your userID?

AMcDermott 10-18-2012 02:22 PM

1 Attachment(s)
I'm pretty sure the userid is correct. From AdminCP - User Manager:

Code:

User: username (id: 5201)
What's the "super user" thing?

Here's what my user looks like in admincp:

https://vborg.vbsupport.ru/attachmen...1&d=1350573739

kh99 10-18-2012 02:25 PM

I was going by what I saw in the code, but just to make sure I did a test and it seems that if a userid is an admin and is listed in the config.php file, the user can execute queries even if they have no other admin permissions and are not a superadmin. (They don't see the Maintenance menu at all if they don't have that admin permission, but it doesn't stop them from going directly to admincp/queries.php).

Anyway, what you posted above looks right, and you're right, if there was any error in the config.php you'd know it. So triple check the userid as Brandon suggested, and maybe make sure that you're actually changing the correct config.php file (if you're uploading it after editing, did you upload it to the right place)? Edit: ...and did the file get overwritten successfully?

AMcDermott 10-18-2012 03:36 PM

Ok, couple of issues here... firstly the VBB version is v4.1.7 - not v3.x - the config file references vBulletin 3.6.8.

Secondly, I'm not editing the right file. The one I'm editing is not effecting the live site.

Assuming this is question is still relevant, how can I work my way from the webroot to finding where the config file is actually located? Can I trace it from file to file?

Thanks for your help in any event!

--------------- Added [DATE]1350579681[/DATE] at [TIME]1350579681[/TIME] ---------------

And the conclusion thus far is that the FTP user is incorrect - this is an old mirror of the existing site, fully installed but not connected to live site in any way. Killer.

--------------- Added [DATE]1350580292[/DATE] at [TIME]1350580292[/TIME] ---------------

And final update: success, after receiving the correct FTP info from the site owner.

Thanks, kh99 and Brandon Sheley, for your help with this.


All times are GMT. The time now is 11:47 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.01022 seconds
  • Memory Usage 1,743KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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