PDA

View Full Version : "You are not authorized to execute SQL queries"


Dave234
09-02-2012, 11:50 AM
When I click AdminCP > Maintenance > Execute SQL Query, I can't get in, and I receive the following pop-up message:

You are not authorized to execute SQL queries

I am the Administrator on my website. Why can't I get in? I can get in on my other website.

kh99
09-02-2012, 12:05 PM
In your config.php file is this line:

$config['SpecialUsers']['canrunqueries'] = '';


you need to add your userid there.

Dave234
09-02-2012, 12:14 PM
Where can I find the config.php file?

kh99
09-02-2012, 02:19 PM
sorry - that's in the includes subdirectory.

Dave234
09-03-2012, 04:26 AM
Not sure exactly where the includes subdirectory is.....

Can you please help me by letting me know exactly where I can find it? For example, AdminCP > _______ > __________

I really appreciate it.

kh99
09-03-2012, 04:30 AM
No problem. But it's not a setting in the adminCP, you need to edit the includes/config.php file. Download your current config.php file via ftp, edit it to make the change (use a programming editor or notepad), then upload it, overwriting the current file. This is the same file that has your database connection information that was set up when the forum was installed.

If you're unsure about doing this, you might want to edit a copy of the file (or save it to a different place after editing). That way if something goes wrong you can upload the original file again and you should be back where you were.

Dave234
09-03-2012, 05:26 AM
I honestly have no idea how to do this. I have ftp, but how would I download the current config.php file?

John Lester
09-03-2012, 05:28 AM
Start your FTP program. Then (assuming your forums are in a "forums" folder) open the forums folder, then open the includes folder, then download the file config.php

--------------- Added 1346653882 at 1346653882 ---------------

If you do not know what your userid is, go to your ACP and then click on users then click on search for users, enter your name and at the very top you will see your userid (above the drop down box above your name).

borbole
09-03-2012, 10:56 AM
I honestly have no idea how to do this. I have ftp, but how would I download the current config.php file?

Navigate to the folder mentioned above and then download the file in question to your pc and after entering your user id at the place mentioned above, save the changes and then re-upload the file back overwriting the old one and you should be all done.

Alternatively you can do that through the file manager section in your cpanel, provided it has it.

Dave234
09-03-2012, 02:01 PM
I'm very nervous about messing with the config.php file from the ftp. I right-clicked and chose "View/Edit", and it opened it automatically in WordPad. I found the part of the code you were talking about, and I see that my userid is not there.

Regarding what my userid is, I did what you said, John Lester, in AdminCP, and above my name it says: "User: El Luchador Rubio (id: 1)". Does this mean I would enter "1" in the config.php?

I am very nervous about messing with the config.php file through ftp. Borbole, you say that I could access it through the file manager section in my cpanel? Can you please tell me where I can find that? For example, AdminCP > _______ > __________ ? I looked all through it and I can't see anything that says "File Manager".....

John Lester
09-03-2012, 03:42 PM
Yes Dave your userid is 1.

cpanel is not your admin control panel (acp). cpanel is the portal you use to access your entire site via a website url (you'll have to ask your host if you don't know what it is yet).

In order to avoid confusion at this point, just download the file with FTP (I don't like to edit it through a FTP program because it never seems to work properly) and edit it in wordpad or whatever it opens into by default.

borbole
09-03-2012, 07:02 PM
I'm very nervous about messing with the config.php file from the ftp. I right-clicked and chose "View/Edit", and it opened it automatically in WordPad. I found the part of the code you were talking about, and I see that my userid is not there.

Regarding what my userid is, I did what you said, John Lester, in AdminCP, and above my name it says: "User: El Luchador Rubio (id: 1)". Does this mean I would enter "1" in the config.php?

I am very nervous about messing with the config.php file through ftp. Borbole, you say that I could access it through the file manager section in my cpanel? Can you please tell me where I can find that? For example, AdminCP > _______ > __________ ? I looked all through it and I can't see anything that says "File Manager".....

Don''t edit the file through the ftp but use ftp to download the file only in your pc and then open it with a php editor program and do the changes. Then re-upload it back. You don''t have to worry about anything but just in case, make a backup of the file before you edit it though.

About cpanel, it is explained above what it is and where it can be found.

betterthanyours
09-03-2012, 07:51 PM
Dave, I just wanted to ask. Do you need to actually execute any queries? If you are hesitant about changing anything you could just use phpmyadmin to execute the queries instead...

PS, you don't need anything special to edit a .php file. Notepad++ works fine.

Dave234
09-08-2012, 02:03 PM
So I'm in FTP, and I right-click on config.php. When I click "Download" it comes up with a weird pop-up saying I already have the file, and do I want to replace it?

But then I don't see if it has saved anywhere on my computer.

When I click "View/Edit" it automatically opens in WordPad. I am thinking that "View/Edit" is the right choice? And then what do I do? After adding my userid, do I just drag that WordPad file over "config.php"?

John Lester
09-08-2012, 05:43 PM
With your ftp open make sure it's not full screen and just drag the config.php file to your desktop ;)

Dave234
09-08-2012, 10:45 PM
AAHH!!! It just messed it up! I dragged it out of the ftp, added the "1" userid, and dragged it back in!!! Now it says on my website

Configuration: includes/config.php exists, but is not in the 3.6+ format. Please convert your config file via the new config.php.new.

--------------- Added 1347147996 at 1347147996 ---------------

Please Help Me!!

--------------- Added 1347148167 at 1347148167 ---------------

Please Help Me, What Can I Do???????? What Exactly Is The Config.php File?????? Is It Like A Standard Template Or Is It Specific To Exactly What I Put On My Site????/ Please!!!!

--------------- Added 1347148383 at 1347148383 ---------------

Does it just involve permissions and stuff? Or does it determine what plugins and content I have on the website? I have another website that is identical to this one, but it has different content.

I also saved a copy of the WordPad that I'd taken when I did "View/Edit" (instead of dragging it off of the ftp).............WHY Is it all messed up now?????

I'm sorry, I don't mean to freak out about this.........but I just spent the entire day today adding posts and content to this website, and it would be a horrible shame if I have to do it all over again. Please help me.

--------------- Added 1347148416 at 1347148416 ---------------

I had dragged it back into the ftp. Is that what messed it up? How can I fix this???

snakes1100
09-08-2012, 10:56 PM
Download a fresh copy of config.php from your vbulletin.zip file, edit it with the correct credentials, then upload it via ftp.

or

Post you config.php, minus your details for the db, so we can see what the actual issue is with it.

Dave234
09-08-2012, 11:02 PM
<?php /*================================================= =====================*\ || ################################################## ################## || || # vBulletin 4.1.11 || # ---------------------------------------------------------------- # || || # All PHP code in this file is ?2000-2012 vBulletin Solutions Inc. # || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ################################################## ################## || \*================================================ ======================*/ /*-------------------------------------------------------*\ | ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** | +---------------------------------------------------------+ | If you get any errors while attempting to connect to | | MySQL, you will need to email your webhost because we | | cannot tell you the correct values for the variables | | in this file. | \*-------------------------------------------------------*/ // ****** DATABASE TYPE ****** // This is the type of the database server on which your vBulletin database will be located. // Valid options are mysql and mysqli, for slave support add _slave. Try to use mysqli if you are using PHP 5 and MySQL 4.1+ // for slave options just append _slave to your preferred database type. $config['Database']['dbtype'] = 'mysql'; // ****** DATABASE NAME ****** // This is the name of the database where your vBulletin will be located. // This must be created by your webhost. $config['Database']['dbname'] = 'xxxxxxx'; // ****** TABLE PREFIX ****** // Prefix that your vBulletin tables have in the database. $config['Database']['tableprefix'] = 'xxxxxxx'; // ****** TECHNICAL EMAIL ADDRESS ****** // If any database errors occur, they will be emailed to the address specified here. // Leave this blank to not send any emails when there is a database error. $config['Database']['technicalemail'] = 'xxxxxxx'; // ****** FORCE EMPTY SQL MODE ****** // New versions of MySQL (4.1+) have introduced some behaviors that are // incompatible with vBulletin. Setting this value to "true" disables those // behaviors. You only need to modify this value if vBulletin recommends it. $config['Database']['force_sql_mode'] = false; // ****** MASTER DATABASE SERVER NAME AND PORT ****** // This is the hostname or IP address and port of the database server. // If you are unsure of what to put here, leave the default values. // // Note: If you are using IIS 7+ and MySQL is on the same machine, you // need to use 127.0.0.1 instead of localhost $config['MasterServer']['servername'] = 'localhost'; $config['MasterServer']['port'] = 3306; // ****** MASTER DATABASE USERNAME & PASSWORD ****** // This is the username and password you use to access MySQL. // These must be obtained through your webhost. $config['MasterServer']['username'] = 'xxxxxxx'; $config['MasterServer']['password'] = 'xxxxxxx'; // ****** MASTER DATABASE PERSISTENT CONNECTIONS ****** // This option allows you to turn persistent connections to MySQL on or off. // The difference in performance is negligible for all but the largest boards. // If you are unsure what this should be, leave it off. (0 = off; 1 = on) $config['MasterServer']['usepconnect'] = 0; // ****** SLAVE DATABASE CONFIGURATION ****** // If you have multiple database backends, this is the information for your slave // server. If you are not 100% sure you need to fill in this information, // do not change any of the values here. $config['SlaveServer']['servername'] = ''; $config['SlaveServer']['port'] = 3306; $config['SlaveServer']['username'] = ''; $config['SlaveServer']['password'] = ''; $config['SlaveServer']['usepconnect'] = 0; // ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ****** // This setting allows you to change the name of the folders that the admin and // moderator control panels reside in. You may wish to do this for security purposes. // Please note that if you change the name of the directory here, you will still need // to manually change the name of the directory on the server. $config['Misc']['admincpdir'] = 'admincp'; $config['Misc']['modcpdir'] = 'modcp'; // Prefix that all vBulletin cookies will have // Keep this short and only use numbers and letters, i.e. 1-9 and a-Z $config['Misc']['cookieprefix'] = 'bb'; // ******** FULL PATH TO FORUMS DIRECTORY ****** // On a few systems it may be necessary to input the full path to your forums directory // for vBulletin to function normally. You can ignore this setting unless vBulletin // tells you to fill this in. Do not include a trailing slash! // Example Unix: // $config['Misc']['forumpath'] = '/home/users/public_html/forums'; // Example Win32: // $config['Misc']['forumpath'] = 'c:\program files\apache group\apache\htdocs\vb3'; $config['Misc']['forumpath'] = ''; // ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ****** // The users specified here will be allowed to view the admin log in the control panel. // Users must be specified by *ID number* here. To obtain a user's ID number, // view their profile via the control panel. If this is a new installation, leave // the first user created will have a user ID of 1. Seperate each userid with a comma. $config['SpecialUsers']['canviewadminlog'] = '1'; // ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ****** // The users specified here will be allowed to remove ("prune") entries from the admin // log. See the above entry for more information on the format. $config['SpecialUsers']['canpruneadminlog'] = '1'; // ****** 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'] = ''; // ****** UNDELETABLE / UNALTERABLE USERS ****** // The users specified here will not be deletable or alterable from the control panel by any users. // To specify more than one user, separate userids with commas. $config['SpecialUsers']['undeletableusers'] = ''; // ****** SUPER ADMINISTRATORS ****** // The users specified below will have permission to access the administrator permissions // page, which controls the permissions of other administrators $config['SpecialUsers']['superadministrators'] = '1'; // ****** DATASTORE CACHE CONFIGURATION ***** // Here you can configure different methods for caching datastore items. // vB_Datastore_Filecache - to use includes/datastore/datastore_cache.php // vB_Datastore_APC - to use APC // vB_Datastore_XCache - to use XCache // vB_Datastore_Memcached - to use a Memcache server, more configuration below // $config['Datastore']['class'] = 'vB_Datastore_Filecache'; // ******** DATASTORE PREFIX ****** // If you are using a PHP Caching system (APC, XCache, eAccelerator) with more // than one set of forums installed on your host, you *may* need to use a prefix // so that they do not try to use the same variable within the cache. // This works in a similar manner to the database table prefix. // $config['Datastore']['prefix'] = ''; // It is also necessary to specify the hostname or IP address and the port the server is listening on /* $config['Datastore']['class'] = 'vB_Datastore_Memcached'; $i = 0; // First Server $i++; $config['Misc']['memcacheserver'][$i] = '127.0.0.1'; $config['Misc']['memcacheport'][$i] = 11211; $config['Misc']['memcachepersistent'][$i] = true; $config['Misc']['memcacheweight'][$i] = 1; $config['Misc']['memcachetimeout'][$i] = 1; $config['Misc']['memcacheretry_interval'][$i] = 15; */ // ****** The following options are only needed in special cases ****** // ****** MySQLI OPTIONS ***** // When using MySQL 4.1+, MySQLi should be used to connect to the database. // If you need to set the default connection charset because your database // is using a charset other than latin1, you can set the charset here. // If you don't set the charset to be the same as your database, you // may receive collation errors. Ignore this setting unless you // are sure you need to use it. // $config['Mysqli']['charset'] = 'utf8'; // Optionally, PHP can be instructed to set connection parameters by reading from the // file named in 'ini_file'. Please use a full path to the file. // Example: // $config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini'; $config['Mysqli']['ini_file'] = ''; // Image Processing Options // Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings. $config['Misc']['maxwidth'] = 2592; $config['Misc']['maxheight'] = 1944; /*================================================= =====================*\ || ################################################## ################## || # Downloaded: 14:51, Tue Mar 20th 2012 || # CVS: $RCSfile$ - $Revision: 39199 $ || ################################################## ################## \*================================================ ======================*/

--------------- Added 1347149049 at 1347149049 ---------------

<?php /*================================================= =====================*\ || ################################################## ################## || || # vBulletin 4.1.11 || # ---------------------------------------------------------------- # || || # All PHP code in this file is ?2000-2012 vBulletin Solutions Inc. # || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ################################################## ################## || \*================================================ ======================*/ /*-------------------------------------------------------*\ | ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** | +---------------------------------------------------------+ | If you get any errors while attempting to connect to | | MySQL, you will need to email your webhost because we | | cannot tell you the correct values for the variables | | in this file. | \*-------------------------------------------------------*/ // ****** DATABASE TYPE ****** // This is the type of the database server on which your vBulletin database will be located. // Valid options are mysql and mysqli, for slave support add _slave. Try to use mysqli if you are using PHP 5 and MySQL 4.1+ // for slave options just append _slave to your preferred database type. $config['Database']['dbtype'] = 'mysql'; // ****** DATABASE NAME ****** // This is the name of the database where your vBulletin will be located. // This must be created by your webhost. $config['Database']['dbname'] = 'xxxxxxx'; // ****** TABLE PREFIX ****** // Prefix that your vBulletin tables have in the database. $config['Database']['tableprefix'] = 'xxxxxxx'; // ****** TECHNICAL EMAIL ADDRESS ****** // If any database errors occur, they will be emailed to the address specified here. // Leave this blank to not send any emails when there is a database error. $config['Database']['technicalemail'] = 'xxxxxxx'; // ****** FORCE EMPTY SQL MODE ****** // New versions of MySQL (4.1+) have introduced some behaviors that are // incompatible with vBulletin. Setting this value to "true" disables those // behaviors. You only need to modify this value if vBulletin recommends it. $config['Database']['force_sql_mode'] = false; // ****** MASTER DATABASE SERVER NAME AND PORT ****** // This is the hostname or IP address and port of the database server. // If you are unsure of what to put here, leave the default values. // // Note: If you are using IIS 7+ and MySQL is on the same machine, you // need to use 127.0.0.1 instead of localhost $config['MasterServer']['servername'] = 'localhost'; $config['MasterServer']['port'] = 3306; // ****** MASTER DATABASE USERNAME & PASSWORD ****** // This is the username and password you use to access MySQL. // These must be obtained through your webhost. $config['MasterServer']['username'] = 'xxxxxxx'; $config['MasterServer']['password'] = 'xxxxxxx'; // ****** MASTER DATABASE PERSISTENT CONNECTIONS ****** // This option allows you to turn persistent connections to MySQL on or off. // The difference in performance is negligible for all but the largest boards. // If you are unsure what this should be, leave it off. (0 = off; 1 = on) $config['MasterServer']['usepconnect'] = 0; // ****** SLAVE DATABASE CONFIGURATION ****** // If you have multiple database backends, this is the information for your slave // server. If you are not 100% sure you need to fill in this information, // do not change any of the values here. $config['SlaveServer']['servername'] = ''; $config['SlaveServer']['port'] = 3306; $config['SlaveServer']['username'] = ''; $config['SlaveServer']['password'] = ''; $config['SlaveServer']['usepconnect'] = 0; // ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ****** // This setting allows you to change the name of the folders that the admin and // moderator control panels reside in. You may wish to do this for security purposes. // Please note that if you change the name of the directory here, you will still need // to manually change the name of the directory on the server. $config['Misc']['admincpdir'] = 'admincp'; $config['Misc']['modcpdir'] = 'modcp'; // Prefix that all vBulletin cookies will have // Keep this short and only use numbers and letters, i.e. 1-9 and a-Z $config['Misc']['cookieprefix'] = 'bb'; // ******** FULL PATH TO FORUMS DIRECTORY ****** // On a few systems it may be necessary to input the full path to your forums directory // for vBulletin to function normally. You can ignore this setting unless vBulletin // tells you to fill this in. Do not include a trailing slash! // Example Unix: // $config['Misc']['forumpath'] = '/home/users/public_html/forums'; // Example Win32: // $config['Misc']['forumpath'] = 'c:\program files\apache group\apache\htdocs\vb3'; $config['Misc']['forumpath'] = ''; // ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ****** // The users specified here will be allowed to view the admin log in the control panel. // Users must be specified by *ID number* here. To obtain a user's ID number, // view their profile via the control panel. If this is a new installation, leave // the first user created will have a user ID of 1. Seperate each userid with a comma. $config['SpecialUsers']['canviewadminlog'] = '1'; // ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ****** // The users specified here will be allowed to remove ("prune") entries from the admin // log. See the above entry for more information on the format. $config['SpecialUsers']['canpruneadminlog'] = '1'; // ****** 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'] = ''; // ****** UNDELETABLE / UNALTERABLE USERS ****** // The users specified here will not be deletable or alterable from the control panel by any users. // To specify more than one user, separate userids with commas. $config['SpecialUsers']['undeletableusers'] = ''; // ****** SUPER ADMINISTRATORS ****** // The users specified below will have permission to access the administrator permissions // page, which controls the permissions of other administrators $config['SpecialUsers']['superadministrators'] = '1'; // ****** DATASTORE CACHE CONFIGURATION ***** // Here you can configure different methods for caching datastore items. // vB_Datastore_Filecache - to use includes/datastore/datastore_cache.php // vB_Datastore_APC - to use APC // vB_Datastore_XCache - to use XCache // vB_Datastore_Memcached - to use a Memcache server, more configuration below // $config['Datastore']['class'] = 'vB_Datastore_Filecache'; // ******** DATASTORE PREFIX ****** // If you are using a PHP Caching system (APC, XCache, eAccelerator) with more // than one set of forums installed on your host, you *may* need to use a prefix // so that they do not try to use the same variable within the cache. // This works in a similar manner to the database table prefix. // $config['Datastore']['prefix'] = ''; // It is also necessary to specify the hostname or IP address and the port the server is listening on /* $config['Datastore']['class'] = 'vB_Datastore_Memcached'; $i = 0; // First Server $i++; $config['Misc']['memcacheserver'][$i] = '127.0.0.1'; $config['Misc']['memcacheport'][$i] = 11211; $config['Misc']['memcachepersistent'][$i] = true; $config['Misc']['memcacheweight'][$i] = 1; $config['Misc']['memcachetimeout'][$i] = 1; $config['Misc']['memcacheretry_interval'][$i] = 15; */ // ****** The following options are only needed in special cases ****** // ****** MySQLI OPTIONS ***** // When using MySQL 4.1+, MySQLi should be used to connect to the database. // If you need to set the default connection charset because your database // is using a charset other than latin1, you can set the charset here. // If you don't set the charset to be the same as your database, you // may receive collation errors. Ignore this setting unless you // are sure you need to use it. // $config['Mysqli']['charset'] = 'utf8'; // Optionally, PHP can be instructed to set connection parameters by reading from the // file named in 'ini_file'. Please use a full path to the file. // Example: // $config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini'; $config['Mysqli']['ini_file'] = ''; // Image Processing Options // Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings. $config['Misc']['maxwidth'] = 2592; $config['Misc']['maxheight'] = 1944; /*================================================= =====================*\ || ################################################## ################## || # Downloaded: 14:51, Tue Mar 20th 2012 || # CVS: $RCSfile$ - $Revision: 39199 $ || ################################################## ################## \*================================================ ======================*/

Dave234
09-08-2012, 11:04 PM
<?php /*================================================= =====================*\ || ################################################## ################## || || # vBulletin 4.1.11 || # ---------------------------------------------------------------- # || || # All PHP code in this file is ?2000-2012 vBulletin Solutions Inc. # || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ################################################## ################## || \*================================================ ======================*/ /*-------------------------------------------------------*\ | ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** | +---------------------------------------------------------+ | If you get any errors while attempting to connect to | | MySQL, you will need to email your webhost because we | | cannot tell you the correct values for the variables | | in this file. | \*-------------------------------------------------------*/ // ****** DATABASE TYPE ****** // This is the type of the database server on which your vBulletin database will be located. // Valid options are mysql and mysqli, for slave support add _slave. Try to use mysqli if you are using PHP 5 and MySQL 4.1+ // for slave options just append _slave to your preferred database type. $config['Database']['dbtype'] = 'mysql'; // ****** DATABASE NAME ****** // This is the name of the database where your vBulletin will be located. // This must be created by your webhost. $config['Database']['dbname'] = 'xxxxxxx'; // ****** TABLE PREFIX ****** // Prefix that your vBulletin tables have in the database. $config['Database']['tableprefix'] = 'xxxxxxx'; // ****** TECHNICAL EMAIL ADDRESS ****** // If any database errors occur, they will be emailed to the address specified here. // Leave this blank to not send any emails when there is a database error. $config['Database']['technicalemail'] = 'xxxxxxx'; // ****** FORCE EMPTY SQL MODE ****** // New versions of MySQL (4.1+) have introduced some behaviors that are // incompatible with vBulletin. Setting this value to "true" disables those // behaviors. You only need to modify this value if vBulletin recommends it. $config['Database']['force_sql_mode'] = false; // ****** MASTER DATABASE SERVER NAME AND PORT ****** // This is the hostname or IP address and port of the database server. // If you are unsure of what to put here, leave the default values. // // Note: If you are using IIS 7+ and MySQL is on the same machine, you // need to use 127.0.0.1 instead of localhost $config['MasterServer']['servername'] = 'localhost'; $config['MasterServer']['port'] = 3306; // ****** MASTER DATABASE USERNAME & PASSWORD ****** // This is the username and password you use to access MySQL. // These must be obtained through your webhost. $config['MasterServer']['username'] = 'xxxxxxx'; $config['MasterServer']['password'] = 'xxxxxxx'; // ****** MASTER DATABASE PERSISTENT CONNECTIONS ****** // This option allows you to turn persistent connections to MySQL on or off. // The difference in performance is negligible for all but the largest boards. // If you are unsure what this should be, leave it off. (0 = off; 1 = on) $config['MasterServer']['usepconnect'] = 0; // ****** SLAVE DATABASE CONFIGURATION ****** // If you have multiple database backends, this is the information for your slave // server. If you are not 100% sure you need to fill in this information, // do not change any of the values here. $config['SlaveServer']['servername'] = ''; $config['SlaveServer']['port'] = 3306; $config['SlaveServer']['username'] = ''; $config['SlaveServer']['password'] = ''; $config['SlaveServer']['usepconnect'] = 0; // ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ****** // This setting allows you to change the name of the folders that the admin and // moderator control panels reside in. You may wish to do this for security purposes. // Please note that if you change the name of the directory here, you will still need // to manually change the name of the directory on the server. $config['Misc']['admincpdir'] = 'admincp'; $config['Misc']['modcpdir'] = 'modcp'; // Prefix that all vBulletin cookies will have // Keep this short and only use numbers and letters, i.e. 1-9 and a-Z $config['Misc']['cookieprefix'] = 'bb'; // ******** FULL PATH TO FORUMS DIRECTORY ****** // On a few systems it may be necessary to input the full path to your forums directory // for vBulletin to function normally. You can ignore this setting unless vBulletin // tells you to fill this in. Do not include a trailing slash! // Example Unix: // $config['Misc']['forumpath'] = '/home/users/public_html/forums'; // Example Win32: // $config['Misc']['forumpath'] = 'c:\program files\apache group\apache\htdocs\vb3'; $config['Misc']['forumpath'] = ''; // ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ****** // The users specified here will be allowed to view the admin log in the control panel. // Users must be specified by *ID number* here. To obtain a user's ID number, // view their profile via the control panel. If this is a new installation, leave // the first user created will have a user ID of 1. Seperate each userid with a comma. $config['SpecialUsers']['canviewadminlog'] = '1'; // ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ****** // The users specified here will be allowed to remove ("prune") entries from the admin // log. See the above entry for more information on the format. $config['SpecialUsers']['canpruneadminlog'] = '1'; // ****** 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'] = ''; // ****** UNDELETABLE / UNALTERABLE USERS ****** // The users specified here will not be deletable or alterable from the control panel by any users. // To specify more than one user, separate userids with commas. $config['SpecialUsers']['undeletableusers'] = ''; // ****** SUPER ADMINISTRATORS ****** // The users specified below will have permission to access the administrator permissions // page, which controls the permissions of other administrators $config['SpecialUsers']['superadministrators'] = '1'; // ****** DATASTORE CACHE CONFIGURATION ***** // Here you can configure different methods for caching datastore items. // vB_Datastore_Filecache - to use includes/datastore/datastore_cache.php // vB_Datastore_APC - to use APC // vB_Datastore_XCache - to use XCache // vB_Datastore_Memcached - to use a Memcache server, more configuration below // $config['Datastore']['class'] = 'vB_Datastore_Filecache'; // ******** DATASTORE PREFIX ****** // If you are using a PHP Caching system (APC, XCache, eAccelerator) with more // than one set of forums installed on your host, you *may* need to use a prefix // so that they do not try to use the same variable within the cache. // This works in a similar manner to the database table prefix. // $config['Datastore']['prefix'] = ''; // It is also necessary to specify the hostname or IP address and the port the server is listening on /* $config['Datastore']['class'] = 'vB_Datastore_Memcached'; $i = 0; // First Server $i++; $config['Misc']['memcacheserver'][$i] = '127.0.0.1'; $config['Misc']['memcacheport'][$i] = 11211; $config['Misc']['memcachepersistent'][$i] = true; $config['Misc']['memcacheweight'][$i] = 1; $config['Misc']['memcachetimeout'][$i] = 1; $config['Misc']['memcacheretry_interval'][$i] = 15; */ // ****** The following options are only needed in special cases ****** // ****** MySQLI OPTIONS ***** // When using MySQL 4.1+, MySQLi should be used to connect to the database. // If you need to set the default connection charset because your database // is using a charset other than latin1, you can set the charset here. // If you don't set the charset to be the same as your database, you // may receive collation errors. Ignore this setting unless you // are sure you need to use it. // $config['Mysqli']['charset'] = 'utf8'; // Optionally, PHP can be instructed to set connection parameters by reading from the // file named in 'ini_file'. Please use a full path to the file. // Example: // $config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini'; $config['Mysqli']['ini_file'] = ''; // Image Processing Options // Images that exceed either dimension below will not be resized by vBulletin. If you need to resize larger images, alter these settings. $config['Misc']['maxwidth'] = 2592; $config['Misc']['maxheight'] = 1944; /*================================================= =====================*\ || ################################################## ################## || # Downloaded: 14:51, Tue Mar 20th 2012 || # CVS: $RCSfile$ - $Revision: 39199 $ || ################################################## ################## \*================================================ ======================*/

snakes1100
09-08-2012, 11:05 PM
lmao, you somehow removed all the line breaks, it would be easier to just upload a fresh copy and plug in your details for the db.

Dave234
09-08-2012, 11:06 PM
Please help me. How can I do that? I am really dumb with this stuff, and after adding stuff all day to my website my brain is fried.

--------------- Added 1347149335 at 1347149335 ---------------

I don't know where my vbulletin.zip file is.

I do have another config.php file, but for my other site..... Could I use that?

--------------- Added 1347149396 at 1347149396 ---------------

Is it WordPad? All I did was "View/Edit" and I added the "1" for my userid, then I saved it on my desktop. Then I dragged it back over the config.php file in my ftp...... Did I do something wrong there?

snakes1100
09-08-2012, 11:17 PM
Fill in your database details, then upload the file via ftp, overwriting the old one.

Im not sure why your dragging and dropping files, but i would edit directly from the server, then resave it to the server.


<?php
$config['Database']['dbtype'] = 'mysql';
$config['Database']['dbname'] = '';
$config['Database']['tableprefix'] = '';
$config['Database']['technicalemail'] = '';
$config['Database']['force_sql_mode'] = false;
$config['MasterServer']['servername'] = 'localhost';
$config['MasterServer']['port'] = 3306;
$config['MasterServer']['username'] = '';
$config['MasterServer']['password'] = '';
$config['MasterServer']['usepconnect'] = 0;
$config['SlaveServer']['servername'] = '';
$config['SlaveServer']['port'] = 3306;
$config['SlaveServer']['username'] = '';
$config['SlaveServer']['password'] = '';
$config['SlaveServer']['usepconnect'] = 0;
$config['Misc']['admincpdir'] = 'admincp';
$config['Misc']['modcpdir'] = 'modcp';
$config['Misc']['cookieprefix'] = 'bb';
$config['Misc']['forumpath'] = '';
$config['SpecialUsers']['canviewadminlog'] = '1';
$config['SpecialUsers']['canpruneadminlog'] = '1';
$config['SpecialUsers']['canrunqueries'] = '1';
$config['SpecialUsers']['undeletableusers'] = '1';
$config['SpecialUsers']['superadministrators'] = '1';
//$config['Datastore']['class'] = 'vB_Datastore_XCache';
//$config['Datastore']['prefix'] = 'at_';

/*
$config['Datastore']['class'] = 'vB_Datastore_Memcached';
$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i] = '127.0.0.1';
$config['Misc']['memcacheport'][$i] = 11211;
$config['Misc']['memcachepersistent'][$i] = true;
$config['Misc']['memcacheweight'][$i] = 1;
$config['Misc']['memcachetimeout'][$i] = 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;
*/

// $config['Mysqli']['charset'] = 'utf8';

$config['Mysqli']['ini_file'] = '';
$config['Misc']['maxwidth'] = 2592;
$config['Misc']['maxheight'] = 1944;

Dave234
09-08-2012, 11:21 PM
Please bear with me -- I just want to confirm each step of what I must do:

1. I right-click the "config.php" file in my ftp, and choose "View/Edit"
2. I delete everything, and replace it with what you posted.
3. I add my usernames and passwords that I'd "xxxxxx"ed out in my previous post.
4. Then what? How do I save this?

Please bear with me as this stuff is like a foreign language to me, and I'm terrified of losing my website contents.....

snakes1100
09-08-2012, 11:30 PM
Most ftp programs like flashfxp, cuteftp & filezilla, let you use the standard "ctl + s" to save, it will reupload the file for you once its prompted to save.

I have my program as follows:
1. Connect via FlashFXP
2. Right click & select edit
3. FlashFXP opens Edit++ for me, as its my defautl editor
4. ctl +s & its resaved to the server.

I would also suggest that your careful with what editor you use, notepad is fine. Do not use a built in editor such as the one provided thru for example Cpanel, as it will add white spacing to the end of the file & corrupt the config file.

ForceHSS
09-08-2012, 11:35 PM
use notepad ++ (http://notepad-plus-plus.org/download/v6.1.6.html) to edit the config but first download a new unedited one first. If you give me the info needed for the config will do one for you

Dave234
09-08-2012, 11:36 PM
Mine is WordPad.

Actually, when I right-click and do "View/Edit" on the config.php file in my ftp, a window pops up that says:

The selected file is already being edited: config.php
Action to perform:
x Reopen local file
x Discard local file then download and edit file anew


Which should I choose? I don't have my WordPad open at all. I do have a file saved to my desktop, though......... does that mean the config.php file in my ftp is open?

--------------- Added 1347151049 at 1347151049 ---------------

How can I change it so that it opens in Notepad? I have Notepad on my computer, but config.php automatically opens in WordPad......

ForceHSS
09-08-2012, 11:39 PM
you need to download the config to your desktop first then edit it with the program i posted above

snakes1100
09-08-2012, 11:40 PM
discard the local & redo it, as far as changing your default editor, you would need to consult the help section of your ftp program.

Dave234
09-09-2012, 12:05 AM
I just went into my ftp and did the following to change the editor from WordPad to NotePad, but it did not work:

Edit > Settings... > File Editing > Default Editor: (changed it from "Do not use default editor" to "Use custom editor:", from which point I browsed for Notepad here C:\Windows\system32\notepad.exe)

I clicked OK.

Then I right-clicked on the config.php file and chose "View/Edit", and when the window

The selected file is already being edited: config.php
Action to perform:
x Reopen local file
x Discard local file then download and edit file anew

popped up, I chose "Discard local file then download and edit file anew".

It opened the file again in WordPad...............

--------------- Added 1347154638 at 1347154638 ---------------

Please can someone walk me through this? I'm really worried about losing the content of my website that I'd spent all day doing today......

--------------- Added 1347155277 at 1347155277 ---------------

Ok, you know what? This is ridiculous. I just downloaded Notepad again.

I clicked that I wanted it to be the default editor.

And when I click "View/Edit" the config.php file, it ****STILL**** opens in WordPad.

Can I just copy and Paste Special as Values (no formatting) from WordPad into Notepad? Or is the text ***already*** messed up the moment it is opened in WordPad????

This is very frustrating!!! What is the point of having WordPad if it just messes up text????

snakes1100
09-09-2012, 01:11 AM
Restart your ftp program after changing the editor.

As i stated earlier, when it asked to keep or discard the old local copy, discard it.

ForceHSS
09-09-2012, 01:21 AM
If you would just install the program I linked above it would help to fix ur problem I even offered to do it for you for free

Dave234
09-09-2012, 01:43 AM
Restart your ftp program after changing the editor.

As i stated earlier, when it asked to keep or discard the old local copy, discard it.

It is still opening in WordPad, even after I closed it down and restarted it.....


ForceHSS, I downloaded the Notepad from the site you'd linked to.......

I then went into, in ftp, Edit > Settings > File Editing > "Use Custom Editor:" > browsed and chose "C:\Program Files (x86)\Notepad++\notepad++.exe" and pressed "OK"

Shut ftp down, then restarted it.

Still it opens in WordPad.

ForceHSS
09-09-2012, 02:23 AM
You don't open the config from the FTP program you need to download the config to your desktop then right click and open with notepad ++
My offer of 1 to 1 help still stands but won't for to much longer as I will be away for the next 24 hrs soon

Dave234
09-09-2012, 02:29 AM
Ok, I right-click and choose "Download"

Then a window pops up that says:

The target file already exists.
Please choose an action.

Source file:
/includes/config.php
9,463 bytes
9/8/2012 7:43:41 PM

Target file:
C:\Users\Dave\Application Data\config.php
9,850 bytes
Date/time unknown

Action:
x Overwrite
x Overwrite if source newer
x Overwrite if different size
x Overwrite if different size or source newer
x Resume
x Rename
x Skip

Which one should I choose?

ForceHSS
09-09-2012, 02:31 AM
Do you use Skype if so pm me ur username so I can fix this for u once and for all

--------------- Added 1347161668 at 1347161668 ---------------

I don't have much time so you need to be quick

Dave234
09-09-2012, 02:39 AM
I just sent you my skype, if you're still available.