Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin Tips & Tricks

Reply
 
Thread Tools
Editing Your config.php File
ozzy47's Avatar
ozzy47
Join Date: Jul 2009
Posts: 10,929

Just here to help out where I can.

USA
Show Printable Version Email this Page Subscription
ozzy47 ozzy47 is offline 02-16-2014, 11:00 PM

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.
Reply With Quote
  #12  
Old 02-17-2014, 03:31 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #13  
Old 02-17-2014, 03:32 AM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
2 благодарности(ей) от:
CAG CheechDogg, ggrimes620
  #14  
Old 02-17-2014, 03:33 AM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #15  
Old 02-17-2014, 07:19 AM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok , thank you guys .... it really threw me off to see myself not being able to edit my own profile ...

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

Quote:
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
Благодарность от:
Max Taxable
  #16  
Old 03-15-2014, 12:25 AM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great article! for me I use cpanel file editor, i think this is the fastest way
Reply With Quote
Reply

Thread Tools

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 11:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04364 seconds
  • Memory Usage 2,274KB
  • Queries Executed 21 (?)
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
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (7)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete