Inegration errors

No replies
Joined: 06/26/2010
Points: 8

Hi,

I am trying to integrate the Contribution Wizard into my site and I get some errors.

Here is my code:

<?php require_once("KalturaClient.php"); ?>

<?php
//define constants
define("KALTURA_PARTNER_ID", 3142**);
define("KALTURA_PARTNER_SERVICE_SECRET", "547136a00cbd266545e5353d071240**");

//define session variables
$partnerUserID = 'ANONYMOUS';

//construct Kaltura objects for session initiation
$config = new KalturaConfiguration(KALTURA_PARTNER_ID);
$client = new KalturaClient($config);
$ks = $client->session->start(KALTURA_PARTNER_SERVICE_SECRET, $partnerUserID, KalturaSessionType::USER);

//Prepare variables to be passed to embedded flash object.
$flashVars = array();
$flashVars["uid"] = $partnerUserID;
$flashVars["partnerId"] = KALTURA_PARTNER_ID;
$flashVars["ks"] = $ks;
$flashVars["afterAddEntry"] = "onContributionWizardAfterAddEntry";
$flashVars["close"] = "onContributionWizardClose";
$flashVars["showCloseButton"] = false;
$flashVars["Permissions"] = 1;

?>

var params = {
allowScriptAccess: "always",
allowNetworking: "all",
wmode: "opaque"
};
// php to js
var flashVars = <?php echo json_encode($flashVars); ?>;

swfobject.embedSWF("http://www.kaltura.com/kcw/ui_conf_id/1000741 ", "kcw", "680", "360", "9.0.0", "expressInstall.swf", flashVars, params);

function onContributionWizardAfterAddEntry(entries) {
alert(entries.length + " media file/s was/were succsesfully uploaded");
for(var i = 0; i < entries.length; i++) {
alert("entries["+i+"]:EntryID = " + entries[i].entryId);
}
}

function onContributionWizardClose() {
alert("Thank you for using Kaltura ontribution Wizard");
}

And I get the following errors:

Fatal error: Uncaught exception 'KalturaException' with message 'Error while starting session for partner [314272]' in /home/twill2010/domains/videopromo.biz/public_html/dolphin7/KalturaClientBase.php:307 Stack trace: #0 /home/twill2010/domains/videopromo.biz/public_html/dolphin7/KalturaClient.php(3751): KalturaClientBase->throwExceptionIfError(Array) #1 /home/twill2010/domains/videopromo.biz/public_html/dolphin7/upload_video.php(22): KalturaSessionService->start('547136a00cbd266...', 'ANONYMOUS', 0) #2 {main} thrown in /home/twill2010/domains/videopromo.biz/public_html/dolphin7/KalturaClientBase.php on line 307

Both KalturaClient.php and KalturaClient.php are in the same directory as my page (upload_video.php)

I have no idea what the problem is. The one thing that may be an issue is that I am using the Administrator Secret in the KALTURA_PARTNER_SERVICE_SECRET definition.

Any help would be greatly appreciated.

Luis