I have a 64bit linux EC2 instance which comes with pre installed php.
However I needed xammp so I installed a 32 bit XAMPP. Everything works fine.
I installed mongodb which also works fine.
Now I needed to install a pecl php extention of mongo so that my webapp can run properly.
For this I figured out that a 32bit mongo.sa is required since my php in XAMPP is 32 bit therefore I followed this post : Installing Mongodb with Lamp On Ubuntu ( Linux )
The problem is, the mongo.so being generated even after setting CFALGS="-m32" is still 64 bit :(.
Where am I going wrong?
This is what I did to install the mongo extension
/opt/lampp/bin/pecl download mongo
tar xvzf mongo-1.2.12.tgz
cd mongodb-1.2.12
CFLAGS="-m32"
sudo /opt/lampp/bin/phpize
./configure
make
cd modules
ls ( gives mongo.so)
file mongo.so ( still shows its ELF64 bit extension)
mongo.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
:(. Please help!