PS Web Console Setup

- Planeshift Database Setup

  At time of writing the planeshift user and database do not appear to get created automatically.

  - Prerequisites

    You must already have installed a web server, MySQL server and PHP.

  - Database Creation

    Using PHPmyAdmin or your preferred method of SQL maintenance, create a database called planeshift.

  - Database Population

    If you use mysqladmin and are in the root folder of the planeshift CVS go to src/server/database/mysql and use mysqladmin to run the query in the file create_all.sql to populate the planeshift db with the initial data.

    NOTE:This query will not run correctly if you do not have Create and Drop privilege, as sometimes happens with just installed MySQL/PHPmyAdmin. In that case, delete the first two lines before you run the query.

    OR

    If you use phpmyadmin on windows run _CREATE_ALL.BAT, in Msys type: cmd //c _CREATE_ALL.BAT, and paste all the contents of the Notepad window that opens into your SQL query box in phpmyadmin. See _CREATE_ALL.BAT.

    In either case: You may find that the script does not completely populate the database and that you get errors when it runs. At present the files characters.sql and item_instances.sql both raise errors on my system as the result of commented lines being preceded with -- instead of ##. You will need to hand edit any such files to make them compatible with your system.

    See the notes here on how to correctly populate the table planeshift.sectors.

  - User Creation

    Create a user called planeshift, with password planeshift, all privileges on the database planeshift and restricted to accessing the database from localhost only.

- Planeshift Web Console Setup

  - Create a folder called planeshift at the root of your web server's document folder, eg DOCUMENT_ROOT/htdocs/planeshift.
  - Copy the files from PLANESHIFT_CVS/www to your new planeshift web folder
  - Create a folder called secure inside the planeshift folder
  - Create a new text file inside the secure folder and call it db_config.php
  - Paste the following lines into db_config.php and save the file

    <?PHP error_reporting (E_ERROR | E_WARNING | E_PARSE | !E_NOTICE); $db_hostname = "localhost"; $db_username = "planeshift"; $db_password = "planeshift"; $db_name = "planeshift"; ?>

  - Create a folder called sessions inside the planeshift/serverconsole folder
  - Rename the folder migration to something else. You probably do not need this function and you probably do not want people using it either.
  - Rename the folder serverconsole to something_else not obviously related to admin. (The default planeshift.accounts table is prepopulated with admin level logins that you do not want people to get easy access to).
  - Use your mysql admin functions to change the usernames and passwords of the accounts vengeance and acraig to something else.
    Dont forget to apply the MD5 function to the new passwords or you will not be able to login.
  - Point you browser to http://localhost/planeshift/register/ and register a new account to make sure that your registration process works
  - Point your browser to http://localhost/planeshift/something_else and make sure that you can login.

See Web Console Guide for instructions on how to use the web console.

It would be nice if the configure or make scripts created a database user with default parameters and set up the database if they did not already exist, and backed up the current database if it did exist and then updated the table structures to reflect those in the current CVS.
It would also be nice if there was a ps_temp database that existed to allow web console users to run table reconfiguration and repopulation routines.