Registration wont work?
tinytime
投稿数: 22
i followed all the instructions on the web page on opensim but everytime i do a request i get "Failure" returned i did the registration in PHP it is running on a linux server with everything enabled.
i also enabled the things in the robust.ini but it wont work for some reason, can anyone help me to see if i did anything wrong?
this is my PHP code:
<?
function getGUID(){
if (function_exists('com_create_guid')){
return com_create_guid();
}else{
mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
$charid = strtolower(md5(uniqid(rand(), true)));
$hyphen = chr(45);// "-"
$uuid =substr($charid, 0, 8).$hyphen
.substr($charid, 8, 4).$hyphen
.substr($charid,12, 4).$hyphen
.substr($charid,16, 4).$hyphen
.substr($charid,20,12);
return $uuid;
}
}
$new_UUID = getGUID();
$fields = array(
'METHOD' => "createuser",
'FirstName' => "testFirst",
'LastName' => "testLast",
'Password' => "123456",
'Email' => "test@test.com",
'PrincipalID' => $new_UUID);
$ch = curl_init("http://<my-IP>:8003/accounts");
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
echo "Return code:" . $info['http_code'] . "<br>";
echo "$result";
?>
i have debug on and it does say that there is a request there
i also enabled the things in the robust.ini but it wont work for some reason, can anyone help me to see if i did anything wrong?
this is my PHP code:
<?
function getGUID(){
if (function_exists('com_create_guid')){
return com_create_guid();
}else{
mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
$charid = strtolower(md5(uniqid(rand(), true)));
$hyphen = chr(45);// "-"
$uuid =substr($charid, 0, 8).$hyphen
.substr($charid, 8, 4).$hyphen
.substr($charid,12, 4).$hyphen
.substr($charid,16, 4).$hyphen
.substr($charid,20,12);
return $uuid;
}
}
$new_UUID = getGUID();
$fields = array(
'METHOD' => "createuser",
'FirstName' => "testFirst",
'LastName' => "testLast",
'Password' => "123456",
'Email' => "test@test.com",
'PrincipalID' => $new_UUID);
$ch = curl_init("http://<my-IP>:8003/accounts");
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
echo "Return code:" . $info['http_code'] . "<br>";
echo "$result";
?>
i have debug on and it does say that there is a request there
投票数:65
平均点:4.00
投稿ツリー
-
Registration wont work?
(tinytime, 2012-11-23 2:38)
- Re: Registration wont work? (iseki, 2012-11-23 11:28)
-
Re: Registration wont work?
(tinytime, 2012-11-23 12:41)
-
Re: Registration wont work?
(iseki, 2012-11-23 12:59)
- Re: Registration wont work? (iseki, 2012-11-23 13:10)
-
Re: Registration wont work?
(iseki, 2012-11-23 12:59)
-
Re: Registration wont work?
(tinytime, 2012-11-24 13:01)
- Re: Registration wont work? (iseki, 2012-11-24 15:22)
-
Re: Registration wont work?
(tinytime, 2012-11-24 16:11)
- Re: Registration wont work? (iseki, 2012-11-25 10:53)
- Re: Registration wont work? (tinytime, 2012-11-26 21:06)
-
Re: Registration wont work?
(tinytime, 2012-11-26 21:24)
- Re: Registration wont work? (iseki, 2012-11-26 23:38)