Good morning everyone. I’m currently working as a student worker at the University that I’m attending and I’ve been given a project. We are wanting to upload videos to our Kaltura library but I’m hitting a wall. I’ve been looking at the php files that are provided by Kaltura using the Kaltura Developer tool but I can’t get it to actually upload. I’m able to choose a file to upload but when I click the “Upload” button it does nothing. I have everything going through my www folder using WAMP.
I’m pretty green when it comes to PHP and using WAMP so I thought I’d see if I could get some pointers through this forum.
Not sure I understand. You mentioned https://developer.kaltura.org/recipes/upload, does the upload work for you when trying it from this I/F and doesn’t when running the sample code locally from your own Windows machine?
If that is the case, start by looking at the Apache error logs and paste the errors you are seeing, if it does not work directly from https://developer.kaltura.org/recipes/upload either, please open the browser’s dev tools and look at the “console” tab for errors.
Also, try using this CLI script from your Windows machine and see if that works well:
Also, I’m getting an undefined function error with generate_ks() on line: $client=generate_ks($service_url,$partnerId,$secret,$type=KalturaSessionType::USER,$userId=null);
Is generate_ks() a place holder for something or should it work?
I’ve made the changes that you suggested and now I’m getting the following error:
Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘Uploading files is not supported with stream context http request, please use curl.’ in c:\wamp\www\Kaltura\lib\KalturaClientBase.php:570
I did some searching through Google and found where to enable the php_curl extention through WAMP and it is currently turned on.
Once again I REALLY appreciate the help. I feel I’m in over my head with this project.
I have a feeling you are using an older version. Please update to this one and reshare the output you are getting.
Also, IMHO, it will be easier for you to develop from Linux, and it will certainly be easier for me to instruct you if you do:)
You can install a VM on your machine, using any common virtualization solution you’d like, instructions on how to use Vagrant are here:
Are you working against SaaS or your own instance of Kaltura CE? If the later, you need to look at the logs under /opt/kaltura/log/kaltura_api_v3.log and find the actual error. If against SaaS, what PHP version are you using? Are you sure your account is in working order? are you able to upload to it using developer.kaltura.org/upload?
Good news, I believe I got it! It turns out the information I was passing through was ADMIN information and since the KalturaSessionType was set for USER credentials it was causing problems. Once I change the KalturaSessionType to be ADMIN it went right through.