It's not hard to build PHP, just a little cumbersome. It's time consuming to build your own PHP + MySQL environment. To make matters worse, many beginners often have this problem when they configure PHP. Issues such as MySQL extensions, Zend installation failures, and so on. At this point, we need a fast, standard and professional PHP package. Phpnow in this way, for you to quickly build a professional virtual host.
Like Phpnow's name, let's phpnow! together
First from http://www.phpnow.org/download.htmlDownload the latest version of Phpnow. Phpnow has two kinds of encapsulation, one is the self-extracting version (recommended, this article for this version), the second is a pure 7z file (no EXE self-extracting).
The execution phpnow-1.3.x.exe appears as shown in the following figure. Enter.
Figure-1: Decompression dialog box
After the automatic decompression is completed, the Init.cmd will be automatically performed to initialize the action. As shown in Figure 2:
Firewall prompts may appear during the period, please allow.
Figure -2:init.cmd Process
Figure 3: Lifting the firewall
Init.cmd can be completed in 10 seconds. When all is complete, the default page opens automatically.
(if not, try opening http://127.0.0.1 manually)
If you only want to build a website, the above environment is enough. Most of the time we need to open a number of independent sites. For example, the forum and the homepage separate, and the friend share the server and so on. This is the time to use the virtual host.
Here is the use of Phpnow virtual host. Very simple.
Double-click Execute D:\PHPnow\PnConf.cmd (your installation path may not be D:\PHPnow), enter 2 and return.
Follow the prompts to enter the new virtual host information. As shown in Figure 5.
Figure-5: Open a virtual host
When you enter the information, the Apache is automatically restarted for entry.
Then visit the domain name you just added, and notice that the domain name points to your server IP in advance.
If you do not have a domain name or do not use it, you can use the "virtual domain name" by editing C:\WINDOWS\system32\drivers\etc\hosts.
The bbs.test.com in this example is to add a row of "127.0.0.1 bbs.test.com" to the next line of "127.0.0.1 localhost".
Figure-6: Virtual host successfully opened
You may also need to assign a MySQL database to each virtual host, and here's how to use phpMyAdmin to assign users and databases.
Open the Http://127.1/phpMyAdmin, and log in with Root.
Then click "Permissions" and click "Add New User".
Fill in the new username and password;
Select the second item "Create database with same name and grant all privileges".
Others remain the default; it is important to mention that global permissions are not optional, unless necessary.
Click [Execute] to complete. It's hard to understand, just look at the picture.
Figure 7: Adding database users.
Give the user name and password you just added to the user. Note that Root has the highest privileges, do not easily give the password to others.
All right! You now have a professional PHP server environment. What discuz!? 6.0, Phpwind, DeDe, phpcms All is not a problem, start your station journey immediately.