


ThinkPHP framework construction and common problems (XAMPP installation failed, Apache/MySQL startup failed), thinkphpxampp_PHP tutorial
ThinkPHP framework construction and common problems (XAMPP installation failure, Apache/MySQL startup failure), thinkphpxampp
This article shares in detail the problems encountered when building the ThinkPHP framework, for Everyone has provided solutions, the details are as follows
Part One: Framework Construction
I am also new to ThinkPHP, so I will record my current experience and learning steps in a way that I think is easier to understand.
To use ThinkPHP, you must first set up the environment. The following two general steps will be introduced:
Step one: Download the software
1. Xmapp (this software integrates Apache, MySQL, etc. and is very convenient to use)
2. Download ThinkPHP3.2.3
Step 2: Build the framework
1. After installing xmapp, we can see a htdocs folder, and we can unzip the downloaded ThinkPHP3.2.3 into this folder;
2. Run XAMPP Control, open Apache and MySQL, as shown in the figure below
3. Open the browser, enter localhost and press Enter. Under normal circumstances, the following interface will appear
4. If the above interface appears, it means that the basic framework has been successfully built! , and we noticed that there is a dashboard behind the browser address bar. This is because we have not modified anything, so it displays the page under the dashboard by default.
Part 2: Frequently Asked Questions
First type: XAMPP installation failed
Method 1: You can restore all the previous operations, that is, uninstall XAMPP, restore or delete all the configuration files you should have, and then reinstall . I've done this before, and experiments show it works.
Method 2: Download and install vcredist_x86 in my network disk, and then install XAMPP. I think this is better, because otherwise there may be problems later. I’m not sure. I just explained my solution.
Second type: Apache startup failed
The first situation: Port 80 is occupied
Solution:
1. The simplest and crudest way: change the port number in the configuration file to something else. 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 configurations of the document;
b, Ctrl f, search for 80, find the locations as shown in the picture, change 80 to other ports, I changed it to 81, you need to enter netstat -an in the command line to check which ports of your computer are blocked occupied, or directly click the button Netstat in the upper right corner of XAMPP to view and select the unoccupied ports.
2. Check the port occupancy, find the process occupying port 80, open the task manager and kill the process. I may be a little inaccurate here, but the method is like this. I won’t go into specific measures because my modifications will involve other places.
Second case: Port 443 is occupied, because in addition to occupying port 80, the startup of Apache will also occupy port 443
Solution:
1. The first method is the method mentioned above, which is to kill the process occupying port 443;2. There is a simpler way, open the httpd-ssl.conf file in the xampp installation directory (C:xamppapacheconfextrahttpd-ssl.conf), I installed it on the C drive, or click Apache's Config in xampp button, select httpd-ssl.conf, find the sentence Listen 443, and change the 443 port to 4433 or other;
3. Open the XAMPP installation directory, modify the apacheconfhttpd.conf file, find the sentence Include "conf/extra/httpd-ssl.conf", and comment it out.
The third situation: the VC runtime library is missing, just download vcredist_x86 from my network disk and install it, as mentioned before.
Third type: MySQL failed to start
1. 3306 port problem, the solution is similar to the aboveFinally, if you find it useful, please give it a like and continue to follow the articles shared by the editor. Thank you!
Articles you may be interested in:
- Detailed graphic and text explanation of setting up PHP running environment in Windows server 2008 (php5.3)
- Tutorial on setting up PHP development environment under Mac
- Building website development environment with Apache MySql PHP under mac
- Tutorial on building IIS8.5 PHP5.5.4 running environment under Win8.1 system
- Win2012 R2 IIS8.5 PHP (FastCGI) MySQL running Environment building tutorial
- Sina SAE building PHP project tutorial
- The easiest way to build Nginx and PHP environment in Ubuntu
- Building PHP5.6 environment under WIN8.1
- Use PHPCMS to build a wap mobile website

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

AI Hentai Generator
Generate AI Hentai for free.

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.

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 is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

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 makes it easy to create interactive web content. 1) Dynamically generate content by embedding HTML and display it in real time based on user input or database data. 2) Process form submission and generate dynamic output to ensure that htmlspecialchars is used to prevent XSS. 3) Use MySQL to create a user registration system, and use password_hash and preprocessing statements to enhance security. Mastering these techniques will improve the efficiency of web development.

Deploying a ZooKeeper cluster on a CentOS system requires the following steps: The environment is ready to install the Java runtime environment: Use the following command to install the Java 8 development kit: sudoyumininstalljava-1.8.0-openjdk-devel Download ZooKeeper: Download the version for CentOS (such as ZooKeeper3.8.x) from the official ApacheZooKeeper website. Use the wget command to download and replace zookeeper-3.8.x with the actual version number: wgethttps://downloads.apache.or
