flagflag  

Re: Landtool.php

List posts in the topic

なし Re: Landtool.php

msg# 1.2.1
depth:
2
Previous post - Next post | Parent - Children.1 | Posted on 2014/11/28 9:59
lloy0076  Just popping in   Posts: 5
No, I switched the whole configuration - including the simulator's OpenSim.ini to MySQL:

Robust.ini:

...
[DatabaseService]
; PGSQL
; Uncomment these lines if you want to use PGSQL storage
; Change the connection string to your db details
;StorageProvider = "OpenSim.Data.PGSQL.dll"
;ConnectionString = "Server=localhost;Database=opensim;User Id=opensim; password=***;"

; MySQL
; Uncomment these lines if you want to use MySQL storage
; Change the connection string to your db details
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=127.0.0.1;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
...

MoneyServer.ini

[MySql]
;
;Connection parameters of MySQL
hostname = localhost ; Name of MySQL Server
database = opensim
username = opensim
password = ***

pooling = false
port = 3306
...

/usr/share/nginx/www/currency/include/config.php

// Please set MySQL DB access information
define('OPENSIM_DB_HOST', 'localhost');
define('OPENSIM_DB_NAME', 'opensim');
define('OPENSIM_DB_USER', 'opensim');
define('OPENSIM_DB_PASS', '***');
//
define('OPENSIM_DB_MYSQLI', true); // if you use MySQLi interface, please set true
...

I know that the landtool.php can actually access the correct MySQL database because I have put a heap of error_log("") messages in currency/include/opensim.mysql.php; for example:

function opensim_get_region_info($region, &$db=null)
{
error_log("opensim_get_region_info for $region");
global $OpenSimVersion;

if (!isGUID($region)) return null;
if ($region=='00000000-0000-0000-0000-000000000000') return null;

if (!is_object($db)) $db = opensim_new_db();
if ($OpenSimVersion==null) opensim_get_db_version($db);

$sql = "SELECT regionHandle,regionName,regionSecret,serverIP,serverHttpPort,serverURI,locX,locY FROM regions WHERE uuid='$region'";
error_log("SQL: opensim_get_region_info '$sql'.");
$db->query($sql);

list($regionHandle, $regionName, $regionSecret, $serverIP, $serverHttpPort, $serverURI, $locX, $locY) = $db->next_record();

error_log("Region Handle $regionHandle and name $regionName.");
...

The $regionHandle and $regionName are set correctly both when run by the code and when I run the SQL (logged above $db->query($sql)).

Everything should I think be processing well however I have noticed that the code has a nasty tendency to silently fail on missing tables and such and am wondering if I am missing something from some other function.


DSL
Votes:104 Average:4.52

Posts tree

  Advanced search


Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Today

Who's Online

97 user(s) are online (3 user(s) are browsing Forum)

Members: 0
Guests: 97

more...

Access Counter

Today : 3981398139813981
Yesterday : 1185711857118571185711857
Total : 2361570823615708236157082361570823615708236157082361570823615708
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com