Home  >  Article  >  Backend Development  >  PHP environment setup (using the integrated environment phpnow)_PHP tutorial

PHP environment setup (using the integrated environment phpnow)_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:28:581931browse

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).

PHP environment setup (using the integrated environment phpnow)_PHP tutorial

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:

php环境搭建(使用集成环境phpnow):Init.cmd 过程

PHP environment setup (using the integrated environment phpnow)_PHP tutorial

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).

PHP environment setup (using the integrated environment phpnow)_PHP tutorial

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:

PHP environment setup (using the integrated environment phpnow)_PHP tutorial

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".

PHP environment setup (using the integrated environment phpnow)_PHP tutorial

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.

PHP environment setup (using the integrated environment phpnow)_PHP tutorial

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/779413.htmlTechArticleIt 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 when configuring PHP, something like this often happens...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn