Search code examples
phpubuntupeclid3id3v2

installing PECL id3 extension on Ubuntu


I have been trying this from a week now still couldnt find an answer for this when i try this sudo pecl install id3 this error happens

downloading id3-0.2.tgz ...
Starting to download id3-0.2.tgz (20,693 bytes)
.....done: 20,693 bytes
4 source files, building
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

If the command failed with 'phpize: not found' then you need to install php5-dev     packageYou can do it by running 'apt-get install php5-dev' as a root userERROR: `phpize' failed

please help !!! I have already installed php5-dev.


Solution

  • http://php.net/manual/en/id3.installation.php

    You will need to download id3 first using:

    pecl download id3-alpha
    tar -zxvf id3*.tgz
    vim id3.c 
    

    Have to change in line 196: function_entry id3_functions[ ] = {

    into

    zend_function_entry id3_functions[ ] = {

    phpize
    ./configure
    make
    make test
    make install
    

    Then add the id3.so into your php.ini file and restart apache