apache: Apache 2.4.10 Win64 http:// www.apachelounge.com/download/VC11/binaries/httpd-2.4.10-win64-VC11.zip
PHP: VC11 x64 Thread Safe http://windows.php.net/downloads/releases/php -5.6.0-Win32-VC11-x64.zip
MySql:5.5 win64
Visual C++ Redistributable for Visual Studio 2012 http://download.microsoft.com/download/9/C /D/9CD480DC-0301-41B0-AAAB-FE9AC1F60237/VSU4/vcredist_x64.exe
Double-click to run, set user name, password, encoding ( utf8), steps omitted!
1. Unzip the downloaded zip file to a directory, in this tutorial it is: D:Program Filesphp
2. Copy the file php.ini-development And renamed it to php.ini;
3. Search for the keyword php_mysqli.dll in the php.ini file, remove the ";" in front of the line, and enable the mysql extension (using the mysql database);
4. Search for the keyword extension_dir and modify it to: extension_dir = "D:/Program Files/php/ext" (depending on the specific directory);
5. Modify it in sequence
Support session: session.save_path = "e:/temp"
Upload file directory configuration: upload_tmp_dir = "e:/temp"
Time zone configuration: date.timezone = Asia/Shanghai
0. Install Visual C++ Redistributable for Visual Studio 2012
1. Unzip the downloaded zip file to drive c: C:Apache24
2. conf directory httpd.conf file , locate LoadModule, and add after it: (the directory will be modified depending on the specific php directory)
LoadModule php5_module "D:/Program Files/php/php5apache2_4.dll"
PHPIniDir "D:/Program Files /php"
3. Locate AddType and add after it:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
4. If you want to modify the apache port, locate Listen 80, for example, change it to: Listen 8088
5. Install the apache service.
Open a DOS window as an administrator. If you are not an administrator, an error will be reported. For win8 and win8.1 systems, you can press C on the start page to search. The first one: Command Prompt, right-click and select Run as administrator.
The default path of the command prompt is: C:windowssystem32. Assume that you have placed the apache24 folder in the root directory of drive C according to the above steps. Then enter: cd c:apache24bin in the command prompt and press Enter. You can enter the bin folder, and then enter: httpd.exe -k install . (Of course, if you want to start|stop|restart, you need to use the -k parameter, that is, httpd.exe -k start|stop|restart.)
If the installation is successful, you can go to the bin in your apache directory and double-click ApacheMonitor.exe to manage the apache service.
Browse http://localhost/index.html, (if the port has been modified, for example, in this tutorial it is: http://localhost:8088/index.html) "It works!" is displayed, indicating that apache is started successfully.
Create a new index.php file in the directory: C:Apache24htdocs, (apache default website directory),
<?<span>php </span><span>phpinfo</span><span>(); </span>?>
Browse: http://localhost/index.php, if the port has been modified, for example in this tutorial it is: http://localhost:8088/index.php
The PHP version information page is displayed, which is success:
To test the mysql connection, create a new file mysql.php in the directory just now, as follows:
<?<span>php </span><span>$connect</span>=<span>new</span> mysqli("localhost","root","root","test"<span>); </span><span>if</span>(!<span>$connect</span>) <span>echo</span> "Mysql Connect Error!"<span>; </span><span>else</span> <span>echo</span> "mysql success"<span>; </span><span>$connect</span>-><span>close(); </span>?>
Open mysql.php on the page, and if it succeeds, it will output mysql success
1. Install apache_2.2.4-win32-x86-no_ssl.msi to d:\phpWeb\APACHE\
Steps: Next step Next step
2. Install php-5.2.0-Win32.zip to d:\phpWeb\php\
Steps: (1) Unzip the compressed package to d:\phpWeb\php\
(2) Find php.ini-dist in the php directory, rename it to php.ini and copy Go to the windows directory
(3) Copy php5ts.dll and libmysql.dll in the php directory to the system directory (system/system32)
3. Configure apache
Steps: (1) Open d:\ phpWeb\APACHE\conf\httpd.conf this file
(2) Find DocumentRoot "D:/phpWeb/APACHE/htdocs" and change it to your WEB directory (if you don’t change it, sometimes an error will occur if you change it)
( 3) Find the line DirectoryIndex index.html and add index.html.var index.htm index.php
(4) Find the line #LoadModule ssl_module modules/mod_ssl.so and add a line after it: LoadModule php5_module d:/phpWeb/php/php5apache2_2.dll
(5) Find the line AddType application/x-gzip .gz .tgz, and add a line after it: AddType application/x-httpd-php .php
4 .Configure php
Steps: (1) Find c:\windows\php.ini and open it (copied just now)
(2) Find extension_dir = "./" and change it to extension_dir = "d:/phpWeb /php/ext"
(3) Find;extension=php_mysql.dll and remove the preceding;
(4)Find;session.save_path = Remove the preceding; and set the path "d:/phpWeb/php/ session_temp" and create a new folder session_temp under this path
5. Just install MySQL
Hello, host, beginners are advised to use PHP integrated environment directly, such as WampServer. In addition, if you don’t understand this aspect, you will not be able to use it even after the environment is set up. I suggest you go to PHP100 to learn, it is free and more systematic. Personally I think it’s good. I hope this helps, and I wish you success!