Thinkphp Framework and common problems (XAMPP installation failure, Apache/mysql startup failure) _php instance

Source: Internet
Author: User

This article for everyone to share the construction of the thinkphp framework of the problems encountered, for you to provide a solution, the specific contents are as follows

The first part: frame build

I have just come in contact with thinkphp, so I will record my current experience and learning steps in a way that I think is easier to understand.

To use thinkphp first is to build the environment, the following two general steps to introduce:

The first step: download software

1, Xmapp (this software will be Apache, MySQL and other integrated, easy to use)

2, ThinkPHP3.2.3 download

Step Two: build the frame

1, will Xmapp installed, we can see a htdocs folder, we can download a good ThinkPHP3.2.3 extract to this folder;

      

2, run XAMPP control, open Apache and MySQL, as shown in the following figure

  

3, open the browser, input localhost, enter, the normal situation will appear the following interface

4, if the above interface, it represents the basic framework has been successfully built! , and we notice that there's more dashboard behind the browser's address bar, because we haven't changed anything, so it defaults to the page under dashboard.

Part II: frequently asked questions

First Type: XAMPP Installation Failed

method One: You can restore all the previous actions, that is, uninstall the XAMPP, restore or delete all of your configuration files, and then reload. I have done this and the experiment shows that it is possible.

method Two: the vcredist_x86 of My network disk is downloaded to install well, install XAMPP again. I think this is better, because there seems to be a problem behind it, not very clear, I just explained my solution.

The second type: Apache failed to start

In the first case: 80 ports are occupied

  Solution:

1. The simplest and most outrageous way: Change the port number in the configuration file to something else, as follows:

A, open xampp, click the Apache corresponding config button, select the first line: Apache (httpd.config), modify the part of the document configuration;

B, ctrl+f, search 80, respectively found as shown in the figure, the 80 modified to other ports, I modified to 81, this to the command line to enter Netstat-an to see which ports of your computer are occupied, Or click on the button netstat directly in the upper-right corner of the XAMPP to see if you choose a port that is not occupied.

        

 

C, after the modification to start Apache again OK, if or failed, please see below a failure situation.

2. View the port occupancy, find the process that occupies 80 ports, and open Task Manager to kill the process. I may be a little inaccurate here, but that's the way it goes, because I'm going to be involved in other areas.

In the second case: 443 ports are occupied because Apache will take up 443 ports in addition to consuming 80 ports

  Solution:

1, the first way is said above the method, will occupy the 443-port process kill;

2, there is a simple point of approach, open the XAMPP installation directory of the httpd-ssl.conf file (C:\xampp\apache\conf\extra\httpd-ssl.conf), I installed in the C disk, Or in XAMPP, click the Apache config button, select httpd-ssl.conf, find listen 443 so that, the 443 port to 4433 or other;

3, open XAMPP installation directory, modify the \apache\conf\httpd.conf file, find include "conf/extra/httpd-ssl.conf" This sentence, it can be commented out.

The third situation: the lack of VC run-time Library, download My network disk vcredist_x86 installation can be, mentioned before.

The third type: MySQL failed to start

1, 3306 port problem, the solution is similar to the above

Finally, if you feel useful, just point a praise, continue to pay attention to the article to share, thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.