Basic Example not working: Fatal error

Locked
nnhubbard
User
Posts: 22
Joined: Fri Dec 19, 2008 5:20 am

Basic Example not working: Fatal error

Post by nnhubbard » Fri Dec 19, 2008 5:22 am

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.

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Basic Example not working: Fatal error

Post by James Heinrich » Sat Dec 20, 2008 12:35 am

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).

nnhubbard
User
Posts: 22
Joined: Fri Dec 19, 2008 5:20 am

Re: Basic Example not working: Fatal error

Post by nnhubbard » Sat Dec 20, 2008 12:41 am

Thanks, I got it working. I have mismatched the variable name. :)

Locked