vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Administrative and Maintenance Tools - KX - Rename Config File (https://vborg.vbsupport.ru/showthread.php?t=198856)

R-D 12-17-2008 03:22 PM

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;
}


R-D 12-17-2008 03:28 PM

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.

:)

Bilderback 12-17-2008 11:46 PM

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');

Ziki 12-18-2008 09:54 AM

No,it has to stay in vBulletin root.

Fungsten 12-18-2008 07:57 PM

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.

Ziki 12-19-2008 06:56 AM

Is the folder in vbulletin root?

Fungsten 12-19-2008 04:01 PM

Quote:

Originally Posted by Ziki (Post 1688540)
Is the folder in vbulletin root?

Yes. It is forum/Folder/Folder

Ziki 12-19-2008 04:08 PM

Is the set URL relative?

Fungsten 12-19-2008 04:23 PM

Quote:

Originally Posted by Ziki (Post 1688865)
Is the set URL relative?

Yes. If you mean that I didn't list it. What I did is replace:

Quote:

if (file_exists(CWD. '/includes/config.php'))
With the new path:

Quote:

if (file_exists(CWD. '/newfolder/newfolder/newname.php'))
I also made the other change.

Falon 02-10-2009 03:25 PM

is it works with vbulletin 3.7.x


All times are GMT. The time now is 02:16 PM.

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.01937 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete