Self-Hosting Server Installation
These instructions cover the server setup for the self-hosted version of the E2V system.
Unzip Files to Local Computer
You should first unzip the e2v-server.zip file into a temporary directory on your local computer. You will find two subfolders, PHP and SQL.
Creating the E2V Database
How you create a database is very dependent upon your hosting solution. If you have cPanel access, you can use the MySQL Database App which is very simple to use. Here are the items you need to do:
- Create a new MySQL database (also called "schema"). You can name it whatever you like, but "e2v" makes sense. Some hosts will force a prefix onto the name of your database, and that's OK. All that matters is that you create one specifically for the vendor system, and that you know its name.
- Create a new MySQL user, The name of the user is up to you, it's only used by the application itself to access the database. We recommend "e2vuser". You will also need to assign a password to the user. Select any password you like.
- Grant the new user access to the database you just created. It will require SELECT, INSERT, UPDATE, and DELETE rights.
To be able to move on, you will need the database name, the user name, and the user's password.
Creating the application tables
The zip file contains a folder called SQL, and in it you'll find a file with a .sql extension. This file contains the SQL code to create the tables needed by the application. Different systems have different methods for executing SQL script, but this code needs to be run within the context of the database created above.
You must edit the file e2v_system.php, located in the PHP folder you unzipped, under the "inc" subfolder. It contains definitions for the various items you've created/done above, for access by the application.
The file contains the following text:
define('DB_HOST', 'localhost'); define('DB_USER', ''); define('DB_PASSWORD', ''); define('DB_NAME', ''); define('OBJECT_PASSWORD', '');
Edit this file with any plain text editor like Notepad (not a word processor like Word).
DB_HOST - You should be able to leave this value as-is. The only time it would need to change is if your database server is not the same as your web server, and if that's the case, you'll already know what to put here.
DB_USER - This is the name of the database user you created above.
DB_PASSWORD - This is the password for the database user.
DB_NAME - This is the name of the database (schema) you created above.
OBJECT_PASSWORD - This password is used to validate that in-world objects have permission to access your database. They will have to have the correct URL of course, but this password ensures that only objects that have the password can actually add or read data from your database.
Installing the PHP Files
There are so many ways to upload files to a server, that it's nearly impossible to give step by step instructions. Whether you are using FTP or some other upload method, the end result you want to attain is having the application files placed somewhere under the public website root folder, in a new subdirectory. On most Linux/Apache hosts, this tends to be a folder called "wwwroot". Here are some things to keep in mind:
- The name of the folder you create is up to you. We recommend "e2v". The name of the folder will affect the URL you use to access the admin portion of the website. For example, if you create a folder called "e2v" on a server that is accessible from "www.myserver.com", then you'll use "www.myserver.com/e2v/owners/" as your starting URL for the admin site.
- The PHP folder from the zip file contains many files and folders. They all need to be copied, and the directory structure maintained, into the folder you create above. You should end up with several folders inside the E2V folder you created above, such as "ans", "inc", etc.
A Quick Test
A simple test to make sure things are (likely) set up correctly, it to attempt to log into the admin site. At this point, you will not be able to log in but you should get a reasonable error message.
To try this test, use your browser to navigate to your website, but add "e2v/owners/" to the end of your website's URL. This should show you the login page. Try entering anything at all into the avatar name and password fields, and clicking Login. This should give you an error that the avatar name is not found.