Moving XF from root/community -> root == Bang.

Tigratrus

Well-known member
I moved all the files/folders (after ensuring that there was no duplication with what's currently in the root other than the index page itself) but it was still throwing errors:

Code:
Warning: require(/home/ikeafans/public_html/community/library/XenForo/Autoloader.php) [function.require]: failed to open stream: No such file or directory in /home/ikeafans/public_html/community/admin.php on line 6

Fatal error: require() [function.require]: Failed opening required '/home/ikeafans/public_html/community/library/XenForo/Autoloader.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ikeafans/public_html/community/admin.php on line 6

So I can't get into the ACP to reset the board url.

There's no setting in library/config.php so I started digging around in the DB. I *think* I've found the controlling DB entry in the xf_option table in field xf_option.boardurl, but changing that to the domain root has no effect. Is there somewhere else that xf is storing the location?

I can back out my changes and start again... What's the recommended method for moving XF from a subdirectory out to the root?

Thanks in advance for any assistance/clarification anyone can provide! :)
 
::nods::
I read through that one, but there was never any resolution posted. I've moved all the files/directories out to the root, but when I try to hit domainroot/admin.php I get the errors listed above. Looking at admin.php it consists of:
Code:
<?php

$startTime = microtime(true);
$fileDir = dirname(__FILE__);

require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);

$fc = new XenForo_FrontController(new XenForo_Dependencies_Admin());
$fc->run();

So it looks like somehow $fileDir is returning the old value? Could this be related to server level caching or something?
 
How about keep the files you moved into web root and put back the files in the community directory, and then go to the ACP and set options as you prefer, and then delete one set of files? The first error message looks like not all the files moved correctly, so make sure the files are all there in whatever location you are going to use.
 
Ha! That sorted it... Been so long since I've used Windows based workstations now that I've gotten out of the "Rule #1 - Reboot and see if the problem goes away" mentality. ;)

My guess: it was a problem with the something ($fileDir ?) being maintained in opcode cache or something similar. Bouncing the server fixed it. *THIS* is why we do testing on an entirely separate instance from the live site. :) Well, hopefully if anyone else runs into the same sort of issue they might find this useful.
 
How about keep the files you moved into web root and put back the files in the community directory, and then go to the ACP and set options as you prefer, and then delete one set of files? The first error message looks like not all the files moved correctly, so make sure the files are all there in whatever location you are going to use.
Thanks Calorie, that was a good idea, and I'd have tried it next if bouncing the server hadn't worked. :)
 
Top Bottom