


PHP environment setup (using the integrated environment phpnow)_PHP tutorial
It is not difficult to set up a PHP environment, but the process is a bit cumbersome. It would be time-consuming and laborious to build a PHP + MySQL environment using original programs. And errors of this kind often occur when configuring PHP. Problems such as mysql extension and zend installation failure. Here we share a way to quickly build a PHP operating environment using an integrated environment and how to build a virtual host, that is, the phpnow software.
If you really want to install the entire PHP operating environment step by step, you can refer to the article on this site:
How to set up a PHP running environment under Windows 7
phpnow is a fast, standard and professional PHP package that can easily and quickly build a professional PHP running environment. Let’s take a look at the specific process below.
First download the latest version of PHPnow from http://servkit.org/download. PHPnow has two packages, one is the exe self-extracting version (recommended, this article is for this version), and the other is the pure 7z file (without exe self-extracting).
Execute PHPnow-1.4.x.exe and the following picture will appear. Just press Enter (note that you must select the installation directory here, because the installation program will be automatically executed after the decompression is completed. If you decompress to the desktop, it will be automatically installed into the file directory on the desktop).
After automatic decompression is completed, Init.cmd will be automatically executed for initialization (firewall prompts may appear during this period, please allow). As shown below:
Init.cmd can be completed in ten seconds. After all is completed, the default page will be opened automatically (if not, try opening http://127.0.0.1 manually).
If you just want to build a website, the above environment is enough. Very often we need to open multiple independent websites. For example, separate forums and homepages, share servers with friends, etc. At this time, a virtual host will be used.
Let’s talk about the use of PHPnow virtual host. Very simple.
Double-click to execute D:PHPnowPnCp.cmd (maybe your installation path is not D:PHPnow), enter 2 and press Enter. Follow the prompts to enter the new virtual host information. As shown below:
After entering the information and pressing Enter, Apache will be automatically restarted to take effect. Then visit the domain name you just added, making sure to resolve the domain name and point it to your server IP in advance.
If you don’t have a domain name or don’t know how to use it, you can use the “virtual domain name” by editing C:WINDOWSsystem32driversetchosts.
The bbs.test.com in this example is implemented by adding a line "127.0.0.1 bbs.test.com" to the next line of "127.0.0.1 localhost".
You may also need to assign a MySQL database to each virtual host. Here is how to use phpmyadmin to assign users and databases.
Open http://127.1/phpMyAdmin; log in as root.
Then click “Permissions” and then “Add New User”.
Fill in the new username and password;
Select the second option “Create database with same name and grant all privileges”.
Others remain as default; it should be mentioned that global permissions do not need to be selected unless necessary. Otherwise, do not select them at all.
Click [Execute] to complete. If you don’t understand, just look at the picture.
Just give the user the username and password you just added. Note that root has the highest authority, do not give the password to others easily.
Okay! You now have a professional PHP server environment.
Articles you may be interested in
- Introduction to PHP development environment building software
- How to build a PHP running environment under Windows 7
- php obtains pm2 from a certain place. 5 Data interface development (pm2.5 php api)
- php analysis and comparison of major open source CMS
- php method to obtain each month within a certain period of time and return an array composed of these months
- 9 PHP open source projects with great development potential (including iphone push and phpForAndroid)
- Three ways for PHP to obtain the real IP address of the client
- PHP generates continuous Numeric (letter) array function range() analysis, PHP lottery program function

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

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

Alipay PHP...

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
