The error message:
PHP Notice: Undefined variable: newEntry in /path to/youtube-upload.php on line 82
PHP Fatal error: Call to a member function getVideoId() on a non-object in /path to/youtube-upload.php on line 82
shows you the problem.
Variable $newEntry isn't existing (PHP Notice) and the call to a non existing function - because $newEntry is not existing - fails with PHP Fatal error!
Check your script and try to find the missing $newEntry!!!
Regards,
Dennis Fischer
Am Dienstag, 28. Februar 2012 07:26:51 UTC+1 schrieb Dingo001:
Maybe there is some other cod that can be suggested that will get the embedded object ??--
On Sunday, February 26, 2012 12:27:46 AM UTC+11, Dingo001 wrote:Need help with youtube-upload.php
I have had this script running for months but three night ago it started giving the following error for some reason.
PHP Notice: Undefined variable: newEntry in /path to/youtube-upload.php on line 82
PHP Fatal error: Call to a member function getVideoId() on a non-object in /path to/youtube-upload.php on line 82
The part of the script that errors is after the video has uploaded to youtube which still works fine. It is when the script tries to get the video ID for the Embedded code.
echo "Create embedded object script for video...\n";
$filename="/var/www/localhost/htdocs/scripts/youtube-object. php";
if (!$handle = fopen($filename, 'w')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
$somecontent='<center><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/ ' . $newEntry->getVideoId() . '&hl=en_GB&fs=1&color1=0x2b405b&color2=0x6b8ab6"></ param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ ' . $newEntry->getVideoId() . '&hl=en_GB&fs=1&color1= 0x2b405b&color2=0x6b8ab6" type="application/x-shockwave- flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object> </center>';
Live 82 of the script is the one that starts with "$somecontent='<center><"
Why it stopped working when it has been running for months is beyond me ?? I did buy and install a new router that day but the upload works fine so I can not see that being the fault.
Any help would be greatly appreciated.
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/K0PacqAknE0J.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment