Re: Landtool.php
lloy0076
投稿数: 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
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
投票数:114
平均点:4.56
投稿ツリー
-
Landtool.php (lloy0076, 2014-11-27 14:25)
-
Re: Landtool.php (lloy0076, 2014-11-27 14:27)
-
Re: Landtool.php (iseki, 2014-11-27 18:13)
-
Re: Landtool.php (lloy0076, 2014-11-28 9:59)
-
Re: Re: Landtool.php (lloy0076, 2014-11-28 10:02)
-
-
-
Re: Landtool.php (iseki, 2014-11-29 22:15)
-
Re: Landtool.php (lloy0076, 2014-11-30 2:07)
-
Re: Landtool.php (iseki, 2014-11-30 15:53)
-
Re: Landtool.php (iseki, 2014-11-30 23:04)
-