


Installation of memcache and mongodb in php environment on windows
mangodb installation
1. Download the installation file of mongodb. I installed windows 64-bit. The download address is as follows:
https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.6.6-signed.msi
2. Create a new mongodb folder in drive E (put it anywhere, such as E:mongodb)
3. Unzip the downloaded installation file and move the unzipped file to mongodb on drive E
4. Create the mongodb data storage directory E:mongodbdata
5. Start mongodb (simple startup without configuring the service)
E:\mongodb\bin\mongod.exe --dbpath E:\mongodb\data
You can see the following information:
Indicates that the installation started successfully.
6. Enter http://localhost:27017/ in the browser, the following message will appear, indicating that mongdb has been started
It looks like you are trying to access MongoDB over HTTP on the native driver port.
7. Download the corresponding mongodb php plug-in (it’s not easy to find, if php is version 5.4-5.5, you can use this address: http://pan.baidu.com/s/1sjJjsYh) and configure it.
8. Use in php:
<span>try</span><span> { </span><span>$mongo</span> = <span>new</span> Mongo('localhost'<span>); } </span><span>catch</span>(MongoConnectionException <span>$e</span><span>) { </span><span>var_dump</span>(<span>$e</span><span>); } </span><span>$mongo_db</span> = <span>$mongo</span>->selectDB('logdatastorage');
Note: The above code is a demo and cannot be used in a production environment.
memcache installation
1, 64-bit download
From: http://www.urielkatz.com/archive/detail/memcached-64-bit-windows/
Download: http://www.urielkatz.com/projects/memcached-win64/memcached-win64.zip
Source code: http://www.urielkatz.com/projects/memcached-win64/memcached-src.rar
2. Unzip the compressed package you just downloaded and get two files: memcached.exe (server main program), pthreadGC2.dll
3. Run the command prompt with administrator rights, locate the decompression path, and install the Memcached service. Command:
memcached.exe -d install
4. Execute Start→Management Tools→Services, open the Windows service viewing tool, and find the memcached service (not found indicates that the installation was not successful)
5. Start Memcached:
memcached.exe -m <span>1024</span> -d start
-d starts the daemon process, and the port cannot be specified. The default port is 11211.
-m specifies the memory size
6. Configure Windows Firewall and add inbound rules for Memcached default port 11211 (if the server and client are both on this machine, this step is not required)
7. Test whether normal communication is possible. Use Telnet here:
telnet <span>127.0</span>.<span>0.1</span> <span>11211</span>
If you enter a blank doc screen, it is probably OK. The first line of command input is invisible, so I usually hit Enter first and an Error will be returned. It doesn’t matter. This means that the command you entered is an unrecognizable command;
Then check the status, type stats and press Enter:
8. Download the corresponding memcache php plug-in (if php is version 5.5, you can use this address: http://pan.baidu.com/s/1mgspf9e) and configure it.
9. Connect and use in php:
<span>$memcache</span> = <span>new</span><span> Memcache; </span><span>$memcache</span>->connect('127.0.0.1', 11211);
Reference documentation
1. Mongodb installation configuration, startup and shutdown
2. Memcached installation and configuration example under Windows
The above introduces the installation of memcache and mongodb in the PHP environment on Windows, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The way to update ByBit exchanges varies by platform and device: Mobile: Check for updates and install in the app store. Desktop Client: Check for updates in the Help menu and install automatically. Web page: You need to manually access the official website for updates. Failure to update the exchange can lead to security vulnerabilities, functional limitations, compatibility issues and reduced transaction execution efficiency.

Detailed explanation and installation guide for PiNetwork nodes This article will introduce the PiNetwork ecosystem in detail - Pi nodes, a key role in the PiNetwork ecosystem, and provide complete steps for installation and configuration. After the launch of the PiNetwork blockchain test network, Pi nodes have become an important part of many pioneers actively participating in the testing, preparing for the upcoming main network release. If you don’t know PiNetwork yet, please refer to what is Picoin? What is the price for listing? Pi usage, mining and security analysis. What is PiNetwork? The PiNetwork project started in 2019 and owns its exclusive cryptocurrency Pi Coin. The project aims to create a one that everyone can participate

The official website entrance of the Coinsuper Exchange: https://www.coinsuper.com. The client download channels are: Windows client, macOS client, and mobile (iOS/Android). Registration requires an email, mobile phone number and password, and you need to complete real-name authentication before you can trade. The platform provides a variety of digital asset transactions, including Bitcoin, Ethereum, etc., with the transaction fee rate of 0.1% for both orders and acceptors. Security safeguards include cold wallet storage, dual-factor verification, anti-money laundering and anti-terrorism financing measures, and with security public

Need to download the Gate.io app to start your cryptocurrency journey? This guide details the latest version download steps for iOS, Android, and Windows devices. Simply visit the official website, find the download link and select the appropriate option based on your device. For iOS, it will go directly to the App Store, while Android and Windows users will download the APK or installer for manual installation. Once installed, you can launch the app and set up your account to step into the world of cryptocurrency.

Solve the problem of third-party interface returning 403 in Node.js environment. When we use Node.js to call third-party interfaces, we sometimes encounter an error of 403 from the interface returning 403...

The OKX trading platform can be downloaded through mobile devices (Android and iOS) and computers (Windows and macOS). 1. Android users can download it from the official website or Google Play, and they need to pay attention to security settings. 2. iOS users can download it through the App Store or follow the official announcement to obtain other methods. 3. Computer users can download the client of the corresponding system from the official website. Always make sure to use official channels when downloading, and register, log in and security settings after installation.

Choosing the right Bitcoin market viewing software is crucial, it can help investors grasp market conditions in real time and make smarter investment decisions. This article will guide you how to make a choice, covering personal needs assessment (trading frequency, analysis depth, information needs and budget), software type selection (exchange interface, professional software, market website/APP), core functional considerations (data reliability, chart tools, custom settings, community communication and platform compatibility), and direction recommendations (maturity financial platform, cryptocurrency aggregation platform, community recommendation software). Finally, it is recommended that you try a few more software and compare it to choose the tool that best suits your needs. Please remember that software is only an auxiliary tool, and you must be cautious when investing at your own risk.

This article describes how to build a highly available MongoDB database on a Debian system. We will explore multiple ways to ensure data security and services continue to operate. Key strategy: ReplicaSet: ReplicaSet: Use replicasets to achieve data redundancy and automatic failover. When a master node fails, the replica set will automatically elect a new master node to ensure the continuous availability of the service. Data backup and recovery: Regularly use the mongodump command to backup the database and formulate effective recovery strategies to deal with the risk of data loss. Monitoring and Alarms: Deploy monitoring tools (such as Prometheus, Grafana) to monitor the running status of MongoDB in real time, and
