• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Wiki安装(PHP +Sqlite+Cache)

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

前期准备

PHP

http://windows.php.net/download

 

WinCache Extension for PHP

URL:http://sourceforge.net/projects/wincache/?source=typ_redirect

Features:

  • PHP 5.2 and PHP 5.3 and PHP 5.4 and PHP 5.5 and PHP 5.6 support
  • Configurable file cache
  • Configurable PHP opcode cache
  • Relative file path cache
  • PHP functions to obtain information about the cache status

 

MySQL(备选,本文使用SQLite)

https://dev.mysql.com/downloads/windows/installer/5.7.html

 

PHP配置

IIS中的配置

确保IIS开启FastCGI

Window7上配置窗口

Windows 2008 通过上配置窗口:

Run> CompMgmtLauncher>Add Roles>Add Role Services

在IIS中为PHP创建映射处理程序

“添加模块映射”,并填写如下内容

  • Request path: *.php
  • Module: FastCgiModule
  • Executable: C:\[Path to PHP installation]\php-cgi.exe(根据自己的实际安装情况自行修改)
  • Name: PHP_via_FastCGI

Ini文件的创建

并创建测试页面 phpinfo.php,页面内容如下:

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?> 
 <?php phpinfo(); ?>
 </body>
</html>

问题1,时区未指定错误

会报以下错误:

PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. 
You are *required* to use the date.timezone setting or the date_default_timezone_set() function. 
In case you used any of those methods and you are still getting this warning, 
you most likely misspelled the timezone identifier. 
We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. 
in **\phpinfo.php on line 7

 

修改措施:

在PHP的配置文件php.ini 中给定时区即可。修改内容为:

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

记得重启IIS哦。

 

WinCache Extension for PHP 安装配置

拷贝文件到ext 文件夹下:

在php.ini文件中打开相应配置:

测试页面会输出如下结果:

 

PHP数据库驱动安装(PDO)

https://secure.php.net/manual/en/pdo.drivers.php

Driver name Supported databases
PDO_MYSQL MySQL 3.x/4.x/5.x
PDO_PGSQL PostgreSQL
PDO_SQLITE SQLite 3 and SQLite 2
PDO_SQLSRV Microsoft SQL Server / SQL Azure
PDO_OCI Oracle Call Interface
PDO_ODBC ODBC v3 (IBM DB2, unixODBC and win32 ODBC)

Installing PDO

PDO and all the major drivers ship with PHP as shared extensions, and simply need to be activated by editing the php.ini file:

extension=php_pdo.dll

Note:
This step is not necessary for PHP 5.3 and above, as a DLL is no longer required for PDO.

Next, choose the other database-specific DLL files and either use dl() to load them at runtime, or enable them in php.ini below php_pdo.dll. For example:

;These DLLs should exist in the system's extension_dir.
extension=php_pdo.dll
extension=php_pdo_firebird.dll
extension=php_pdo_informix.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_oci8.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll

 

此处我只用了SQLite,配置如下

;Install SQLite PDO By HQF
extension = php_pdo_sqlite.dll

测试页面会输出下面结果:

 

PHP ImageMagick

下载地址:
http://windows.php.net/downloads/pecl/releases/imagick/

待处理

 

Internationalization extension

处理Unicode的扩展模块

http://pecl.php.net/package/intl

 

Wiki 安装

解压Wiki 包后,按如下步骤安装即可。此处略去。。。

 

成果

 

参考

Installation on Windows systems(PHP)https://secure.php.net/manual/en/install.windows.php

PHP: System Timezone Setting error

Install the SQL Server Driver for PHP https://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/install-the-sql-server-driver-for-php

PHP连接 SQLSERVER 注意事项(经典中的经典)


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
phpcurl常见错误:SSL错误、bool(false)发布时间:2022-07-10
下一篇:
php去掉字符串的最后一个字符发布时间:2022-07-10
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap