The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
KX - Rename Config File Details »» | |||||||||||||||||||||||||||
This modification was brought to you by KXDesign http://www.kxdesign.com/ ~Modification name Rename Config File ~Modification description This modification allows you to rename or move the config.php file.This is to protect your sensible information and increase the security of your vBulletin board. The majority of boards get hacked because a hacker uploads a malicious script to get hold of the config.php content.But if you move or rename it,there is no chance that they find out the location of it. Tips & Tricks: vBSEO - https://vborg.vbsupport.ru/showpost....1&postcount=24 Fool Hackers - https://vborg.vbsupport.ru/showpost....8&postcount=23 ~Modification options None ~Modification info File uploads: 0 File edits: 1 Templates: 0 Template edits: 0 Plugins: 0 SQL Queries: 0 Phrases: 0 Settings: 0 Hooks: 0 Install time: 1 minute Install level: Light ~Modification installation Step 1: Open includes/class_core.php and find: Code:
include(CWD . '/includes/config.php'); if (sizeof($config) == 0) { if (file_exists(CWD. '/includes/config.php')) { // config.php exists, but does not define $config die('<br /><br /><strong>Configuration</strong>: includes/config.php exists, but is not in the 3.6+ format. Please convert your config file via the new config.php.new.'); } else { die('<br /><br /><strong>Configuration</strong>: includes/config.php does not exist. Please fill out the data in config.php.new and rename it to config.php'); } } Code:
include(CWD . 'XXXXX'); if (sizeof($config) == 0) { if (file_exists(CWD. 'XXXXX')) { // config.php exists, but does not define $config die('<br /><br /><strong>Configuration</strong>: includes/config.php exists, but is not in the 3.6+ format. Please convert your config file via the new config.php.new.'); } else { die('<br /><br /><strong>Configuration</strong>: includes/config.php does not exist. Please fill out the data in config.php.new and rename it to config.php'); } } admincp/mynewconfig.php or includes/configuration.php . ~Modification screenshots None ~Modification changelog
~Modification copyright This may not be distributed,released or claimed as your work without author's permission. Download Now
Show Your Support
|
Благодарность от: | ||
RyanFabbro |
Comments |
#12
|
||||
|
||||
You won't be able to upgrade your forum in future, unless you remember to rename the config.php file back to config.php and overwrite the modified class_core.php file BEFORE proceeding with the upgrade.
Edits to class_core.php should only then be re-applied AFTER the upgrade is complete. Here's the code in upgradecore.php that would stop you from upgrading until the file exists as "config.php": Note: You could also change the config.php reference in this file, but you'd have to remember to make that change every time the file is overwritten with the newer version when updating. Code:
// config file check if (!file_exists(DIR . '/includes/config.php')) { echo "<p>{$upgradecore_phrases['ensure_config_exists']}</p>"; $errorthrown = true; } |
#13
|
||||
|
||||
Also, I recommend changing "config.php" to something as obscure as possible, as it's easy to read the contents of a folder in a php file.
Calling it "configuration.php" or "mynewconfig.php", even in another directory, doesn't make it particularly difficult for a hacker to figure out where your config.php has gone, if he wants to hack your site and already has the means to put a malicious file onto your server. |
#14
|
||||
|
||||
I wonder if you can remove the current working directory and move it above root?
Like outside of public_html/ ? include('/home/inc/XXXXX'); or include('../../XXXXX'); |
#15
|
||||
|
||||
No,it has to stay in vBulletin root.
|
#16
|
||||
|
||||
It didn't work. What I did was made a folder in the root like this: blahblah/blahblah/newconfigfilename.
I came up with an error. Any ideas? TIA. |
#17
|
||||
|
||||
Is the folder in vbulletin root?
|
#18
|
||||
|
||||
|
#19
|
||||
|
||||
Is the set URL relative?
|
#20
|
||||
|
||||
Yes. If you mean that I didn't list it. What I did is replace:
Quote:
Quote:
|
#21
|
|||
|
|||
is it works with vbulletin 3.7.x
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|