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

Landtool.php

このトピックの投稿一覧へ

なし Landtool.php

msg# 1
depth:
0
前の投稿 - 次の投稿 | 親投稿 - 子投稿.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 ('".
$UUID."','".
$sourceID."','".
$destID."','".
$amount."','".
"00000000-0000-0000-0000-000000000000','".
$handle."','".
$db->escape($type)."','".
time()."','".
$secure."','".
$db->escape($flags)."','".
$db->escape($description)."')";
error_log("Insert into currnency transation error_log SQL: $sql");
$db_ret = $db->query($sql);
error_log($db_ret);

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!)

MoneyServer.ini:
[Startup]
;
; Place to create a PID file
PIDFile = "/tmp/money.pid"


[MySql]
;
;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 = "192.168.0.164" ;; not use 127.0.0.1

; 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 = http://192.168.0.164/currency/helper/
...

[Economy]
SellEnabled = "true"
UserServer = "http://192.168.0.164:8002/" ;; not use localhost or 127.0.0.1
CurrencyServer = "https://192.168.0.164:8008/" ;; not use localhost or 127.0.0.1
EconomyModule = "DTLNSLMoneyModule"

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

;; Money Unit fee to create groups
PriceGroupCreate = 200

...

root@grid1:~/opensim-0.8.0.3/bin# mono -V
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-8)
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?


DSL
投票数:132 平均点:7.05

投稿ツリー

  条件検索へ


サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 4月翌月
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
<今日>

オンライン状況

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

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

もっと...

アクセスカウンタ

今日 : 1397713977139771397713977
昨日 : 1406514065140651406514065
総計 : 2335499923354999233549992335499923354999233549992335499923354999
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com