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

XF 1.4 Google App Engine Paths

Discussion in 'Troubleshooting and Problems' started by mdgross, Oct 17, 2014.

  1. mdgross

    mdgross Member

    On Google App Engine I want the file path to be "www/community" and the url to be just "community" but it's failing when trying to determine the route.

    This works:
    Code:
    Path to XF files:
    $SERVER['DOCUMENT_ROOT'] . '/community'
    
    App.yaml:
    # Xenforo
    - url: /community.*
      script: community/index.php
    This does not work:
    Code:
    Path to XF files:
    $SERVER['DOCUMENT_ROOT'] . '/www/community'
    
    App.yaml:
    # Xenforo
    - url: /community.*
      script: www/community/index.php
    When I hit http://www.domain.com/community/ it loads the sidebars but says "Route community/ could not be found." or "The requested page could not be found."

    Any ideas?
     
    Last edited: Oct 17, 2014
  2. Mike

    Mike XenForo Developer Staff Member

    GAE won't have something like this, but this is roughly the situation where the RewriteBase directive is needed for Apache. It's probably leading to the root not being able to be determined properly.

    Try setting up a PHP info file ( info.php with this in it: <?php phpinfo(); ?> ) in that directory. If you access it and go to the bottom you should see various _SERVER values. Can you send those to me?

    I can't promise that we can necessarily fix it, but I may be able to give a recommendation of a workaround.
     
  3. mdgross

    mdgross Member

    redacted
     
    Last edited: Oct 17, 2014
  4. Mike

    Mike XenForo Developer Staff Member

    Right, everything there does seem to point to the URL to the base script being /www/community/index.php -- there isn't anything we could actually correct for. You should be able workaround it for this specific case by putting this in config.php:

    Code:
    $_SERVER['SCRIPT_NAME'] = '/community/' . basename($_SERVER['SCRIPT_NAME']);
     
    mdgross likes this.
  5. mdgross

    mdgross Member

    Thanks @Mike. Works great.
     

Share This Page