


PHP basics Installing Apache Mysql PHP in windows environment (picture)
PHPRunning environment: Three installation methods under
Linux: source code package installation, rpm package installation, integrated environment installation (lnmp)
Two ways to install windows: single download installation, integrated environment installation (AppServ, phpstudy, wamp)
Install PHP development environment on Windows system:
The required software is installed independently:
Preparation before installation
Install Apache
Installation MySQL
Install PHP
Install phpMyA
MYSQL installation:
Open the downloaded mysql installation file mysql-5.0.27-win32.zip, double-click to decompress it, Run "setup.exe", and the following interface will appearSelect "I accept the terms in the license agreement" to agree to the license agreement, and then click "Next" to continue. In the window for selecting the installation type, there are "typical (default)", "Complete (complete)", " Custom (user-defined)" three options, we choose "Custom", because customization can make us more familiar with its installation process, which is very helpful for learning MySQL database. Click "next" to continue the installation, such as As shown in the picture:
Select the installation path of the mysql database in the custom installation interface. Here I set "d:\Program File\MySQL", click "Next" to continue the installation, as shown in the picture:
Next enter the interface to prepare for installation. First confirm the previous settings. If there is an error, press "back" Return, there is no error, click the "Install" button to continue the installation, as shown in the figure:
After clicking the "Install" button, the following installation interface appears. After a long time In a short time, the MySQL database installation is completed, and the interface to complete the MySQL installation appears, as shown in the figure:
Just click "next" on this interface.
Be sure to select the "Launch the MySQL Instance Configuration Wizard" option above. This is the configuration to start MySQL and is also the most critical. (can also be set later), click the "Finish" button to enter the configuration interface.
The installation of MySQL database is very simple. The key is the configuration after the installation is completed. After clicking Finish, the following configuration interface wizard will appear. Click "next" to configure, as shown in the figure:
#Select the configuration method in the opened configuration type window, "Detailed Configuration (manual precise configuration)", "Standard Configuration (standard configuration)", in order to familiarize yourself with the process, we select "Detailed Configuration (Manual precise configuration)", click "next" to continue, as shown in the figure:
In the window that appears, select the type of server, "Developer Machine Test Class)", "Server Machine (Server Type)", "Dedicated MySQL Server Machine (Specialized Database Server)", we are only used for learning and testing, the default is fine, click "next" to continue, as shown in the figure :
Select the purpose of the mysql database in the configuration interface that appears, "Multifunctional Database (universal multi-functional)", "Transactional Database Only (server type)", " Non-Transactional Database Only (non-transaction processing type)", here I choose the first item, universal installation, click "next" to continue the configuration, as shown in the figure:
In the interface that appears, configure the InnoDB Tablespace, which is to select a storage space for the InnoDB database file. If it is modified, remember the location. Select the same place when reinstalling, otherwise the database may be damaged. Damage, of course, it will be no problem to make a backup of the database, as shown in the figure:
In the page that opens, select the number of mysql visits and the number of simultaneous connections , "Decision Support (DSS)/OLAP (about 20)", "Online Transaction Processing (OLTP) (about 500)", "Manual Setting (manual setting, set to 15)" Select manual setting here, click " next" to continue, as shown in the figure:
Mysql starts the TCP/IP network by default, and the port number is 3306. If you do not want to use this port number, you can also change it through the drop-down list box, but you must ensure that the port number is not occupied. The Add filewall exception for this Port checkbox is used to register this port number on the firewall. Select this option here. The Enable Strict Mode checkbox is used to enable MYSQL standard mode, so that MYSQL will strictly check the input data. , minor grammatical errors are not allowed. It is not recommended for beginners to select this item to avoid trouble. I have checked it here. You can not select this option and click "next" to continue, as shown in the picture. Display:
In the character encoding page that opens, set the character encoding to be used by mysql. The first one is Western encoding, and the second one is multi-byte. Universal utf8 encoding, the third one is manual, we choose utf-8. If the encoding of UTF-8 is not selected here, garbled characters will appear when using JDBC to connect to the database. At that time, you need to add the following The code "useUnicode=true&characterEncoding=UTF-8" can solve the problem of garbled characters. For future convenience, it is set to UTF-8 encoding, but there is a problem, that is, when using which console to insert Chinese characters, an error will be reported. Query Tables with Chinese characters cannot display Chinese characters. Therefore, you need to set a system parameter "set names gbk" every time you enter MySQL to solve this problem. Then click "next" to continue the configuration, as shown in the figure. :
In the page that opens, choose whether to install mysql as a windows service, you can also specify the Service Name (service identification name), and whether to add the bin directory of mysql to Windows PATH (after adding it, you can directly use the files under bin without pointing out the directory name, such as connecting, "mysql –u username –p password;"), click "next" to continue the configuration, as shown in the figure:
In the page that opens, set whether you want to modify the password of the default root user (super administrator) (the default is empty), "New root password", if you want to modify it, Just fill in the new password here and enable the root remote access function. Do not create an anonymous user. Click "next" to continue the configuration, as shown in the figure:
To All configuration operations here have been completed. Click the Execute button to execute the configuration, as shown in the figure:
After a few minutes, the following prompt interface appears, which represents the MySQL configuration It has ended, and a successful message was prompted
Start the mysql database in the service, and enter "mysql –h localhost –u root -p in the command window. ” or “mysql -h localhost -uroot -p password”, then enter the user’s password in the prompt that appears, as shown in the figure:
PHP environment installation:
A. Install Apache
B. Install PHP (just unzip the compressed package to the corresponding location)
C. PHP configuration
Rename php.ini-dist to php.ini Modify 486 and
extension_dir = "D:/php-5.2.6/ext"
D, configure the Apache configuration file httpd.conf
#Load PHP module
LoadModule php5_module "D:/php-5.2.6/php5apache2_2.dll"
#The location of the PHP configuration file
PHPIniDir "D:/php-5.2.6"
#Which types of files will be processed by the PHP engine
AddType application/x-httpd-php .php
E , Restart Apache
Modify the httpd.conf configuration file
a) Modify line 177 to reset the document root directory
DocumentRoot "D:/ftp /Public/www"
b) Modify line 244 to set the website directory and document root directory to be consistent
c) Modify line 187 to set the website root directory access permissions
Allow from all
##d) Modify line 240 to set the website default document (if the set html document does not exist, it will List all files in the root directory of the website) DirectoryIndex abc.htmle) Restart apache service
PHP configuration
LoadModule php5_module "D:\Program Files (x86)\Apache Software Foundation\php5.2.6\php5apache2_2.dll"
PHPIniDir "D:\Program Files (x86)\Apache Software Foundation\php5.2.6"
AddType application/x-httpd-php .php
This way It's installed, it's quite simple, but there are a lot of steps.
The above is the detailed content of PHP basics Installing Apache Mysql PHP in windows environment (picture). For more information, please follow other related articles on the PHP Chinese 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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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 is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.
