Installing APC

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Installing APC

Postby romansky » 20. February 2010 13:00

Hi,

I am trying to install APC, I have the following specs:
Code: Select all
phpinfo()
PHP Version => 5.3.1
System => Linux void64-laptop 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64


on XAMPP for Linux 1.7.3a


I am trying to install APC, when starting XAMPP or running "make test" from the directory I downloaded APC to I get:
PHP Warning: PHP Startup: Unable to load dynamic library 'modules/apc.so' - modules/apc.so: wrong ELF class: ELFCLASS64 in Unknown on line 0

I followed all the steps including
Code: Select all
phpize
./configure --enable-apc --with-apxs --with-php-config=/opt/lampp/bin/php-config-5.3.1 --with-libdir=/lib64
(also tried without the libdir and other libdirs..)
make
sudo make install


I also tried using pecl install apc-beta
It installed fine but upon starting Lamp same error:
Code: Select all
Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/apc.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/apc.so: wrong ELF class: ELFCLASS64 in Unknown on line 0


Please assist!!
Thanks!!
romansky
 
Posts: 1
Joined: 20. February 2010 12:24

Re: Installing APC

Postby Nobbie » 20. February 2010 13:25

You are running a 64bit Linux, but Xampp comes precompiled with 32bit support only. Your compiled module results in a 64bit version, which is not compatible to the installed Xampp 32bit version.

As there is no Xampp 64bit Version, you must compile the desired module(s) in a 32bit environment instead of 64bit.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Installing APC

Postby jamie0725 » 25. September 2011 08:57

This is an old thread but it is high ranked when you google for "apc ELFCLASS64 xampp", so I am adding a reply to it.

I'm a Linux n00b, so I spent hours on finding out how to get a 32bit version of APC with a 64bit Linux, here's my solution for others:

I am on Ubuntu and had to install a missing lib first:
apt-get install libc6-dev-i386

After that:
wget http://pecl.php.net/get/APC
tar xzvf <name-of-apc-tar-file>
cd directory-name
./configure CC='cc -m32' CXX='g++ -m32' --x-libraries=/usr/lib --target=i686-pc-linux
make && make install

Don't forget to add the apc.so with the correct path to your php.ini and restart lampp/the apache.
jamie0725
 
Posts: 1
Joined: 25. September 2011 08:49


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 67 guests