How to install Memcache under Windows_PHP tutorial
How to install Memcache under Windows
Memcache installation under Windows:
1. Download the Windows stable version of memcache, unzip it and put it in a certain disk, such as c: memcached
2. Enter ‘c:memcachedmemcached.exe -d install’ in the terminal (i.e. cmd command interface) to install
3. Then enter: ‘c:memcachedmemcached.exe -d start’ to start. NOTE: In the future, memcached will be automatically started as a service of Windows every time you boot up. The server side has now been installed.
4. Download php tutorial_memcache.dll, please find the corresponding php version file yourself
5. Add a line ‘extension=php_memcache.dll’
to C:winntphp.ini
6. Restart Apache, and then check phpinfo. If there is memcache, it means the installation is successful!
Basic settings of memcached:
-p listening port
-l The IP address of the connection, the default is the local computer
-d start starts memcached service
-d restart restart memcached service
-d stop|shutdown shut down the running memcached service
-d install install memcached service
-d uninstall uninstall memcached service
-u Run as (only valid when running as root)
-m Maximum memory usage, in MB. Default 64MB
-M Return an error when memory is exhausted instead of deleting items
-c Maximum number of simultaneous connections, default is 1024
-f block size growth factor, default is 1.25
-n minimum allocated space, key+value+flags default is 48
-h show help
Memcache environment test:
Run the following php file. If This is a test! is output, it means the environment is set up successfully. Start to appreciate the charm of Memcache!
< ?php
$mem = new Memcache;
$mem->connect(”127.0.0.1″, 11211);
$mem->set('key', 'This is a test!', 0, 60);
$val = $mem->get('key');
echo $val;
?>

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



Multithreading in the language can greatly improve program efficiency. There are four main ways to implement multithreading in C language: Create independent processes: Create multiple independently running processes, each process has its own memory space. Pseudo-multithreading: Create multiple execution streams in a process that share the same memory space and execute alternately. Multi-threaded library: Use multi-threaded libraries such as pthreads to create and manage threads, providing rich thread operation functions. Coroutine: A lightweight multi-threaded implementation that divides tasks into small subtasks and executes them in turn.

Python binary library (.whl) download method explores the difficulties many Python developers encounter when installing certain libraries on Windows systems. A common solution...

Efficient reading of Windows system logs: Reversely traverse Evtx files When using Python to process Windows system log files (.evtx), direct reading will be from the earliest...

Solving the problem of slow Photoshop startup requires a multi-pronged approach, including: upgrading hardware (memory, solid-state drive, CPU); uninstalling outdated or incompatible plug-ins; cleaning up system garbage and excessive background programs regularly; closing irrelevant programs with caution; avoiding opening a large number of files during startup.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

How to implement Windows-like in front-end development...

Why can't my code get the data returned by the API? In programming, we often encounter the problem of returning null values when API calls, which is not only confusing...

Multithreading is an important technology in computer programming and is used to improve program execution efficiency. In the C language, there are many ways to implement multithreading, including thread libraries, POSIX threads, and Windows API.
