PHP+APACHE development environment to build

1. Environment

        Entry-level installation tutorial, environment construction

        window32位+httpd-2.4.10-win32-VC11+php-5.6.31-Win32-VC11-x86

2. Operation:

        Download the corresponding installation package, you can Baidu. Unzip to a non-Chinese directory, preferably without symbols

php installation

        After decompressing the compressed file, copy php.ini-production, rename it to php.ini, open it with Notepad (notepad++),

Search for extension_dir = "ext" and remove the preceding; change to the path of the installation directory, as shown below

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
 extension_dir = "D:/php/ext"

; Directory where the temporary files should be placed.
; Defaults to the system default (see sys_get_temp_dir)
; sys_temp_dir = "/tmp"

The next search is as follows. Go to the place without quotation marks in front of it. After finding it, remove the quotation marks.

;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll      ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client

Search to find data.timezone , change to date.timezone =PRC

The main thing here is the modification time. Otherwise, there is a time difference between the default time of php and China time

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone =PRC

 

apache install

After decompressing directly, enter Apache24\conf\httpd.conf, find ServerRoot, here is the default directory of apache, as follows

#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "c:/Apache24"

Replace when found, replace the path with the local apache directory. Replace all c:/Apache24 with D:/Apache24

 

Add the following content in httpd.conf to support php

LoadModule php5_module "D:/php/php5apache2_4.dll"
PHPIniDir "D:/php"
AddType application/x-httpd-php .php .html .htm

 

Then create a new index.php file in the Apache24\htdocs directory with the following contents

<?php
phpinfo();
?>

After saving, exit.

Notice:

Run Apache24\bin\httpd.exe, here my computer prompts msvcp100.dll is missing, need to download the window plug-in, URL https://www.microsoft.com/en-us/download/details.aspx?id=30679

to download

3. Start Apache

 After the above is completed, open the Apache24\bin\httpd.exe file, it will stay in a window, don't close it. Visit http://localhost/index.php

Access to the php version information, the configuration is successful

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325560913&siteId=291194637