3

I have a server with CentOs and PHP 5.3.16 and I want to enable bzip2 to use with php.. I downloaded and installed bzip2 from its original site in /usr/local/bin and edited the configuration.php5 file and inclueded --with-bz2=/usr/local/bin in it. but after I make install it says that :

unable to load dynamic library /usr/local/bin/php/extensions/no-debug-non-zts-20090626/bz2.so

what I am doing wrong?

Exlord
  • 5,009
  • 4
  • 31
  • 51
  • I don't understand where that shared files is supposed to come from. You wrote that you installed bzip2 into /usr/local/bin. This does not magically give you the shared filed you mention further down. So: give all the information, otherwise there is no way for anyone to help. – arkascha Sep 11 '12 at 07:23
  • thats the problem .i dont know where bz2.so is. i am not even sure that i am doing it right ... so if u have installed bzip2 on centos+diectadmin+php5.3.16 then tell me how u did it ? – Exlord Sep 11 '12 at 10:15
  • I have no idea about CentOS, sorry. On my openSUSE the package php5-bz2 requires libbz2.so which is provided by the package libbz2. If the bz2 extension really is not enabled in standard packages for CentOS (why?) then you probably need some package providing libbz2. The bz2 executable you mention and which is probably provided by a bz2 package is not used by php. If you really have to compile all by yourself you might have to enable building the shared library when configuring the bz2 sources and you have to record where the shared library is installed. – arkascha Sep 11 '12 at 12:51
  • Also, have you looked for the shared library on your system? Maybe it is installed and you just have configured the wrong path? 'locate' is your friend for this :-) – arkascha Sep 11 '12 at 12:54

1 Answers1

3

Oops it seems that I shouldn't have set extensions=bz2.so in php.ini file.

Removing it solved the problem.

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
Exlord
  • 5,009
  • 4
  • 31
  • 51