• 在windows7下安装php7和apache2.4

    Windows 下
    安装 VS2015
    安装 Apache 2.4.18 Win64
    安装php 线程安全版本 php-7.0.3-Win32-VC14-x64
    复制 php.ini-development 为 php.ini, 可直接开启以下扩展:
    extension_dir = “ext”
     
    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_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_tidy.dll
    extension=php_xmlrpc.dll
    extension=php_xsl.dll

    找到php7目录下的:libeay32.dll和ssleay32.dll,复制并替换到apache\bin目录下
    在apache 的 httpd.conf 增加如下内容:
    LoadFile “D:/x64/php-7.0.3/php7ts.dll”
    LoadFile “D:/x64/php-7.0.3/libpq.dll”
    LoadModule php7_module “D:/x64/php-7.0.3/php7apache2_4.dll”
    <IfModule php7_module>
        PHPIniDir “D:/x64/php-7.0.3/”
        #AddType application/x-httpd-php .php .phtml
        <FilesMatch \.php$>
              SetHandler application/x-httpd-php
        </FilesMatch>
    </IfModule>

    启动即可