Offline Instant Messaging with php Mysqli

Offline Messaging makes it possible to send IM's to people who are not online.

Instead, the messages are saved to a database and delivered the next time the recipient logs in.

Disclaimer
Please note that these are third party modules which you use at your own risk!

OpenSimulator takes no responsibility for these modules.

STEP 1: offline.sql
Save these SQL commands to an offline.sql file on your MySQL server. Or copy the sql query to phpmyadmin and after execute the query, go to step 2.

Connect to your MySQL (Linux commands shown): $ mysql --user=$mysqluser --password=$mysqlpassword $databasename Replace $mysqluser, $mysqlpassword, and $databasename with your specific configuration.

At the mysql prompt, source the offline.sql file to configure your database to hold offline IMs: mysql> source offline.sql ... ensure no error messages appear here ... mysql> quit

STEP 2: offline.php
Copy this PHP script to a file called offline.php and upload the script file to your web server.

Open the offline.php file to set the following parameters. C_DB_HOST, C_DB_DATABASE, C_DB_USER, C_DB_PASS, C_DB_TABLE Add the required data between the ""

STEP 3: OfflineMessageModule
Shutdown your simulator.

Edit the OpenSim.ini [Messaging] block.

An example configuration is shown below:

P.D: The MuteListModule and URL must be uncommented in order for the offline module to work, even if there is no mute.php file in the web folder.

Once the edits are made, save your OpenSim.ini and restart your simulator.

Using the OfflineMessageModule
Login and try to send a message to an offline person. You should see the message: "System: User is not logged in. Message saved."

If you see "Message not saved." check your web server error log.

If you are using XAMPP or WAMP or other apache based webserver and you get error

messages like, File does not exist: /var/www/offline_im/RetrieveMessages/.

Then you need to enable the mod_rewrite.so module in apache.

You also need to create .htaccess file that's placed inside the directory where you have also the offline php files.

the .htaccess file would look like this.