php how to install PECL id3 extension on Ubuntu

i want to know how can i install PECL id3 extension on ubuntu so that my php script can read write mp3 tags.

Supporter Asked on December 28, 2016 in Software.
Add Comment
1 Answer(s)

PECL id3 extension is simple just need little changes in code to make it compatible with recent php versions .

  • download and extract id3 extension using


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

  • next switch to extracted dir and edit id3.c


cd id3-alpha
vim id3.c

change line #196 from

function_entry id3_functions[ ] = {


zend_function_entry id3_functions[ ] = {

  • next configure it for installation with


if phpize command give you error then run below command to install few utilities then try again running phpsize  otherwise skip this step


yum install php-devel
yum install php-pear
yum install gcc gcc-c++ autoconf automake

if phpsize is ok then configure and make it with




make test

make install

and finally edit php.ini to add the extension


vim /etc/php5/apache2/php.ini
nano /etc/php5/apache2/php.ini

add the below line to Dynamic Extensions section in php.ini

and now restart apache like

service apache2 restart

service mysql restart


/etc/init.d/apache2 restart

/etc/init.d/mysql restart





Supporter Answered on December 28, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.