filmov
tv
Install and Configure MongoDB with PHP on Windows
Показать описание
#MongoDB #PHP #Windows
--------------------------------------------------------------------
Adding PHP Support for MongoDB
--------------------------------------------------------------------
01. Open Windows Explorer and navigate to the PHP installation directory
02. Hold the SHIFT key and right click in the white space ≫ Open PowerShell window here...
03. Run the following command to output the PHP version information
04. Note the architecture (x86 or x64) and the PHP version
06. Click the Windows DLL link
07. Select either the x86 or x64 to match the PHP installation. If using PHP with Apache or nginx download the Thread Safe version. If using PHP for IIS, download the Non-Thread Safe version
08. Extract the downloaded .zip file
09. Copy the .dll file from the extracted folder to the PHP installation /ext directory
11. Search for ;extension=
12. At the bottom of the list of extensions, add the following line
extension=mongodb
13. Restart the web server to apply the change
--------------------------------------------------------------------
Installing MongoDB on Windows
--------------------------------------------------------------------
02. Navigate to the Downloads directory ≫ Launch the MongoDB .msi installer
03. Step through the installer accepting all the defaults
--------------------------------------------------------------------
Testing PHP and MongoDB
--------------------------------------------------------------------
04. The page will create a new database called phpDemo, a collection named states, write some rows and then read them back and display them in a table
--------------------------------------------------------------------
Install MongoDB Compass (Optional)
--------------------------------------------------------------------
03. Extract the downloaded .zip file
04. Move the extracted files to a folder where it will run from permanently (ie C:\Program Files\MongoDBCompass\)
06. Once the application loads, click the green Connect button to connect to the locally running MongoDB instance
### Connect with me and others ###
--------------------------------------------------------------------
Adding PHP Support for MongoDB
--------------------------------------------------------------------
01. Open Windows Explorer and navigate to the PHP installation directory
02. Hold the SHIFT key and right click in the white space ≫ Open PowerShell window here...
03. Run the following command to output the PHP version information
04. Note the architecture (x86 or x64) and the PHP version
06. Click the Windows DLL link
07. Select either the x86 or x64 to match the PHP installation. If using PHP with Apache or nginx download the Thread Safe version. If using PHP for IIS, download the Non-Thread Safe version
08. Extract the downloaded .zip file
09. Copy the .dll file from the extracted folder to the PHP installation /ext directory
11. Search for ;extension=
12. At the bottom of the list of extensions, add the following line
extension=mongodb
13. Restart the web server to apply the change
--------------------------------------------------------------------
Installing MongoDB on Windows
--------------------------------------------------------------------
02. Navigate to the Downloads directory ≫ Launch the MongoDB .msi installer
03. Step through the installer accepting all the defaults
--------------------------------------------------------------------
Testing PHP and MongoDB
--------------------------------------------------------------------
04. The page will create a new database called phpDemo, a collection named states, write some rows and then read them back and display them in a table
--------------------------------------------------------------------
Install MongoDB Compass (Optional)
--------------------------------------------------------------------
03. Extract the downloaded .zip file
04. Move the extracted files to a folder where it will run from permanently (ie C:\Program Files\MongoDBCompass\)
06. Once the application loads, click the green Connect button to connect to the locally running MongoDB instance
### Connect with me and others ###
Комментарии