Home >Backend Development >PHP Tutorial >[php learning] Construction of wamp basic environment
WAMP is Apache Mysql/MariaDB Perl/PHP/Python under Windows. It is a set of open source software commonly used to build dynamic websites or servers. They are independent programs themselves, but because they are often used together, they have The increasingly high compatibility forms a powerful web application platform. This article mainly describes the main process of building the basic environment of wamp. Friends who are interested can come and learn about it.
1.1 Download address: https://www.apachelounge.com/download/
1.2 Extract the downloaded file to the directory you want to install D:\WAMP
2.1 Modify ServerRoot ( Server path) Change to the installation directory of apache ServerRoot "D:/WAMP/Apache24"
2.2 Modify ServerName (server name) #ServerName www.example.com:80 This is the server address of Apache. Change the previous Remove "#" and change "www.example.com" to "localhost"
2.3 Modify DocumentRoot (the root directory of the website) DocumentRoot "c:/Apache24/htdocs" is changed to D:/WAMP/Apache24 /www and modify the htdocs folder name to www
2.4 Modify 2.5 Modify ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/" to ScriptAlias /cgi-bin/ "D:/WAMP/Apache24/cgi-bin/" 2.6 Modify 3.1 Registration Service Start----Run-----cmd, enter the bin directory of apache, and execute the command: httpd.exe -k install -n "Apache24" 3.2 Uninstall the service (stop the service first) Start----Run-----cmd, enter the bin directory of apache, and execute the command: httpd.exe -k uninstall -n "Apache24" 1.1 Download address: http://php.net/downloads.php 1.2 Extract the downloaded zip file to the specified directory, such as D:\WAMP\php7.2 2.1 Configure httpd.conf 2.1.1 Add PHP module Look for the "Dynamic Shared Object (DSO) Support" section. Probably around line 62. And append the following code at the end: LoadModule php7_module D:/WAMP/php7.2/php7apache2_4.dll 2.1.2 Add extension Look for "AddType" part. Probably around line 409, and append the following current code at the end: AddType application/x-httpd-php-source .phps 2.1.3 Specify the php.ini configuration file path Specify the directory of the PHP configuration file php.ini in the httpd.conf file. Here, locate the end of the httpd.conf file, in the text Add the following code to the last line: PHPIniDir "D:/WAMP/php7.2" ("D:/WAMP/php7.2" here is the actual path where the php.ini file is stored) 2.1.4 Configuring DirectoryIndex Look for the "DirectoryIndex" part, probably at line 282, and append an "index.php" after DirectoryIndex Related tutorials: The above is the detailed content of [php learning] Construction of wamp basic environment. For more information, please follow other related articles on the PHP Chinese website! 3. Register and uninstall the apache service
2. PHP installation configuration:
1. Install php
2. Configure php (D:\WAMP\Apache24\conf\httpd. conf)