[Opensim-users] [Scripting] Scanning regions for scripts
Thomas Ringate
tringate at gmail.com
Sat Dec 12 20:56:32 UTC 2015
Jeff,
I made some progress, but now get this error:
PHP Fatal error: Call to a member function fetch_all() on boolean in
/var/www/tsim/admin/regionscrits.php on line 87
This is what I modified:
// Get region data
// $query = "SELECT * FROM robust.regions WHERE regionName='$region';";
// $answer = $link->query($query);
// if (!$answer->num_rows) die ("Region $region not found\n");
// $region = $answer->fetch_assoc();
// $regionUuid = $region['uuid'];
$regionUuid = '3b15c050-1fe4-11df-8a39-0800200c9a66';
// $regionDB = DatabaseForRegion ($region);
$regionDB = 'OS-Sanctuary-Home';
this is my line 87:
$prims = $answer->fetch_all(MYSQLI_ASSOC);
Looking at my database with phpMyadmin I see the UUID matching what I have
hard coded.
Tom
-----Original Message-----
From: Jeff Kelley
Sent: Saturday, December 12, 2015 2:48 PM
To: opensim-users at opensimulator.org
Subject: Re: [Opensim-users] [Scripting] Scanning regions for scripts
At 11:57 AM -0500 12/12/15, Thomas Ringate wrote:
>What is the environment your tool was written for?
PHP 5.5.9, PHP 5.5.11, mysqli (apt-get install php5-mysqlnd)
> I am on OSgrid and tried to use your script and can not make it do
> anything other
> than give me the message "Region Sanctuary not found".
I query robust's database to get the region UUID. You can't talk to
OSGrid's database.
Comment lines 63-67 and edit 68 and 69 for region UUID and database
name. For multiple regions, you may try to query gridservice
http://opensimulator.org/wiki/GridService or (simpler) hard-code the
UUID or an associative array of UUIDs for your regions.
getasset.php won't work for the same reason. It's a query to robust"s db.
In db_access sqlBase(), make sure to put a dabatase you can actually
access e.g. OS-Sanctuary-Home.
-- Jeff
_______________________________________________
Opensim-users mailing list
Opensim-users at opensimulator.org
http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
More information about the Opensim-users
mailing list