Home > Backend Development > PHP Tutorial > Windows php54 configures mongodb extension (with download addresses for various other versions)

Windows php54 configures mongodb extension (with download addresses for various other versions)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:03:35
Original
974 people have browsed it

Reference:

http://jingyan.baidu.com/article/d5c4b52bef7268da560dc5f8.html

http://www.jb51.net/article/51601.htm

1 Install mongodb server

(1) Go to download Page to download the package under windows

https://www.mongodb.org/downloads#production

windows php54 配置 mongodb 扩展(附各种其它版本下载地址)

(2) Double-click the downloaded msi file and select the installation location. It is recommended to place it in the folder in the root directory of the disk , to facilitate subsequent operations. After installation, you should see the structure as shown below (the files and folders crossed out with red lines are not included)

windows php54 配置 mongodb 扩展(附各种其它版本下载地址)

(3) Create a storage location for the database file, such as d:/mongodb/ data/db. Before starting the mongodb service, you need to create the storage folder for the database file, otherwise the command will not be automatically created and the startup will not be successful.

windows php54 配置 mongodb 扩展(附各种其它版本下载地址)

(4) Open the cmd command line (windows key + r, enter cmd and run)

Enter the installation location of mongodb. The installation location here is d:mongodbbin

Execute

mongod.exe -- dbpath d:mongodbdatadb

This command

windows php54 配置 mongodb 扩展(附各种其它版本下载地址)

(5) mongodb connects to port 27017 by default. Open http://localhost:27017 to check. If you find the picture below, it means the connection is successful. If it is unsuccessful, you can check whether the port is blocked. occupied.

windows php54 配置 mongodb 扩展(附各种其它版本下载地址)

2 Configure php's mongodb extension

(1) Download php_mongo.dll

First you need to check the current php version and supported extension version (note the content in the red box)

windows php54 配置 mongodb 扩展(附各种其它版本下载地址)

You can see The author is using php5.4.16 version, x86 (32-bit), which supports TS (Thread Safe) php extension

At this time, go to the place where you downloaded the dll and find the corresponding version

http://pecl.php. net/package/mongo/1.6.12/windows

In view of the previous version of the poster, I chose the red version in the picture below

windows php54 配置 mongodb 扩展(附各种其它版本下载地址)

(2) Place the downloaded dll file in the corresponding location

The location is {path}/php/ext folder

Since the poster uses the xampp integrated environment, the location is at

D:xamppphpext

(3) Open php.ini

The location of this file is at {path }/php/

The poster added the following line in D:

3

The above introduces the Windows php54 configuration mongodb extension (with download addresses for various other versions), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
mongodb start
From 1970-01-01 08:00:00
0
0
0
linux - ubuntu14 error installing mongodb
From 1970-01-01 08:00:00
0
0
0
Use of symfony2 mongodb
From 1970-01-01 08:00:00
0
0
0
mongodb _id rename
From 1970-01-01 08:00:00
0
0
0
Parameter understanding of mongodb
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template