Windows下,php5.6+Apache2.4+mysql安装与配置

我将php5.6与apache2.4,与php所需要安装的运行库(vc2012,vc2015,vc2017)都放在我的GitHub里,可以下载

配置apache

修改[Your download]/Apache24/conf/httpd.conf

1、配置ServerRoot,为

ServerRoot "C:/server/apache24"  #我将更目录为/server

2、导入php module,再LoadModule后面加入

LoadModule php5_module "c:/server/php/php5apache2_4.dll"
PHPIniDir "c:/server/php"

3、添加可执行的PHP文件类型

AddType application/x-httpd-php .php

4、配置ServerName

ServerName 127.0.0.1

5、配置DocumentRoot

DocumentRoot "c:/server/phpcode"

6、配置Directory

我是将Required from dined 改为了Allow from all(为了方便),也可以为了安全设置写拒绝访问的地址

配置php

复制php.ini-development,并更改为php.ini

1、修改拓展

extension_dir = "c:/server/php/etc"

2、打开支持的拓展文件

;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;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
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll

; The MIBS data available in the PHP distribution must be installed. 
; See http://www.php.net/manual/en/snmp.installation.php 
extension=php_snmp.dll

extension=php_soap.dll
extension=php_sockets.dll
;extension=php_sqlite3.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll

extension=php_xdebug.dll

Windows下,php5.6+Apache2.4+mysql安装与配置_第1张图片

配置MySQL

Windows下,php5.6+Apache2.4+mysql安装与配置_第2张图片

你可能感兴趣的:(PHP,apache,win10)