1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Installation, Upgrade, and Import Support' started by Tigratrus, Feb 11, 2011.

  1. Tigratrus

    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:

    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! :)
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Tigratrus

    Tigratrus Well-Known Member

    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:
    $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());
    So it looks like somehow $fileDir is returning the old value? Could this be related to server level caching or something?
  4. calorie

    calorie Active Member

    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.
    Tigratrus likes this.
  5. Tigratrus

    Tigratrus Well-Known Member

    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.
  6. Tigratrus

    Tigratrus Well-Known Member

    Thanks Calorie, that was a good idea, and I'd have tried it next if bouncing the server hadn't worked. :)
  7. Marc

    Marc Well-Known Member

    Every answer to a windows support ticket should start "Good morning IT helpdesk. Turn it off and back on again". :D

Share This Page