What is a Web Interface (WI)?
Take a look at mine and see for yourself.
To create a WI you will need three pieces of software, and this is the reason for me splitting this tutorial into three sections.
Many ISP's now, especially on home connections, block outbound port 25 to prevent compromised machines spamming, and instead force you to relay through their SMTP servers. This means that WI will not work, as the email confirmation will not get through (as it needs Port 25).
To test if your ISP blocks port Port 25, download the free utility Putty. Open Putty, and put the following:
Connection Type: Telnet
A DOS-like window should open, and you should get a response similar to this:
220 mx.google.com ESMTP b17si7069788fka.27
If you do you are good to go and can proceed with this tutorial. If you don't get a response then you cannot use email for new user confirmation or for group messages, however, you can use Captcha instead for new user confirmation, and this is described in Part 3.
Now hit the Enter key in that DOS-like window, and type QUIT (in capitals). That will close the window and Putty.
The first piece of software you need is WAMP. WAMP stands for Apache, MySQL, PHP on Windows (sort of back-to-front I know). This free suite is amazing.
Basically the suite installs:
Apache: this will turn your server into a fully-fledged web-server
PHP: this will enable your server to run php scripts to run things such as a Web-Interface
MySQL: the preferred database engine for opensim
The suite has some great tools included too, such as phpMyAdmin which allows you to explore and change your MySQL database.
Before we start, if you already have MySQL installed on your machine, you should make a backup of your database, and uninstall MySQL. To do this:
a) Create a Backup of your database
Open a command console window (go to Start, Run, and type 'cmd' (without the quotes) in the Open: box.). In the command console type the following:
mysqldump -u root -p opensim > c:\opensim.sql
This command starts the mysqldump backup utility. The full syntax for this command is:
mysqldump -u [username] -p [databasename] > [backupfile.sql]
username = the user name you use in MySQL, usually 'root' the -p switch will prompt you for the password you use for MySQL
databasename = the name of the database you wish to backup, in our case this is 'opensim'
backupfile.sql = the path and name of the backup file, can be anything, for example, c:\opensim.sql'
b) Uninstall MySQL
If MySQL is running as a Windows service you must first stop it. To do this go to Start, Settings, Control Panel, Administrative Tools, Services. Scroll down till you see MySQL, select it, and choose Stop the Service from the left-pane.
It is much easier to use the same User name and Password for your new MySQL so make a note of it now, before uninstalling.
You can now uninstall MySQL in the normal way, by going to Start, Settings, Control Panel, Add or Remove Programs. Scroll down until you see MySQL Server 5.0, select it, and choose Remove.
Step 1: Installing WAMP
You can download your copy of WampServer from here. I do not intend to reinvent the wheel, as there is an excellent step-by-steo guide to installing WampServer, with screenshots, on the JLBN website. Just follow their steps, to the bottom of the page, then it will ask, When you are ready, click here to go to the next page, and so on to the end.
Once WampServer is installed you will see the icon in the System Tray, left-click it, and at the bottom of the Wamp menu you will see Put Online, choose this, then select Start All Services. Wamp and its services are now running.
Step 2: Configure MySQL
From the Wamp menu select phpMyAdmin.
In the left pane select mysql.
Check the checkbox besides 'user' and then click the Browse icon to its right.
The first entry should be 'localhost' 'root', check the checkbox then click the Pencil edit.
The first three Fields are Host, User and Password.
For Host, make the Value localhost. Leave the Function blank.
For User, make the Value root (or whatever MySQL username you chose). Leave the Function blank.
For Password, make the Value the MySQL password you chose. For Function, select PASSWORD from the drop-down box. This is very IMPORTANT.
At the bottom of this table you will see a Go button, hit it.
In the left pane, at the top, you will see a little Home icon, click this.
In the right pane you will see the option to Reload Privileges, hit this, it should say Reloaded Successfully.
Now click on Databases, and in the Create new database box, type 'opensim' (without the quotes) or whatever name you have used for your MySQL opensim database.
If you get an 'Access denied' error at this point, do the following:
Open Explorer and navigate to wamp\apps\phpmyadmin
Open the config.inc.php file in Notepad
Find the line: $cfg['Servers'][$i]['password'] =
The password in the quotes will be blank, enter your MySQL password here, save.
Close down phpMyAdmin, then reopen it (to clear the cache)
Click on the Home icon, and you should be able to create a database now
Use the same name for your database that you used previously (if you were using MySQl previously).
Once the database has been created it will appear in the left pane.
Step 3: Configure Apache
Click on the Wamp system tray icon, go to Apache, Service, and Stop the service.
Using Explorer navigate to wamp\bin\apache\apache2.2.8\bin
Open the file php.ini and scroll down to Language Options
Find the line that says: short_open_tag = Off and change this to On
A couple of lines below should be: asp_tags = Off, change this to On too
Now scroll down till you find the [Mail Function] section
Under Win 32 there should be a line that says
;sendmail_from = firstname.lastname@example.org
Remove the leading semicolon
Save and close.
Apache also needs the TCP port 80 opening in your firewall, so do this now.
Now click on the Wamp system tray icon, go to Apache, Service, and Start the service.
Step 4: Import your MySQL database
We are now ready to import the previously backed-up opensim database (c:\opensim.sql)
Navigate to c:\opensim.sql (or wherever you saved it to, right-click and choose Cut
Navigate to: wamp\bin\mysql\mysql5.0.51b\bin and paste the file there
Open a cmd window, and change directory (cd) until you get to the bin folder above
Now type the command: mysql -uroot -p opensim < opensim.sql
You will know when the database has finished loading when you see the dos prompt again.
Step 5: Check that all is OK
You might want to check at this point that you can see your Wamp server page. Go to your domain (or IP address) in a web browser, with no port number, (for example, mine was http://anubia.servegame.org), and you should see the Wamp server page.
If this is OK you can now start the next part of this tutorial and install the Web-Interface software.
Note: Each tutorial assumes you have completed the preceding one
- 01. Installing OpenSim
- 02. Connecting two Viewers to your Region
- 03. Remotely Connecting to a Standalone Sim
- 04. Migrating to MySQL
- 05. Working in Grid Mode
- 06. Connecting to the OSGrid
- 07. Using Hypergrid
- 08. Creating a Web Interface - Part 1/3
- 09. Creating a Web Interface - Part 2/3
- 10. Creating a Web Interface - Part 3/3
- 11. Using Money in OpenSim
- 12. Using Grid Info
- ▼ November (12)