Page 1 of 1

Basic Example not working: Fatal error

Posted: Fri Dec 19, 2008 5:22 am
by nnhubbard
I am getting a Fatal error when trying the Basic Example:

Code: Select all

Fatal error: Call to undefined method stdClass::Analyze() in /home/websites/client-includes/Copy of contact.php on line 21
Any reason why this would be happening? Line 21 is:

Code: Select all

$getid3->Analyze($file);
Thanks.

Re: Basic Example not working: Fatal error

Posted: Sat Dec 20, 2008 12:35 am
by James Heinrich
Either you're missing the two previous lines:

Code: Select all

// include getID3() library (can be in a different directory if full path is specified)
require_once('../getid3/getid3.php');

// Initialize getID3 engine
$getID3 = new getID3;
Or perhaps your variable names are incorrect (the original demo.basic.php is "$getID3->analyze($filename);" -- remember PHP is case-sensitive for variable names).

Re: Basic Example not working: Fatal error

Posted: Sat Dec 20, 2008 12:41 am
by nnhubbard
Thanks, I got it working. I have mismatched the variable name. :)