id3 function in php

i was looking at the id3 function for php at but dont fully understand and cant get it to work when i use the following examble

$tag = id3_get_tag( "path/to/example.mp3" );

when it runs it returns the following error
"Fatal error: Call to undefined function id3_get_tag() in DocumentRoot/page.php on line 2"

i am unsure if an extension needs to be enabled on php or something but i have had a downloaded id3 script running

if anyone know what the problems may be please inform me of any solutions



  • [b][red]This message was edited by ITA at 2005-8-25 1:41:10[/red][/b][hr]
    I've just had a look over at and it says this

    'id3 is part of PECL and can be installed using the PEAR installer. To compile PHP with id3 support, download the sourcecode, put it in php-src/ext/id3 and compile PHP using --enable-id3. '

    So basically you need to install PEAR (which should have it combined with it) or build php with --enable-id3 in the ./configure line.

    If you make a page which displays the output of phpinfo() [eg look at this page], on a *nix system you should be able to see what configure command was used (and more importantly which options were enabled) - check this, if --enable-id3 isn't in the ./configure line, then it means that PHP does not have the functionality built in.

    Are you the admin? (ie do you have sufficient user access to install and modify things?) If you don't, then you'll just have to speak to the sysadmin about it.

    Hope this helped,

    "Let us smite the evil slime eating hordes who may befall us on our quest to be the ultimate programmers of the known universe!"

  • i am currently running the php modual on a windows system so cant recompile a version with the options needed. i will be building a nix server once i get enough parts but till then thanks for your help

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!