


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











PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.
