Copyright © 2012 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
Hi Experts,
I wanted to add the KWC to my Wordpress page but unfortunately I am stuck at this error:
Fatal error: Cannot redeclare class KalturaAdminUser in D:\xampp\htdocs\example\kalturaClass.php on line 858
I have installed the KalturaClient.php and below are my code. Please help!:
<?php require_once("kalturaclient.php"); ?>
<?php require_once("kalturaClass.php"); ?>
<?php
//define constants
define("KALTURA_PARTNER_ID", xxxx);
define("KALTURA_PARTNER_SERVICE_SECRET", "xxxxxxxxx");
//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");
}
if youre getting this error, it means that somewhere in your PHP environment you are already declaring the KalturaAdminUser class - the exception message is actually quite specific in what your problem is.
my guess would be that you guys are already using the All In One Plugin, right? In that case, hold on for just a little bit until I release the All In One Plugin Enhanced version (new Videox7 plugin), which includes the ability to embed the KCW into any post or page using a shortcode.
I had the same problem. I took out my script, but same error. As long as I kept:
<?php require_once('/wp-content/plugins/kaltura_client_v3/KalturaClient.php'); ?>
in my header, or anywhere for that matter, I still got the same error :-/
Do I also need to install some libraries?
Fatal error: Cannot redeclare class KalturaAdminUser in C:\xampp\htdocs\localdatabase\wp-content\plugins\kaltura_client_v3\KalturaClient.php on line 314