Base
[ class tree: Base ] [ index: Base ] [ all elements ]

INSTALL.txt

Install
-------

The requirements are:
- PHP 5
- MySQL 5, with support for InnoDB tables
- GD 2, with FreeType support

The install procedure:

Run tables.sql to install tables, static.sql to insert static data, start.sql to 
insert initial starting records, and deCoast.sql to create the functions to de-coast
coastal territories. You can run these scripts using phpMyAdmin.

Edit config.sample.php to work with your setup, then copy it to config.php. The 
comments should be enough to work through it.

Then create a new user, and make it an admin using this SQL:
UPDATE pD_Users SET type=CONCAT(type,',Moderator,Admin') WHERE username = '[admin username]';

Finally you need to create a cron script or timed process to periodically run gamemaster.php,
which will process all the games at a regular interval. Once every 5 minutes should do the job,
and you need to run it as 
gamemaster.php?gameMasterSecret=[gameMasterSecret which you entered in config.php]

For example here is my cron line:
*/5    *       *       *       *       /usr/bin/wget -O - 'http://phpdiplomacy.net/gamemaster.php?gameMasterSecret=12345' >/dev/null 2>&1

'*/5    *       *       *       *' sets the times the script should run
'/usr/bin/wget' is the program which download the script thus running it
'http://phpdiplomacy.net/gamemaster.php?gameMasterSecret=12345' is the gamemaster URL
'-O - ' specifies to output to standard output
'>/dev/null 2>&1' specifies that the standard output should be discarded (i.e. just run the 
page without saving the results)


To test the installation you can set $interactivedatc to true in the config file, reset and
re-run the DATC tests at datc.php, and see if it works. If so it's likely that all requirements 
are met and the installation was successful (but be sure to change it back to false afterwards).



If any of this is causing you problems you can get help at http://forum.phpdiplomacy.net/

Documentation generated on Thu, 13 Nov 2008 18:14:33 +0900 by phpDocumentor 1.4.1