I have been planning to write this article for a long time, but I have been failing to write this article for various reasons (such as internships and job fairs. I decided to solve this problem today. I could provide some guidance for some children's shoes. I don't have to look for any tutorials when I forget about it. I just need to talk nonsense and start! For convenience, you can also use the xampp installation package
I have been planning to write this article for a long time, but I have been failing to write this article for various reasons (such as internships and job fairs. I decided to solve this problem today. I could provide some guidance for some children's shoes. I don't have to look for any tutorials when I forget about it. I just need to talk nonsense and start! For convenience, you can also use the xampp installation package
I have been planning to write this article for a long time, but I have not been able to "write" for various reasons (such as internships and job fairs ". I decided to solve this problem today. I could provide some guidance for some children's shoes. I don't have to look for any tutorials when I forget about it. I just need to talk nonsense and start!
For convenience, you can also use the xampp installation package to install Apache, PHP, and MySQL at one time, as well as phpmyadmin and PEAR libraries. However, the xampp official website also said that this method only advocatesDevelopmentStage use. If you want to publish a website, you 'd better do it yourself.EnvironmentConfiguration.
Officially started (taking my own installation as an example)
1. Software preparation
Apache httpd-2.2.17-win32-x86-openssl-0.9.8o.msi
PHP php-5.3.3-Win32-VC6-x86.zip (tip: VC6 for Apache, VC9 for IIS)
MySQL mysql-essential-5.1.53-win32.msi
In addition, I have installed the phpMyAdmin phpMyAdmin-3.3.8-all-languages.zip
2. install Apache
The installation of Apache is the same as that of other software. Basically, click "Next" to complete the installation.
After the installation is complete, you canConfigurationFile. Generally, after the installation is complete, you need to test whether the server is working properly. Make sure that Apache is running. Enter http: // 127.0.0.1 in the browser. If "It works" is displayed, the installation is successful.
In addition, httpd is usually required. in the conf file DocumentRoot, I changed the default value to "D:/htdocs", where all website files are stored, and Modified Process . You do not need to modify other settings for the moment. In this case, you can turn off the Apache server first because it needs to be associated with PHP later.
3. PHP installation
I downloaded the zip installation package on the PHP official website. Obviously, it is OK after decompression. I decompress the downloaded PHP package (anywhere) and cut the decompressed file to the "D: \ php" directory.
Find php under this directory. ini-development and php. ini-production: If you are testing, select the first one. If you want to publish your website, select the second one. I chose php. ini-development, and then change the file name to php. ini.
Next, make some modifications to php. ini.
① Remove the semicolon (;) in front of extension = php_mysql.dll and extension = php_mysqli.dll. The same is true for extension = php_gd2.dll and extension = php_xsl.dll. Remove the semicolon. If you have other requirements, remove the semicolon from the corresponding place. Here are the extensions you need to implement some functions. Obviously, we will use mysql and its new mysqli extension later. If this is not done, you cannot connect to the database through php after installing MySQL.
② Above these extensions, you also need to modify extension_dir = "D: \ php \ ext \". "D: \ php" is the place where I placed php, the ext directory is used to expand the actual storage location. During the program running, the corresponding directory is queried through this setting.
To enable Apache to work with PHP, modify httpd. conf
① Locate AddType and add a line below: AddType application/x-httpd-php. php. html. The essence of this is to add a file type that can execute php, such as "AddType application/x-httpd-php. txt", so that common text file formats can also run php programs.
② Locate the LoadModule and add LoadModule php5_module "D:/php/php5apache2_2.dll". Then, when Apache starts, it will find the corresponding file, php5apache2_2.dll (previously php5apache2. dll, because the current version is 2.2.x ).
③ Find DirectoryIndex index.html And so on.
4. Now you need to install MySQL
There are basically no other problems, just like installing other software.
5. phpMyAdmin
Decompress the downloaded phpMyAdmin package, rename it phpMyAdmin, move it to the htdocs directory, and modify config. inc. php. (Red is my modified one)
$ Cfg ['blowfish _ secret '] = 'asdfas'; (tip modifies characters at Will)
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'http ';
$ Cfg ['servers'] [$ I] ['extension'] = 'mysqli ';
$ Cfg ['servers'] [$ I] ['controluser'] = 'root ';
$ Cfg ['servers'] [$ I] ['controlpass'] = 'asdfasdfas ';
BasicConfigurationThis is the case. For more details, refer to google or Baidu. Also, if you want to directly enter http: // localhost, you need to add 127.0.0.1 localhost to the hosts file. Now, a server that can run PHP and MySQLConfigurationOkay.
Ps: Of course, I encountered many problems in the middle. I did not list them one by one. I can discuss them in the comments !!
If the LoadModule error is found, the server may not find the php. ini file. In this case, add a line in httpd. conf: PHPINIDir "Directory of php. ini"