PHP mongodb安装问题

I have issues in PHP-Mongodb Linux installation. After following the below steps, I am not able to access webpages instead it's getting downloaded.

1) Installed MongoDB PHP driver sudo pecl install mongo

2) Added mongo.so to /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525 directory

3) Added "extension=mongo.so" to php.ini file

4) restarted XAMPP sudo /opt/lampp/lampp restart

Environment: Linux Mint 14 - 64 bit

If I try commenting step 3, I can access it but getting mongo class not found exception. Any help in resolving this issue would be appreciated. Thanks.

I too had this same issue

Download and install XAMPP devel package first. If you installed XAMPP in /opt folder then use the below command or You can replace /opt/ to the path where you installed XAMPP.

tar xvfz xampp-linux-devel-1.x.x.tar.gz -C /opt/

Note: Download and install the appropriate version then only it works.