Skip to content
James Errington edited this page Jun 22, 2017 · 6 revisions

To use Routegadget 2 you will require ftp access to your server. If this makes no sense then the following information is not for you.

  1. Download the files and extract them. Note that this will extract them to a directory called rg-master, which needs to be renamed to rg2.

  2. Rename the rg2-config.txt file to rg2-config.php in the /rg2 directory and enter the URL for your Routegadget installation. Change other configuration options as necessary.

  3. If you have an existing Routegadget installation then go to step 4. If this is a new installation with no previous Routegadget installation then go to step 6.

  4. (Adding RG2 to an existing Routegadget installation). Use ftp to transfer the files to the server where you want to run Routegadget. Everything sits in or below a new directory called rg2 which is in the main Routegadget directory, at the same level as the kartat directory where the data files are stored. You should end up with a structure similar to that below. The rg2-config.php should have the following line:

      www.yourdomain.com
          /cgi-bin (old Routegadget files)
          /html (old Routegadget files)
          /img (old Routegadget files)
          /kartat (old Routegadget data)
          /rg2
              /css
              /img
              /lang
              /lock
              /log
              /js
              /lib
    
  5. Your installation should now be available at e.g. http://www.yourdomain.com/rg2

  6. (Creating a new Routegadget installation). Use ftp to transfer the files to the server where you want to run Routegadget. Everything sits in a new directory called rg2. The data files will be created in a sub-directory called kartat. This will be created automatically when you first use RG2 if you have not already created it. You should end up with a structure similar to:

      www.yourdomain.com
        /routegadget
          /kartat (created automatically if not already created)
          /rg2
              /css
              /img
              /lang
              /lib
              /lock
              /log
              /js
    
  7. Your installation should now be available at e.g. http://www.yourdomain.com/routegadget/rg2

#Possible problems If things don't work as expected:

  • check your rg2-config.php file
  • check that the kartat directory exists.

If everything looks OK but you are still getting "SyntaxError: Unexpected token <" then you may have managed to insert hidden characters at the start of your rg2-config.php file. For a full discussion of this UTF8 BOM problem see this stackoverflow article.

You can check if this is the problem if you upload the config file to http://en.webhex.net/

The easiest solution is to recreate the config file starting from the github version and using a different text editor (something like notepad in Windows).