Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 9 Months, 2 Weeks ago Move /inc, /cache and /admin
#1
Solved: 4 Years, 9 Months, 2 Weeks ago
EDIT: Realized this was mad, everything has been restored.

I'm attempting to move these directories inside another one to improve security, so in root there will be only php files and the directory (related to the subdomain) in which I already moved /images and /jscripts.

I went to /inc/config.php and edited admin path to /folder/admin but I've been returned a warning and an error when attempting to access the ACP

Quote: Warning: require_once(/home/*****/public_html/inc/init.php): failed to open stream: No such file or directory in /home/*****/public_html/global.php on line 18

Fatal error: require_once(): Failed opening required '/home/*****/public_html/inc/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/global.php on line [b]18

So I moved /inc inside the new directory too but without success.. am I missing something?
Reply
#2
Solved: 4 Years, 9 Months, 2 Weeks ago
moving /inc files and folders is a big mistake. There are numerous links in the php scripts to /inc files, and all these links are broken.
Regards, Ad Bakker (NL)
Reply
#3
Solved: 4 Years, 9 Months, 2 Weeks ago
To rename your admin cp link , enter your web host's control panel and go to the File Manager. Alternatively, you can use an FTP program like FileZilla. Find the directory called 'admin', and simply rename it to something else (it is suggested to rename it to something cryptic, like 87y2ut).

Then, find the config.php file in the 'inc' directory. Look for the following code:


Quote:/**
* Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.
*/

$config['admin_dir'] = 'admin';


Change the text in red to the new name of your admin directory.

The your done just dont move anything in the inc folder
Reply
#4
Solved: 4 Years, 9 Months, 2 Weeks ago
This user has been denied support. This user has been denied support.
there is a lot of editing involved in moving those directories. admin cp isnt too hard because its independent in a way but you would still have to change the link to it in the header template.
Reply
#5
Solved: 4 Years, 9 Months, 2 Weeks ago
(2015-06-09, 06:28 PM)Ad Bakker Wrote: moving /inc files and folders is a big mistake. There are numerous links in the php scripts to /inc files, and all these links are broken.

Maybe I may leave /inc and /admin in root but isn't there a way to move /cache without breaking links?


(2015-06-09, 06:33 PM)mikeorman Wrote: there is a lot of editing involved in moving those directories. admin cp isnt too hard because its independent in a way but you would still have to change the link to it in the header template.

Link has been changed easily, the trouble came when I wasn't able to access ACP even if url was correct... maybe /inc and /admin have to stay in the same folder?
Reply
#6
Solved: 4 Years, 9 Months, 2 Weeks ago
(2015-06-09, 06:22 PM)ShadowOne Wrote: in which I already moved /images and /jscripts.

I wonder how you did this without killing your forum.

Images location can be set in styles, but this do not involve images referred to in stylesheets, so you have to do that manually.
Jscripts are linked to in many, many templates, so also all these links should be corrected.
Regards, Ad Bakker (NL)
Reply
#7
Solved: 4 Years, 9 Months, 2 Weeks ago
(2015-06-09, 06:40 PM)Ad Bakker Wrote:
(2015-06-09, 06:22 PM)ShadowOne Wrote: in which I already moved /images and /jscripts.

I wonder how you did this without killing your forum.

Images location can be set in styles, but this do not involve images referred to in stylesheets, so you have to do that manually.
Jscripts are linked to in many, many templates, so also all these links should be corrected.

images directory has been moved easily, I edited it in styles and then manually changed some broken links.
Jscripts... well tbh I moved the directory and changed 3 links which I found in headerinclude, now everything seems running smooth..
Reply
#8
Solved: 4 Years, 9 Months, 2 Weeks ago
(2015-06-09, 06:43 PM)ShadowOne Wrote: Jscripts... well tbh I moved the directory and changed 3 links which I found in headerinclude, now everything seems running smooth..

Just the start of an arbitrary template (editpost):

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->edit_post}</title>
{$headerinclude}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/post.js?ver=1800"></script>
</head>

So I wonder how thorough your testing was.

(2015-06-09, 06:40 PM)ShadowOne Wrote: Maybe I may leave /inc and /admin in root but isn't there a way to move /cache without breaking links?

Again asking for problems. Your themes/stylesheets are cached there, and of course the will be referenced somewhere, but where.............
Regards, Ad Bakker (NL)
Reply
#9
Solved: 4 Years, 9 Months, 2 Weeks ago
This user has been denied support. This user has been denied support.
your going to have a serious mess on your hands. good luck. not even gonna f**k with this anymore.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)