Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Editing Your config.php File
ozzy47
Join Date: Jul 2009
Posts: 10,929

Just here to help out where I can.

USA
by ozzy47 ozzy47 is offline 17 Feb 2014
Rating: (4 votes - 5.00 average)

Sometimes as administrators, it is necessary to make changes to your includes/config.php file.

As a new administrator, or one that has never had to do this, it can be a bit scary, as you don't want to blow up your site. Or you may have edited it, and can not access your site.

So before you do this, you should do the following, to ensure you will not mess up the file.

First thing is to not use a editor such as notepad, or wordpad to edit the file, you need to use at a mininum, notepad ++, you can download it for free here, notepad-plus-plus

Why should I not use notepad or wordpad?
If you use wordpad or notepad in windows, edit the file then upload it to a server (which is more than likely Linux) it can sometimes insert hidden characters, this is what's known as UTF-8 BOM, its just how the program tries to read the file and when the hidden windows characters are inserted it causes issue because Linux is not Windows and vice-versa.

Now you should protect yourself by doing the following:
1) Download the includes/config.php file, and save it somewhere on your computer.
2) Download the includes/config.php file again, and open it in your editor, and make any changes.
3) Re-upload the edited file.

Whooops, I did not follow the above instructions, now I got errors like this, Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/config.php:1) in [path]/includes/functions.php on line 4370 and I can not access my site!

1) Re-download the same exact version of vBulletin you are running from the members area, then extract the .zip locally to your pc.
2) Rename the includes/config.php.new file to includes/config.php
3) Now open up your original config.php file that is on your server, and the new one you just downloaded with your text editor, ( not notepad or wordpad )
4) Copy/paste any relevant info from the original file to the new file, such as database name, database username, and database password. If you see anything else that looks different copy that too such as technical email address etc
5) Now upload the newly edited file to your server, overwriting the old one.

As you can see, it is much easier to protect yourself with a backup copy, rather than re editing the entire thing.
Views: 9055
Reply With Quote
Comments
  #2  
Old 17 Feb 2014, 02:39
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Great little tutorial ozzy, thank you for putting this up my Man! I can't even remember how many times I edited files using notepad or wordpad then uploaded files and I was in a rut! ....
Reply With Quote
  #3  
Old 17 Feb 2014, 02:50
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
No problem, hopefully people will read it before diving in to things.
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #4  
Old 17 Feb 2014, 03:07
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
You know what would really help out, well me at least ozzy? If you could probably give more detailed explanation of what each of those settings in the config file do. There are a couple that I still don't know what they are for exactly....I know there are descriptions there already, but they are a bit confusing ...
Reply With Quote
  #5  
Old 17 Feb 2014, 03:11
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
I guess the generic answer would be, "If you don't know what they do, don't adjust them"

Which ones are you having trouble with? I may not know but someone might.
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #6  
Old 17 Feb 2014, 03:22
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
I will have to take a look ...lol...but yes..If I don't know what they do I leave them alone
Reply With Quote
  #7  
Old 17 Feb 2014, 03:28
ForceHSS's Avatar
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Ozzy many will understand like myself, but for the ones that don't understand you should make it easier for those
Reply With Quote
  #8  
Old 17 Feb 2014, 03:28
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
OK this one for instance:

// ****** 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'] = 'user id separated by comman';


I added myself to this one, but even as an admin I can't edit my own profile? I don't get it ....
Reply With Quote
  #9  
Old 17 Feb 2014, 03:29
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
How could it be any simpler?
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #10  
Old 17 Feb 2014, 03:31
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Originally Posted by ForceHSS View Post
Ozzy many will understand like myself, but for the ones that don't you should make it simple
I understand most of it and most of them, but some are a little confusing, like the one above. That means If I add my user id there and I don't want to risk any other admin from altering it and if I have to edit or alter it myself, I have to go back and change this every time ....sucks ! lol..
Reply With Quote
  #11  
Old 17 Feb 2014, 03:31
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
Originally Posted by CAG CheechDogg View Post
OK this one for instance:

// ****** 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'] = 'user id separated by comman';


I added myself to this one, but even as an admin I can't edit my own profile? I don't get it ....
That is correct, that is there to protect your user from any one from editing your user from within the ACP, including yourself. You would have to edit your profile from the usercp then.
Attached Images
File Type: gif smile.gif (1.0 KB, 244 views)
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #12  
Old 17 Feb 2014, 03:32
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Originally Posted by CAG CheechDogg View Post
OK this one for instance:

// ****** 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'] = 'user id separated by comman';


I added myself to this one, but even as an admin I can't edit my own profile? I don't get it ....
There's a Mod for that, but it still for obvious reasons won't allow password to be edited from adminCP.
Reply With Quote
  #13  
Old 17 Feb 2014, 03:33
ForceHSS's Avatar
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Originally Posted by CAG CheechDogg View Post
I understand most of it and most of them, but some are a little confusing, like the one above. That means If I add my user id there and I don't want to risk any other admin from altering it and if I have to edit or alter it myself, I have to go back and change this every time ....sucks ! lol..
if you put your userid in the config no other admin can change anything in your profile unless you have given them ftp access. But you can still change most things from usercp
Reply With Quote
  #14  
Old 17 Feb 2014, 07:19
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Ok , thank you guys .... it really threw me off to see myself not being able to edit my own profile ...

--------------- Added 17 Feb 2014 at 07:21 ---------------

Originally Posted by Max Taxable View Post
There's a Mod for that, but it still for obvious reasons won't allow password to be edited from adminCP.
Nice! thank you Max !
Reply With Quote
  #15  
Old 15 Mar 2014, 00:25
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
great article! for me I use cpanel file editor, i think this is the fastest way
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 14:01.

Layout Options | Width: Wide Color: