02-03-2011 05:36 PM
I've tried implementing the video upload using the media API and PHP (as directed here: http://support.brightcove.com/en/docs/media-write-
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /htdocs/www/temp/uploadVideo.php on line 32
The only modification to the files was adding my read/write media API tokens as indicated here:
The following PHP script handles the upload form and uploads the video. You will need to provide valid tokens for your account on lines 12 and 13, replacing [[READ_TOKEN]] and [[WRITE_TOKEN]] with your own tokens.
Solved! Go to Solution.
02-05-2011 06:40 PM
I am having the same issue myself:
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/html/ ....
I also tried changing the "$bc =new Brightcove(" to: "$bc = new Echove(" since that's what I've used in other Echove uses, but I still got the same error.
02-07-2011 10:17 AM
I'm not familiar PHP whatsoever, but my friend says that this chunk of code should be changed from:
class Brightcove {
$this->token_read = '';
$this->token_write = '';
$this->read_url = 'http://api.brightcove.com/services/library?';
$this->write_url = 'http://api.brightcove.com/services/post';
to:
class Brightcove
{
public $token_read = '';
public $token_write = '';
public $read_url = 'http://api.brightcove.com/services/library?';
public $write_url = 'http://api.brightcove.com/services/post';
Somehow, he was able to upload a video, but the return page was not very convincing that this is a valid solution.
02-07-2011 11:41 PM
$this->token_read = ''; $this->token_write = ''; $this->read_url = 'http://api.brightcove.com/services/library?'; $this->write_url = 'http://api.brightcove.com/services/post';
public $token_read = ''; public $token_write = ''; public $read_url = 'http://api.brightcove.com/services/library?'; public $write_url = 'http://api.brightcove.com/services/post';
02-08-2011 10:20 AM
Thanks Michael. I'll give the Echove code a try. It might be worthwhile to update the code in the example if you think it's a little wrong to help others.
Best.
02-08-2011 10:30 AM
I'll notify the documentation manager sometime today :)
