ThinkPHP framework setup and FAQs (XAMPP installation failure, Apache/MySQL startup failure), thinkphpxampp
This article gives you a detailed explanation of the problems encountered when setting up the ThinkPHP framework and provides a solution. The specific content is as follows:
Part 1: Framework Construction
I am also new to ThinkPHP, so I will record my current experiences and learning steps in a way that I think is easier to understand.
To use ThinkPHP, we must first set up the environment. The following two general steps are described:
Step 1:Download Software
1. Xmapp (this software integrates Apache and MySQL for ease of use)
2. Download ThinkPHP3.2.3
Step 2:Build a framework
1. Install the xmapp. We can see an htdocs folder. We can decompress the downloaded ThinkPHP3.2.3 to this folder;
2. Run XAMPP Control and enable Apache and MySQL, as shown in
3. Open the browser, enter localhost, and press Enter. Normally, the following page appears:
4. If the above interface appears, it indicates that the basic framework has been successfully built !, In addition, we noticed that there is a dashboard behind the address bar of the browser. This is because we haven't modified anything, so it displays the page under the dashboard by default.
Part 2: FAQs
First:XAMPP installation failed
Method 1:You can restore all the previous operations, that is, detach XAMPP, restore or delete all the configuration files you have created, and then reinstall them. I have done this, and the experiment shows that it is okay.
Method 2:Download and install vcredist_x86 from my online storage, and then install XAMPP. I think this is better, because it seems that there will still be problems in the future and it is not clear. I just explained my solution.
Second:Apache startup failed
First case: Port 80 is occupied
Solution:
1. The simplest and most crude method: Change the port number in the configuration file to another one. The method is as follows:
A. Open XAMPP, click the Config button corresponding to Apache, select the first line: Apache (httpd. config), and modify some configuration of the document;
B. Ctrl + f. Search for 80, locate the location, change 80 to another port, and change it to 81, enter netstat-an in the command line to check which ports are occupied on your computer, or click Netstat in the upper-right corner of XAMPP to check which ports are not occupied.
C. After the modification, start Apache again. If it still fails, see the following failure situation.
2. Check the port usage, find the process that occupies port 80, and open the task manager to kill the process. I may be a bit inaccurate here, but the method is like this. I will not discuss the specific measures, because the changes will involve other places.
Case 2: port 443 is occupied, because in addition to port 80, Apache startup also occupies port 443.
Solution:
1. The first method is the method mentioned above. kill the process that occupies port 443;
2. There is also a simple way to open the httpd-ssl.conf file under the xampp installation directory (C: \ xampp \ apache \ conf \ extra \ httpd-ssl.conf), I installed on the C drive, or click the Apache Config button in xampp, select the httpd-ssl.conf, find Listen 443, change port 443 to 4433 or other;
3. Open the XAMPP installation directory, modify the \ apache \ conf \ httpd. conf file, find the Include "conf/extra/httpd-ssl.conf" sentence, comment it out.
Case 3: If the VC Runtime Library is missing, download vcredist_x86 from my online storage and install it as mentioned earlier.
Third: MySQL startup failure
1. The solution for port 3306 is similar to the above
Finally, if you find it useful, I would like to like it and continue to pay attention to the articles shared by xiaobian. Thank you!
Articles you may be interested in:
- How to Set up a php runtime environment on Windows server 2008 (php5.3)
- Tutorial on building a php Development Environment on Mac
- Build a website development environment using Apache + MySql + PHP on mac
- How to Build IIS8.5 + PHP5.5.4 runtime environment in Win8.1
- Win2012 R2 IIS8.5 + PHP (FastCGI) + MySQL runtime environment setup tutorial
- Sina sae php project tutorial
- The easiest way to build Nginx and PHP environments in Ubuntu
- Set up the PHP5.6 environment in WIN8.1
- Build a wap mobile website using PHPCMS