flagflag  If you want to see English page, please click "English" Button at Left.



なし Landtool.php

msg# 1
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 .2 .3 .4 .5 .6 | 投稿日時 2014-11-27 14:25
lloy0076  Just popping in   投稿数: 5
Hi There,

I have the landfill.php and helper scripts that I've downloaded from NSL's 0.8.0 page.

I've noticed a number of unexpected issues:

1. The scripts assume that the money database is contained in the same MySQL database as the Robust database.

For example, the INSERT statement on Line 2217 of include/opensim.mysql.php simply does not work because it's trying to insert into the 'transactions' table that does not exist.

2. The scripts also assume that the estate information is also in the same MySQL database as the Robust database.

However, my estate information was setup to use an SQLite database living on a separate simulator server.

Now, here's the odd bit.

Once I fixed this -- principally by migrating the database onto the same database as the Robust server is using -- I can actually buy land if I purchase the coin before using the buy land and then purchase currency functionality. But if I use the 'Purchase Coin' (Buy Lindens) on the 'Buy Land' section I don't get any PHP errors any longer but no money gets purchased and the land doesn't transfer.

From what I can tell there's at least two pathways to "Purchase Coins" (in a LL viewer this would be called "Buy Lindens") in the helper scripts - the helper/currency.php one is working. But something -- and I'm not sure what -- is causing the land not to transfer and the money not to be purchased (or the transaction to get silently missed).

I have mangled some of the functions to get them to work, most specifically on Line 127 of helper/landtool.php I've done this:

if ($ret) {
if($amount>=0) {
// Kludge the real amount.
$real = isset($real) ? $real : $amount;
if(!process_transaction($agentid, $real, $ipAddress)) {

... this was because $real insisted on not being set causing the process_transaction(...) to fail.

I think the current issue is that one of the XML RPC calls is failing but it's not entirely clear to me, yet, which one it is.

I specifically say so because I have error_log(...) calls all over the place and currently the last thing I see is:

"PHP message: After opensim_get_estate_info(a69309dd-397f-458b-b46f-716ab118c40a, DB)"

This is an error_log after the call to get the region information.

But the following code doesn't seem to run:

$sql = "INSERT INTO ".CURRENCY_TRANSACTION_TBL." (UUID,sender,receiver,amount,objectUUID,".
"regionHandle,type,time,secure,status,description) ".
"VALUES ('".
error_log("Insert into currnency transation error_log SQL: $sql");
$db_ret = $db->query($sql);

To test this I have:

a) A Debian 7.0 Wheezy system
b) PHP 5.6 from dotted
c) Allowed everyone to buy as much money as they want (I'm rich - if only!)

; Place to create a PID file
PIDFile = "/tmp/money.pid"

;Connection parameters of MySQL
hostname = localhost ; Name of MySQL Server
database = opensim
username = opensim
password = HAHA ; No the password isn't that bad!

pooling = false
port = 3306

; Max DB connections kept by money server.
MaxConnection = 10
; If "00000000-0000-0000-0000-000000000000" is specified, all avatars can get money from system.
; If "" is specified, nobody can get money.
BankerAvatar = "00000000-0000-0000-0000-000000000000"

; If you want to use llGiveMoney() function normally even when payer doesn't login to OpenSim,
; please set true to this valiable
EnableForceTransfer = true

; send money to avatar by MoneyScript (for Bonus)
EnableScriptSendMoney = true
MoneyScriptAccessKey = "davidslloyd" ;; specify same secret key in include/config.php or WI(XoopenSim/Modlos)
MoneyScriptIPaddress = "" ;; not use

; If "" is specified, blue dialog is not displayed.
; You can use {0} and {1} in message string.
; {0} means amount and {1} means avatar name or object owner name
;BalanceMessageLandSale = "Paid the Money L${0} for Land." ;; for buy the land
;BalanceMessageScvLandSale = "" ;; for get the money of the sold land
;BalanceMessageSendGift = "Sent Gift L${0} to {1}." ;; for send gift to other avatar
;BalanceMessageReceiveGift = "Received Gift L${0} from {1}." ;; for receieve gift from other avatar
;BalanceMessagePayCharge = "" ;; for upload and group creation charge
;BalanceMessageBuyObject = "Bought the Object L${0} from {1}." ;; for buy the object
;BalanceMessageGetMoney = "Got the Money L${0} from {1}." ;; for get the money from object by llGiveMoney()
;BalanceMessageBuyMoney = "Bought the Money L${0}." ;; for buy the money from system
;BalanceMessageReceiveMoney = "Received L${0} from System." ;; for receive the money from system by send_money() script
;BalanceMessageRollBack = "RollBack the Transaction: L${0} from/to {1}." ;; when roll back ocuurred

; for HTTPS Server
ServerCertFilename = "SineWaveCert.pfx"
ServerCertPassword = "123"
;ServerCertFilename = "server_cert.p12"
;ServerCertPassword = ""

; for Client Authentication from MoneyModule
;CheckClientCert = true;
;CACertFilename = "cacert.crt"
;ClientCrlFilename = "clcrl.crt"

; for XML RPC Client Authentication to MoneyModule
;CheckServerCert = false;
;ClientCertFilename = "client_cert.p12"
;ClientCertPassword = ""

I have this in Robust.ini:

economy =

SellEnabled = "true"
UserServer = "" ;; not use localhost or
CurrencyServer = "" ;; not use localhost or
EconomyModule = "DTLNSLMoneyModule"

;; Money Unit fee to upload textures, animations etc
PriceUpload = 30

;; Money Unit fee to create groups
PriceGroupCreate = 200


root@grid1:~/opensim- mono -V
Mono JIT compiler version (Debian
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)


ii php5-cli 5.6.3-1~dotdeb.1 amd64 command-line interpreter for the php5 scripting language
ii php5-common 5.6.3-1~dotdeb.1 amd64 Common files for packages built from the php5 source
ii php5-curl 5.6.3-1~dotdeb.1 amd64 CURL module for php5
ii php5-fpm 5.6.3-1~dotdeb.1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary)
ii php5-mysql 5.6.3-1~dotdeb.1 amd64 MySQL module for php5
ii php5-readline 5.6.3-1~dotdeb.1 amd64 Readline module for php5
ii php5-xmlrpc 5.6.3-1~dotdeb.1 amd64 XML-RPC module for php5


I can buy land but only if I buy the Lindens first. If I use the 'Purchase Money/Coin/LL $' from the Buy Land screen (when I don't have enough in a test account), I've managed to mangle the scripts enough such that they don't totally fall over but no money appears to get exchanged.

I'm not using any form of CC provider (I just return true for that bit as though the customer's card always succeeds).

NB. I do see the landtool.php script asking for the Avatar's balance over XML-RPC but it never actually sends a request to buy any money.

Is there anything obvious that I might be doing wrong here?

投票数:132 平均点:7.05



サイト内 検索





サブ メニュー


前月2024年 5月翌月
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


32 人のユーザが現在オンラインです。 (2 人のユーザが Forum を参照しています。)

登録ユーザ: 0
ゲスト: 32



今日 : 113113113
昨日 : 4763476347634763
総計 : 2368874023688740236887402368874023688740236887402368874023688740
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com