note 112022 added to mongo.installation
| From: | bradley dot henke at colorado dot edu | Date: | Tue, 23 Apr 2013 06:36:54 +0000 |
| Subject: | note 112022 added to mongo.installation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194603@lists.php.net to get a copy of this message | ||
Instructions for Manually Installing MongoDB for PHP for use with "XAMPP for Linux":
There were two gotchas that I ran into. "XAMPP for Linux" needs 32 bit libraries, and the
php API version must match the php API version of "XAMPP for Linux".
Hopefully this will save someone else time figuring this all out!
1) Install "XAMPP for Linux" AND the "XAMPP for Linux Development Files".
2) Grab the source code from github (in the manual instructions above)
$ tar zxvf mongodb-mongodb-php-driver-<commit_id>.tar.gz
$ cd mongodb-mongodb-php-driver-<commit_id>
There are now some smalls deviation from the manual instructions...
3) PHPize
$ sudo /opt/lampp/bin/phpize
4) Configure
$ ./configure
5) Make changes to the Makefile (XAMPP requires a 32-bit compilation)
- Choose your favorite text editor and open "Makefile"
- Make the following changes:
Line 20: prefix = /opt/lampp
Line 23: prefix = /opt/lampp
Line 25: phpincludedir = /opt/lampp/include/php
Line 27: CFLAGS = -g -O2 -m32
Line 34: EXTENSION_DIR = /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/
Line 35: PHP_EXECUTABLE = /opt/lampp/bin/php
Make sure you replace </path/to/mongo-php-driver-master>
Line 38: INCLUDES = -I/opt/lampp/include/php -I/opt/lampp/include/php/main
-I/opt/lampp/include/php/TSRM -I/opt/lampp/include/php/Zend -I/opt/lampp/include/php/ext
-I/opt/lampp/include/php/ext/date/lib -I</path/to/mongo-php-driver-master>/util
-I</path/to/mongo-php-driver-master>/exceptions
-I</path/to/mongo-php-driver-master>/gridfs -I</path/to/mongo-php-driver-master>/types
-I</path/to/mongo-php-driver-master>/mcon
6) Compile
$ sudo make all
7) Copy the static object into the extension directory
$ sudo cp modules/mongo.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/
9) Update your php.ini file
- Grab you favorite text editor and open /opt/lampp/etc/php.ini (you'll probably need to use
sudo).
- Add the line: extension=mongo.so
10) Restart "XAMPP for Linux". You should now be able to see Mongo listed in your
phpinfo() page! Installation Complete!!!
Good Luck!
----
Server IP: 69.147.83.199
Probable Submitter: 98.245.89.209
----
Manual Page -- http://php.net/manual/en/mongo.installation.php
Edit -- https://master.php.net/note/edit/112022
Del: integrated -- https://master.php.net/note/delete/112022/integrated
Del: useless -- https://master.php.net/note/delete/112022/useless
Del: bad code -- https://master.php.net/note/delete/112022/bad+code
Del: spam -- https://master.php.net/note/delete/112022/spam
Del: non-english -- https://master.php.net/note/delete/112022/non-english
Del: in docs -- https://master.php.net/note/delete/112022/in+docs
Del: other reasons-- https://master.php.net/note/delete/112022
Reject -- https://master.php.net/note/reject/112022
Search -- https://master.php.net/manage/user-notes.php