How to install IIS, MySQ, nginx, php7.1.7 under Win10? This article mainly shares a detailed tutorial on installing and configuring IIS + MySQL5.7.19 + nginx1.12.1 + php7.1.7 in WIN10 system. It is very practical. Friends in need can refer to it. I hope it can help everyone.
Environment:
VMWare Workstation Player12
Windows10 Pro x64
1. Install the system
vmware will be installed quickly using the fast install method, and there is no need to configure anything.
2. Configure IIS
Under "Programs and Features", turn on "Turn Windows features on or off". Add the Internet Infomation Services function. It should be noted that CGI in the "Application Development Function" is not checked by default and needs to be manually selected.
Note: In actual practice During installation, I added IIS last, but it was written at the front, which has no special meaning. But this will change the binding port of IIS.
About port: After installation, since 80 is occupied, click "Bind" on the right side of "Default Web Site" and change the port number to "any", such as 8800. When accessing in the future, use "localhost:8800" ” method to access.
About virtual directories: If you need a virtual directory, you can add it. After adding, you need to access "localhost:8800/virtual directory name/page" like this, such as localhost:8800/myweb/phpinfo.php.
About FastCGI: Select Default Web Site, click Handler Mapping in the ribbon, and add module mapping.
In the default/specified path of the website, place a file with the content , which can be named phpinfo.php. Start or restart the IIS service. Enter localhost:8800/phpinfo.php for the default path. Enter localhost:8800/virtual directory alias/phpinfo.php for the specified path (if placed in a virtual directory). The following picture is displayed, which is the IIS + PHP combination. Success
Download the mysql server in zip form and unzip it to the full English path (I haven’t tried Chinese to avoid trouble). Add environment variables and the path to MySQL in the system variable Path
[client] port=3306 default-character-set=utf8 [mysqld] port=3306 character_set_server=utf8 #mysql的安装/解压目录 basedir=C:\Dev\mysql57 #mysql的数据目录 datadir=C:\Dev\mysql57\data sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLESSince it is a configuration, basedir and datadir can be specified according to your own requirements, as long as they are written correctly in the configuration file. I specified datadir as the basedir path, but the data folder did not exist when decompressing, so I created one manually. After completion, the directory structure is as shown below
mysqld --initialize --user=mysql --console
mysqld --install MySQL
net start mysql Start Service
net stop mysql Stop service
sc delete MySQL Delete service (use on demand)
4. Install php
php download Non Thread Safe or Thread Safe Both are fine, I don’t know what the specific runtime difference is at the moment. Unzip it to the specified folder, follow the numerous "tutorials" on the Internet to copy php.ini-development or php.ini-production to php.ini, and modify the extension_dir inside to the ext folder in the PHP installation directory, as shown below5. Install nginx
Download nginx and extract it to the full English directory. Enter the conf folder and modify the nginx.conf file. Compared with php, the configuration file of nginx is much shorter. Modify the location {} and #pass the php scripts to FastCGI...the two parts below are location{}.Modify the root element: change it to the web path. For example, the default path of the web page is C:\www, change it to this.
Modify fastcgi_pass: I have not changed it by default, but the port number can definitely be modified
In cmd command line administrator running mode, cd to switch to the nginx directory, run start nginx to start the service. Since I installed nginx first during the actual installation, occupying port 80, running localhost directly through the browser should display the welcome screen of nginx.
At this point, the configuration in the windows environment is completed.
Note: As of the time of writing, the combination of nginx + php and phpinfo have not been displayed correctly. We will fix this tomorrow. And study the issue of who runs first and who occupies port 80 first.
Related recommendations:
Detailed introduction to the Win10 system
The download and installation steps of Mysql5.7 green version under win10 report an error Solution
Detailed tutorial on configuration of mysql 5.6.35 winx64 installation-free version under win10
The above is the detailed content of How to install IIS, MySQ, nginx, php7.1.7 under Win10?. For more information, please follow other related articles on the PHP Chinese website!

Thedifferencebetweenunset()andsession_destroy()isthatunset()clearsspecificsessionvariableswhilekeepingthesessionactive,whereassession_destroy()terminatestheentiresession.1)Useunset()toremovespecificsessionvariableswithoutaffectingthesession'soveralls

Stickysessionsensureuserrequestsareroutedtothesameserverforsessiondataconsistency.1)SessionIdentificationassignsuserstoserversusingcookiesorURLmodifications.2)ConsistentRoutingdirectssubsequentrequeststothesameserver.3)LoadBalancingdistributesnewuser

PHPoffersvarioussessionsavehandlers:1)Files:Default,simplebutmaybottleneckonhigh-trafficsites.2)Memcached:High-performance,idealforspeed-criticalapplications.3)Redis:SimilartoMemcached,withaddedpersistence.4)Databases:Offerscontrol,usefulforintegrati

Session in PHP is a mechanism for saving user data on the server side to maintain state between multiple requests. Specifically, 1) the session is started by the session_start() function, and data is stored and read through the $_SESSION super global array; 2) the session data is stored in the server's temporary files by default, but can be optimized through database or memory storage; 3) the session can be used to realize user login status tracking and shopping cart management functions; 4) Pay attention to the secure transmission and performance optimization of the session to ensure the security and efficiency of the application.

PHPsessionsstartwithsession_start(),whichgeneratesauniqueIDandcreatesaserverfile;theypersistacrossrequestsandcanbemanuallyendedwithsession_destroy().1)Sessionsbeginwhensession_start()iscalled,creatingauniqueIDandserverfile.2)Theycontinueasdataisloade

Absolute session timeout starts at the time of session creation, while an idle session timeout starts at the time of user's no operation. Absolute session timeout is suitable for scenarios where strict control of the session life cycle is required, such as financial applications; idle session timeout is suitable for applications that want users to keep their session active for a long time, such as social media.

The server session failure can be solved through the following steps: 1. Check the server configuration to ensure that the session is set correctly. 2. Verify client cookies, confirm that the browser supports it and send it correctly. 3. Check session storage services, such as Redis, to ensure that they are running normally. 4. Review the application code to ensure the correct session logic. Through these steps, conversation problems can be effectively diagnosed and repaired and user experience can be improved.

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6
Visual web development tools
