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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2007, 08:39 PM
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 04-15-2007, 08:44 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'] = ''
Reply With Quote
  #3  
Old 01-23-2010, 05:38 AM
washingtonboise washingtonboise is offline
 
Join Date: Mar 2009
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 10-18-2012, 12:18 PM
AMcDermott AMcDermott is offline
 
Join Date: Feb 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by washingtonboise View Post
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?
Reply With Quote
  #5  
Old 10-18-2012, 12:32 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #6  
Old 10-18-2012, 01:13 PM
AMcDermott AMcDermott is offline
 
Join Date: Feb 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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?
Reply With Quote
  #7  
Old 10-18-2012, 01:42 PM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 10-18-2012, 02:22 PM
AMcDermott AMcDermott is offline
 
Join Date: Feb 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Attached Images
File Type: jpg usergroup-options.jpg (53.4 KB, 0 views)
Reply With Quote
  #9  
Old 10-18-2012, 02:25 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #10  
Old 10-18-2012, 03:36 PM
AMcDermott AMcDermott is offline
 
Join Date: Feb 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 12:29 AM.


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.05918 seconds
  • Memory Usage 2,274KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete