星期五, 十二月 22, 2006

Ajax: A New Approach to Web Applications

原文:http://www.adaptivepath.com/publications/essays/archives/000385.php
by Jesse James Garrett

February 18, 2005

If anything about current interaction design can be called “glamorous,” it’s creating Web applications. After all, when was the last time you heard someone rave about the interaction design of a product that wasn’t on the Web? (Okay, besides the iPod.) All the cool, innovative new projects are online.

Despite this, Web interaction designers can’t help but feel a little envious of our colleagues who create desktop software. Desktop applications have a richness and responsiveness that has seemed out of reach on the Web. The same simplicity that enabled the Web’s rapid proliferation also creates a gap between the experiences we can provide and the experiences users can get from a desktop application.

That gap is closing. Take a look at Google Suggest. Watch the way the suggested terms update as you type, almost instantly. Now look at Google Maps. Zoom in. Use your cursor to grab the map and scroll around a bit. Again, everything happens almost instantly, with no waiting for pages to reload.

Google Suggest and Google Maps are two examples of a new approach to web applications that we at Adaptive Path have been calling Ajax. The name is shorthand for Asynchronous JavaScript + XML, and it represents a fundamental shift in what’s possible on the Web.

Defining Ajax

Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates:

The classic web application model works like this: Most user actions in the interface trigger an HTTP request back to a web server. The server does some processing — retrieving data, crunching numbers, talking to various legacy systems — and then returns an HTML page to the client. It’s a model adapted from the Web’s original use as a hypertext medium, but as fans of The Elements of User Experience know, what makes the Web good for hypertext doesn’t necessarily make it good for software applications.

Ajax Overview 1

Figure 1: The traditional model for web applications (left) compared to the Ajax model (right).

This approach makes a lot of technical sense, but it doesn’t make for a great user experience. While the server is doing its thing, what’s the user doing? That’s right, waiting. And at every step in a task, the user waits some more.

Obviously, if we were designing the Web from scratch for applications, we wouldn’t make users wait around. Once an interface is loaded, why should the user interaction come to a halt every time the application needs something from the server? In fact, why should the user see the application go to the server at all?

How Ajax is Different

An Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary — an Ajax engine — between the user and the server. It seems like adding a layer to the application would make it less responsive, but the opposite is true.

Instead of loading a webpage, at the start of the session, the browser loads an Ajax engine — written in JavaScript and usually tucked away in a hidden frame. This engine is responsible for both rendering the interface the user sees and communicating with the server on the user’s behalf. The Ajax engine allows the user’s interaction with the application to happen asynchronously — independent of communication with the server. So the user is never staring at a blank browser window and an hourglass icon, waiting around for the server to do something.

Ajax Overview 2

Figure 2: The synchronous interaction pattern of a traditional web application (top) compared with the asynchronous pattern of an Ajax application (bottom).

Every user action that normally would generate an HTTP request takes the form of a JavaScript call to the Ajax engine instead. Any response to a user action that doesn’t require a trip back to the server — such as simple data validation, editing data in memory, and even some navigation — the engine handles on its own. If the engine needs something from the server in order to respond — if it’s submitting data for processing, loading additional interface code, or retrieving new data — the engine makes those requests asynchronously, usually using XML, without stalling a user’s interaction with the application.

Who’s Using Ajax

Google is making a huge investment in developing the Ajax approach. All of the major products Google has introduced over the last year — Orkut, Gmail, the latest beta version of Google Groups, Google Suggest, and Google Maps — are Ajax applications. (For more on the technical nuts and bolts of these Ajax implementations, check out these excellent analyses of Gmail, Google Suggest, and Google Maps.) Others are following suit: many of the features that people love in Flickr depend on Ajax, and Amazon’s A9.com search engine applies similar techniques.

These projects demonstrate that Ajax is not only technically sound, but also practical for real-world applications. This isn’t another technology that only works in a laboratory. And Ajax applications can be any size, from the very simple, single-function Google Suggest to the very complex and sophisticated Google Maps.

At Adaptive Path, we’ve been doing our own work with Ajax over the last several months, and we’re realizing we’ve only scratched the surface of the rich interaction and responsiveness that Ajax applications can provide. Ajax is an important development for Web applications, and its importance is only going to grow. And because there are so many developers out there who already know how to use these technologies, we expect to see many more organizations following Google’s lead in reaping the competitive advantage Ajax provides.

Moving Forward

The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. Instead, the challenges are for the designers of these applications: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities.

It’s going to be fun.

恢复右键选择程序菜单


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Unknown]
"AlwaysShowExt"=""
"QueryClassStore"=""

[HKEY_CLASSES_ROOT\Unknown\shell]
@="openas"http://www2.blogger.com/post-edit.g?blogID=8109365118321759065&postID=7306457034404277812#
文章选项

[HKEY_CLASSES_ROOT\Unknown\shell\openas]

[HKEY_CLASSES_ROOT\Unknown\shell\openas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,25,00,53,\
00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,\
79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,65,00,6c,00,6c,\
00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,4f,00,70,00,65,00,6e,00,41,00,\
73,00,5f,00,52,00,75,00,6e,00,44,00,4c,00,4c,00,20,00,25,00,31,00,00,00

星期五, 九月 29, 2006

恢复查看隐藏文件选项

将下面代码保存为reg文件,添加到注册表

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden]
"Text"="@shell32.dll,-30499"
"Type"="group"
"Bitmap"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,53,00,\
48,00,45,00,4c,00,4c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,34,00,00,\
00
"HelpID"="shell.hlp#51131"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN]
"RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"
"Text"="@shell32.dll,-30501"
"Type"="radio"
"CheckedValue"=dword:00000002
"ValueName"="Hidden"
"DefaultValue"=dword:00000002
"HKeyRoot"=dword:80000001
"HelpID"="shell.hlp#51104"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL]
"RegPath"="Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"
"Text"="@shell32.dll,-30500"
"Type"="radio"
"CheckedValue"=dword:00000001
"ValueName"="Hidden"
"DefaultValue"=dword:00000002
"HKeyRoot"=dword:80000001
"HelpID"="shell.hlp#51105"

星期二, 九月 19, 2006

修复identity 类型字段数据的跳跃(译)

内容提要

1、引言
2、dbcc object_atts
3、下载'sp_identity' 存储过程
4、使用sp_identity显示使用identity 类型字段的表
5 使用sp_identity显示当前表的 identity 数字
6、使用sp_identity 修改表的 identity数字

1引言
在sybase 中,有一个使用未公开的dbcc 命令 ,即 dbcc object_atts 快速修复identity 跳跃的方法,因为 dbcc

object_atts 比较难于使用,而存储过程 sp_identity 更容易完成你的问题
警告:本文的方法没有出现在sybase 发布的文档中,并且没有被 sybase 支持,使用与否取决定你自己,如果出现问题,不能从
sybase 技术支持那里得到帮助



2、dbcc object_atts
dbcc object_atts 命令提供了 一个访问 OAM 页的后门,在 OMA 中,保存了表的 identity 计数器。
不幸的是,这个命令在文档中几乎没有任何说明,并且很难使用,其语法如下:
dbcc object_atts (table_name, 0, {get|put}, [ new_value ] )
第一个参数 :表名,第二个参数 0,
第三个参数: get ---显示 保存在 OMA 中的 identity 值
或 put ---设置 OMA 中的 identity 值,设置的具体数据为 第四个参数数据
第四个参数 :新设置的数

主要的问题是 dbcc object_atts 显示的数据为 16字节的 16进制字符,你必须自己解释为10进制,并且,如何解释依赖于

identity 列的长度,同样,设置它也是。在实际环境中,很少作为首选。
幸运的是,有一个存储过程 sp_identity 能够处理编码与解码, 并且给出所有含 identity 列的表的情况

下载 'sp_identity'
sp_identity 只支持 11。0 以后版本,下载文件中包含两个版本,一个用于 ASE 11.9/11.5/11.0 的叫

,sp_identity.119.sql,另外一个用于ASE 12.0及以后版本(sp_identity.120.sql)

4、使用sp_identity显示使用identity 类型字段的表
sp_identity 有几个不同的功能,不带任何参数运行,只显示当前数据库中 包含 identity 列的表,
以及最大可能的 identity 跳跃

1> sp_identity
2> go
Tables with an identity column in database '':

Owner.Table.Column datatype Maximum Identity Gap
------------------------------- -------------------------------
dbo.invoices.inv_nr numeric(18) 500000000000000 (burn)
dbo.small_gap_tab.a numeric(30) 10 (identity_gap)
dbo.my_table.n numeric(6) 500 (burn)


(burn) 表示 identity列的 一次取数由系统参数"identity burning set factor" 决定,而
(identity_gap) 表示 该表有自定义的identity_gap 属性


5 使用sp_identity显示当前表的 identity 数字
确定当前特定表的OAM 页的identity 值,必须按照以下三步过程:
首先 打开跟踪标志 3604 (运行 dbcc traceon(3604) )
运行 指定特定表名运行 sp_identity
  1> sp_identity invoices
2> go
Table = invoices (id=1804533462)
Identity column = a numeric(18)
Max. Identity Gap = 500000000000000
("identity burning set factor" = 5000 = 0.05%)

Reading identity value from OAM page...
object_atts:get:return value=1
0207E20C: 0001c6bf 52634001 00000000 00000000 ....Rc@.........
0207E21C: .
DBCC execution completed. If DBCC printed error messages,
contact a user with System Administrator (SA) role.

这个 16字节的 16进制字符串是 OAM 中保存的 identity 值 (0001c6bf 52634001 00000000 00000000)

再次运行 sp_identity ,并且 指定这个字符串参数

1> sp_identity invoices, "0001c6bf 52634001 00000000 0000000"
2> go
Table = invoices (id=1804533462)
Identity column = a numeric(18)
Max. Identity Gap = 500000000000000
("identity burning set factor" = 5000 = 0.05%)

Decoded identity value on OAM page = 500000000000001
(hex=0001c6bf52634001)


现在,我们得到并解码了 OAM 中的 identity 值,但它意味着什么呢?
首先,如果你用 "with nowait" 停止服务器,这个 identity 列将跳跃多少。而不是表中数据的下一个。
而是保存在 OAM 中的数据加上 identity 种子设顶数(在 ASE 12.0, 为identity_gap 选项)
另外,当你运行 ASE 12.0, 可以通过运行 dbcc listoam看到这个数据

6、使用sp_identity 修改表的 identity数字
使用 sp_identity , OAM 中identity 的 数字可以被设置为任意数. 这个需要如下步骤:
1、确认你要设置的数据(查看表中identity 的数据应该到多少,比如 10033 )
2、正常停止服务器
3 重新启动服务器,以单用户模式,或者不让用户访问
4、 运行 sp_identity table_name, null, new_value ;
  1> sp_identity invoices, null, 10032
2> go
Table = invoices (id=1804533462)
Identity column = a numeric(18)
Max. Identity Gap = 500000000000000
("identity burning set factor" = 5000 = 0.05%)

object_atts:put:return value=1
DBCC execution completed. If DBCC printed error messages,
contact a user with System Administrator (SA) role.

Identity value on OAM page has been set to 10032
(hex=0x00000000000027300000000000000000)
You should now do a 'shutdown with nowait' immediately.
After restarting the server, the value assigned to the
next row inserted into 'invoices' will be 10033.


5 然后立即运行 'shutdown with nowait' ,这样 表的下一个 identity 数字是 10033
6 重新正常启动sybase 服务


说明:如果你应用了 identity 数据类型,并且要求identity 列保持连续,并且数据量很大,那么,用这个方法需要的时间可能比较短
否则不推荐使用。



下面是SP_IDENTITY.120.SQL,用于 12.0 以后版本
/*
* SP_IDENTITY.120.SQL - version for ASE 12.0 or later
* (when running ASE 11.9/11.5/11.0, install SP_IDENTITY.119.SQL instead)
*
* Description
* ===========
* This file contains the stored procedure 'sp_identity', which performs some
* useful functions w.r.t. identity columns:
*
* - displays all tables with an identity column in the current database
* - displays the identity value stored on a table's OAM page
* - resets the identity value stored on a table's OAM page
*
* For details and background, see http://www.sypron.nl/idfix.html .
*
*
* Installation
* ============
* Execute this script using "isql", using a login having both "sa_role"
* and "sso_role".
* The stored procedure will be created in the sybsystemprocs database.
*
*
* Notes
* =====
* - Traceflag 3604 should be enabled before running sp_identity for a
* specific table ("dbcc traceon(3604)"); if omitted, you won't see
* any output.
*
* - To run sp_identity for a specific table, sa_role and sybase_ts_role
* are required.
*
* - sp_identity was successfully tested on ASE versions 11.0.3, 11.5,
* 11.9.2 and 12.0 on various platforms.
*
* - sp_identity will not work on ASE 11.0 because this version
* does not support the 'case' expression.
*
* - sp_identity was not tested on a 64-bit ASE version.
*
*
* Revision History
* ================
* Version 1.0 17-Dec-2000 First version
* Version 1.1 Oct-2002 Handle identity_gap=NULL (thanks to Alan Cooper),
* and some small improvements for installation
* Version 1.2 Apr-2003 Improved installation
*
*
* Copyright Note & Disclaimer :
* =============================
* This software is provided "as is"; there is no warranty of any kind.
* While this software is believed to work accurately, it may not work
* correctly and/or reliably in a production environment. In no event shall
* Rob Verschoor and/or Sypron B.V. be liable for any damages resulting
* from the use of this software.
* You are allowed to use this software free of charge for your own
* professional, non-commercial purposes.
* You are not allowed to sell or bundle this software or use it for any
* other commercial purpose without prior written permission from
* Rob Verschoor/Sypron B.V.
* You may (re)distribute only unaltered copies of this software, which
* must include this copyright note, as well as the copyright note in
* the header of each stored procedure.
*
* Note: All trademarks are acknowledged.
*
* Please send any comments, bugs, suggestions etc. to the below email
* address.
*
* Copyright (c) 2000-2002 Rob Verschoor/Sypron B.V.
* P.O.Box 10695
* 2501 HR Den Haag
* The Netherlands
*
* Email: rob@sypron.nl
* WWW : http://www.sypron.nl/
*----------------------------------------------------------------------------
*/


set nocount on
go
set flushmessage on
go

use sybsystemprocs
go

-- we need to be at ASE 12.0 or later; if not, abort this script
if isnull(object_id("master.dbo.sysqueryplans"),99) >= 99
begin
print ""
print ""
print "********************************************"
print "********************************************"
print " This script is for ASE 12.0 or later."
print " Please install SP_IDENTITY.119.SQL instead."
print "********************************************"
print "********************************************"
print " "
print " "
print ""
set background on -- terminate this script now
end
go

print ""
print "Installing 'sp_identity'..."
print ""
go

if object_id("sp_identity_help") <> NULL
begin
drop proc sp_identity_help
end
go

create proc sp_identity_help
/* Copyright (c) 2000-2002 Rob Verschoor/Sypron B.V. */
as
begin
print " "
print " Usage: sp_identity table_name, ""hex-string-from-OAM-page"", new-identity-value "
print " Notes: "
print " - specifying only parameter 1 retrieves the current identity value for"
print " that table from the OAM page as a hexadecimal string."
print " - specifying this hexadecimal string as the second parameter (in quotes)"
print " will decode the hex value to a numeric value."
print " - specifying a numeric value for the third parameter will set that"
print " value as the new identity value for this table."
print " - parameters 2 and 3 cannot be specified together: one of them must be NULL."
print " - ""dbcc traceon(3604)"" must be run before using option 2 or 3"
print " "
print " Copyright (c) 2000-2002 Rob Verschoor/Sypron B.V."
print " See http://www.sypron.nl/idfix.html for background information & updates."
print " "
end
go

grant execute on sp_identity_help to public
dump tran sybsystemprocs with truncate_only
go

if object_id("sp_identity") <> NULL
begin
drop proc sp_identity
end
go

create proc sp_identity
/* Copyright (c) 2000-2002 Rob Verschoor/Sypron B.V. */
@p0 varchar(50) = NULL, -- table name
@p1 varchar(50) = NULL, -- hex value to decode
@p2 numeric(38) = NULL -- new value to set
as
begin
set nocount on
declare @n numeric(38), @j numeric(38), @n256 numeric(3), @n10 numeric(38)
declare @i int, @max int, @idlen int, @idlenb int, @ib int, @len int
declare @p0_id int, @b int, @b1 binary(1), @lsb int
declare @idgap int, @idburn int, @maxidgap numeric(38), @max1 int, @max2 int
declare @idburnpct numeric(5,2), @v int, @ntab int
declare @c2 char(2), @doampg int, @indid int, @dbname varchar(32)
declare @vc50 varchar(50), @colname varchar(32), @vb16 varbinary(16)

select @dbname = db_name()

-- check version
select @v = 0
if exists (select * from sysobjects
where name = "sysqueryplans" and type = "S")
begin
select @v = 12
end

if @p0 = '?'
begin
exec sp_identity_help
return 0
end

-- numeric values
select @n256 = 256
select @n10 = 10

-- id burning set factor
select @idburn = value from master.dbo.syscurconfigs where config=141
select @idburnpct = convert(numeric(5,2), @idburn * 0.00001)

-- figure out msb/lsb
select @lsb = 0
if substring(convert(binary(4), 1), 1 ,1) = 0x01 select @lsb = 1
if substring(convert(binary(4), 1), 2 ,1) = 0x01 select @lsb = 2
if substring(convert(binary(4), 1), 3 ,1) = 0x01 select @lsb = 3
if substring(convert(binary(4), 1), 4 ,1) = 0x01 select @lsb = 4

-- get all tables containing identity columns in this database
select id = so.id, owner = su.name, uid = so.uid, so.name, si.doampg, si.indid, idgap =

isnull(si.identitygap,0),
colname = sc.name, sc.prec, maxgap = convert(numeric(38), ceiling((@idburn * 0.0000001) *

power(@n10,prec)))
into #id
from sysindexes si, syscolumns sc, sysobjects so, sysusers su
where si.indid < 2
and so.type = "U"
and sc.status & 128 = 128
and so.id = sc.id
and so.id = si.id
and so.uid = su.uid
select @ntab = @@rowcount

set arithabort numeric_truncation off

if @p0 = null
begin
-- display all tables with identity columns in the current DB
if @ntab = 0
begin
print " There are no tables with an identity column in database '%1!'", @dbname
return 0
end
print " Tables with an identity column in database '%1!':", @dbname
print " "
select @max1 = max(char_length(owner + "." + name + "." + colname)) + 12 from #id
select @max2 = max(char_length(convert(varchar(38), maxgap))) + 7 from #id

if @max1 <= 52 and @max2 <= 24
begin
select convert(varchar(52), owner + "." + name + "." + colname + " numeric(" +

convert(varchar(2),prec) + ")") "Owner.Table.Column datatype",
convert(varchar(24), case when idgap = 0 then convert(varchar(38),maxgap) + "

(burn)"
else convert(varchar, idgap) + " (identity_gap)"
end) "Maximum Identity Gap"

from #id
order by name
end
else
if @max1 <= 32 and @max2 <= 44
begin
select convert(varchar(32), owner + "." + name + "." + colname + " numeric(" +

convert(varchar(2),prec) + ")") "Owner.Table.Column datatype",
convert(varchar(44), case when idgap = 0 then convert(varchar(38),maxgap) + "

(burn)"
else convert(varchar, idgap) + " (identity_gap)"
end) "Maximum Identity Gap"

from #id
order by name
end
else
begin
select convert(varchar(78), owner + "." + name + "." + colname + " numeric(" +

convert(varchar(2),prec) + ")") "Owner.Table.Column datatype",
convert(varchar(50), case when idgap = 0 then convert(varchar(38),maxgap) + "

(burn)"
else convert(varchar, idgap) + " (identity_gap)"
end) "Maximum Identity Gap"
from #id
order by name
end

print " "
print " Legend:"
print " (burn) : gap size is determined by ""identity burning set factor"" "
if @v = 12
begin
print " (identity_gap) : gap size is determined by the ""identity_gap"" setting"
end
print " "
print " Current value for ""identity burning set factor"" = %1! (=%2!%%)", @idburn, @idburnpct


return 0
end

if charindex("sa_role", show_role()) = 0
begin
print "You must have 'sa_role' to run this procedure."
return -1
end

if charindex("sybase_ts_role", show_role()) = 0
begin
print "You must have 'sybase_ts_role' to run this procedure."
return -1
end

-- get some info on the object
select @p0_id = object_id(@p0)
if @p0_id = NULL
begin
print " Error: '%1!' is not a user table.", @p0
return -1
end

if @p0 not like "%.%"
begin
select @ntab = count(*) from sysobjects where name = @p0 and type = "U"

if @ntab > 1
begin
print " %1! tables named '%2!' exist in this database:", @ntab, @p0
print " "
select owner + "." + name "owner.table_name"
from #id where name = @p0 order by uid
print " "
print " Specify 'owner.table_name' to identify the table."
return -1
end
end

select @doampg = doampg, @indid = indid, @idgap = idgap
from #id where id = @p0_id

if not exists (select 1 from syscolumns where id = @p0_id and status & 128 = 128)
begin
print " Error: Table '%1!' does not have an identity column", @p0
return -1
end

-- retrieve the length of the numeric identity column as declared when the
-- table was created

select @len = prec, @colname = name
from syscolumns where id = @p0_id and status & 128 = 128
if @@rowcount = 0
begin
print " Error: Could not retrieve length of identity column for table '%1!'", @p0
return -1
end

select @idlen = @len -- column precision (positions)
select @idlenb = (@idlen+1-((@idlen+5)/12)-(@idlen/12))/2 -- column length (bytes)

print " "
print " Table = %1! (id=%2!)", @p0, @p0_id
print " Identity column = %1! numeric(%2!)", @colname, @len
--print " OAM page = %1!", @doampg
--print " Bytes on OAM page = %1!", @idlenb

if @idgap > 0
begin
print " Max. Identity Gap = %1! (""identity_gap"" = %2!)", @idgap, @idgap
end
else
begin
set arithabort numeric_truncation off
select @maxidgap = ceiling((convert(numeric(38),@idburn) * 0.0000001) * power(@n10,@len))
print " Max. Identity Gap = %1!", @maxidgap
print " (""identity burning set factor"" = %1! = %2!%%)", @idburn, @idburnpct
if @v = 12
begin
print " (Note: ""identity_gap"" has not been set for this table !)"
end
end
print " "

if @p1 = NULL and @p2 = NULL -- retrieve current ID value
begin
print " "
print " Reading identity value from OAM page... (traceflag 3604 should be enabled !)"
print " "
dbcc object_atts (@p0, 0, get)
print " "
print " To decode this hexadecimal value, re-run 'sp_identity' with the hexadecimal"
print " string as a quoted 2nd parameter (you can leave the spaces in). "
print " Example: sp_identity %1!, ""the-hex-string-from-the-above-output"" ", @p0
print " "
--
-- only for 12.0+, dbcc listoam will display the values in the OAM and the DES
--
--dbcc listoam(@dbname, @p0_id, @indid)
--

return 0
end

if upper(@p1) like "[ 0-9A-F]%" -- entered a hex string, decode it
begin

if @p2 != NULL
begin
print " Error: When decoding a hex value from the OAM page, parameter 3"
print " (the new identity value) must be NULL."
exec sp_identity_help
return -1
end

select @ib = @idlenb -- counts bytes
select @i = char_length(@p1) -- counts string
select @n = 0 -- holds result

while 1 = 1
begin
select @c2 = substring(@p1, (char_length(@p1)-@i)+1, 2)

--print "Step %1!, [%2!]", @ib, @c2
if upper(substring(@c2,1,1)) = " " -- ignore single space pasted in by user
begin
select @i = @i - 1
continue
end

if (upper(@c2) not like "[0-9A-F][0-9A-F]")
begin
print " Error: Invalid characters (%1!) in hex string", @c2
break
end

-- add this byte to the result
select @vc50 = @vc50 + @c2
select @j = power(@n256, (@ib-1))
select @n = @n + @j * hextoint("0x" + @c2)
--print "Step %1!, exp= %2!, result = %3!", @ib, @j, @n

-- next byte

select @ib = @ib - 1
if @ib = 0 break -- ready

-- next 2 chars
select @i = @i - 2
if @i = 0
begin
-- we shouldn't have got here, error
print " Error: ID column length and specified hex string do not match !"
break
end
end

if @ib = 0
begin
print " Decoded identity value on OAM page = %1!", @n
print " (hex= %1!)", @vc50
print " "
return 0
end
else
begin
print " Error: Aborted due to error."
return -1
end
end

if @p2 != NULL -- entered a new ID value, set it
begin

if @p1 != NULL
begin
print " Error: When setting a new identity value, parameter 2"
print " (the hex string from the OAM page) must be NULL."
exec sp_identity_help
return -1
end

-- set the new ID value
if @p2 <= 0
begin
print " Error: The new identity value must be >= 0."
print " "
exec sp_identity_help
return -1
end

if char_length(convert(varchar, @p2)) > @idlen
begin
select @vc50 = replicate("9", @idlen)
print " Error: New identity value (%1!) is too large", @p2
print " for this identity column. The maximum possible value", @p2
print " is %1! (%2! positions).", @vc50, @idlen
return -1
end

if @lsb = 0
begin
print " "
print "Internal error in 'sp_identity':"
print "Cannot figure out byte order on this platform."
print "Please send a note to 'rob@sypron.nl' with the text of this"
print "error and your @@version string."
return -1
end

-- convert the numeric value to hex
select @ib = @idlenb -- counts bytes
select @i = 15

select @vc50 = NULL -- holds result
select @vb16 = NULL -- holds result
select @n256 = 256
select @n = @p2
set arithabort numeric_truncation off

while 1 = 1
begin
select @j = power(@n256, @i)

select @b = @n / @j
select @n = @n - (@b * @j)
select @c2 = right(inttohex(@b),2)
select @b1 = substring(convert(binary(4), @b), @lsb,1)

select @vb16 = @vb16 + @b1

--print "Step %1!, @b=%2!, hex(c2)=%3!, hex(b1)=%5!, result=%4!", @i, @b, @c2, @vb16, @b1

select @i = @i - 1
if @i < 0 break -- ready
end

if @i < 0
begin
select @vb16 = substring(@vb16, 16 - (@idlenb) + 1, (@idlenb) ) + substring(@vb16, 1, 16 -

(@idlenb) )

-- set the new ID value
dbcc object_atts(@p0, 0, "put", @vb16)

print " "
print " Identity value on OAM page has been set to %1!", @p2
print " (hex= %1!)", @vb16
print " "
select @p2 = @p2 + 1
print " You should now do a 'shutdown with nowait' immediately."
print " After restarting the server, the value assigned to the next row "
print " inserted into '%1!' will be %2!.", @p0, @p2
print " "
return 0
end
else
begin
print " Error: Aborted due to error."
return -1
end

end

-- we should never get here
print "Internal error in 'sp_identity': Reached invalid end of procedure."
return -1
end
go

grant execute on sp_identity to public
dump tran sybsystemprocs with truncate_only
go


print "Ready. For usage information, run 'sp_identity ""?"" '."
print ""
go

/*
** end
*/

星期五, 九月 15, 2006

Crontab

简介

crontab-计划任务,操作每个用户的守护程序和该执行的时间表。

部分参数说明

crontab file [-u user]-用指定的文件替代目前的crontab。
crontab-[-u user]-用标准输入替代目前的crontab.
crontab-1[user]-列出用户目前的crontab.
crontab-e[user]-编辑用户目前的crontab.
crontab-d[user]-删除用户目前的crontab.
crontab-c dir- 指定crontab的目录。
crontab文件的格式:M H D m d cmd.

M: 分钟(0-59)。
H:小时(0-23)。
D:天(1-31)。
m: 月(1-12)。
d: 一星期内的天(0~6,0为星期天)。
cmd要运行的程序,程序被送入sh执行,这个shell只有USER,HOME,SHELL这三个环境变量。

(月、日、周、时、分)运行。我们以root的crontab 为例。根用户的 crontab 文件放在
/var/spool/crontab/root 中,其格式如下:

分   时   日   月  周  用户 所要运行的程序
0   0   *   *   3   /usr/bin/updatedb
1. 分钟 (0-60)
   2. 小时 (0-23)
      3. 日 (1-31)
       4. 月 (1-12)
       5. 星期 (1-7)
       6. 所要运行的程序

下面是一个例子文件:

#MIN HOUR DAY MONTH DAYOFWEEK COMMAND
#每天早上6点10分
10 6 * * * date

#每两个小时
0 */2 * * * date

#晚上11点到早上8点之间每两个小时,早上8点
0 23-7/2,8 * * * date

#每个月的4号和每个礼拜的礼拜一到礼拜三的早上11点
0 11 4 * mon-wed date

#1月份日早上4点
0 4 1 jan * date

范例
$crontab -l 列出用户目前的crontab.
#MIN HOUR DAY MONTH DAYOFWEEK COMMAND
10 6 * * * date
0 */2 * * * date
0 23-7/2,8 * * * date

配置 cron/crontab

crontab:cron是一个永久进程,它由/etc/rc.local启动执行。cron检查/var/spool/cron/crontabs/目 录中的文件,找到所...用户所建立的crontab文件存于/var/spool/cron/crontabs中配置 cron
Contributed by Tom Rhodes.

   FreeBSD 最有用的软件包(utilities)中的一个是 cron(8)。 cron 软件在后台运行并且经常检查 /etc/crontab 文件。cron 软件也检查 /var/cron/tabs 目录,搜索新的 crontab 文件。这些 crontab 文件存储一些 cron 在特定时间执行任务的信息。

  cron 程序使用两种不同类型的配置文件, 即系统 crontab 和用户 crontabs。 两种格式的唯一区别是第六个字段。 在系统 crontab 中,第六个字段是用于执行命令的用户名。 这给予了系统 crontab 以任意用户身份执行命令的能力。 在用户 crontab 中, 第六个字段是要执行的命令,所有的命令都会以这个用户自 己的身份执行; 这是一项重要的安全功能。

注意: 同其他用户一样, root 用户也可以有自己的 crontab。 它不同于 /etc/crontab (也就是系统 crontab)。由于有系统 crontab 的存在, 通常并不需要给 root 建立单独的用户 crontab。

  让我们来看一下 /etc/crontab 文件:

# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.32 2002/11/22 16:13:39 tom Exp $
# (1)
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin (2)
HOME=/var/log
#
#
#minute hour mday month wday who command (3)
#
#
*/5 * * * * root /usr/libexec/atrun (4)

(1)
像大多数 FreeBSD 配置文件一样,# 字符是注释。 这样,就可以编写注释来说明要执行什么操作, 以及这样做的原因。 需要注意的是, 注释应该另起一行,而不能跟命令放在同一行上, 否则它们会被看成命令的一部分。 这个文件中的空行会被忽略。
(2)
首先应该定义环境变量。等号 (=) 字符用来定义任何环境变量,像这个例子用到了 SHELL,PATH 和 HOME 变量。如果 shell 行被 忽略掉,cron 将会用默认值 sh。如果 PATH 变量被忽略, 那么就没有默认值并且需要指定文件绝对位置。如果 HOME 被忽略,cron 将用用执行者的 home 目录。
(3)
这一行定义了七个字段。它们是 minute、 hour、mday、 month、 wday、 who 和 command。 它们差不多已经说明了各自的用处。Minute 是命令要运行时的分钟,Hour 跟 minute 差不 多,只是用小时来表示。Mday 是每个月的天。Month 跟 hour 还有 minute 都差不多,用月份来表示。wday 字段表示星期几。所 有这些字段的值必须是数字并且用24小时制来表示。“who” 字段是特别的,并且只在 /etc/crontab 文件中存在。这个字段指定了命令应该 以哪个用户的身份来运行。当一个用户添加了他(她)的 crontab 文件的时候,他们就会没有这个字段选项。最后,是 command 字段。这是最 后的一个字段,所以自然就是它指定要运行的程序。
(4)
最后一行定义了上面所说的值。注意这里我们有一个 */5 列表,紧跟着 是一些 * 字符。* 字符代表“开始到最后”, 也可以被解释成 每次。所以,根据这行, 显然表明了无论在何时每隔 5 分钟以 root 身份来运 行 atrun 命令。查看 atrun(8) 手册页以获得 atrun 的更多信息。

命令可以有任意多个传递给它们的标志。无论怎样,扩展到多行的命令应该用反斜线(“\”)来续行。

  这是每个 crontab 文件的基本设置,虽然它们有一个不同。第六行我们指定的用户名只存在于系统 /etc/crontab 文件。这个字段在普通用户的 crontab 文件中应该被忽略。
11.6.1 安装 Crontab

重要: 绝对不要用这种方法来编辑/安装系统 crontab。您需要做的只是使用自己喜欢的编辑器: cron 程序会注意到文件发生了变化, 并立即开始使用新的版本。参见 这个 FAQ 项目 以了解进一步的情况。

  要安装刚写好的用户 crontab,首先使用最习惯的编辑器来创建一个符合要求格式的文件,然后用 crontab 程序来完成。最常见的用法是:

% crontab crontab-file

  在前面的例子中, crontab-file 是一个事先写好的 crontab。

  还有一个选项用来列出安装的 crontab 文件: 只要传递 -l 选项给 crontab 然后看一下输出。

  用户想不用模板(已经存在的文件)而直接安装他的 crontab 文件,用 crontab -e 选项也是可以的。它将会启动一个编辑器并且创建一个新文件,当这个文件被保存的时候, 它会自动的用 crontab 来安装这个文件。

  如果您稍后想要彻底删除自己的用户 crontab 可以使用 crontab 的 -r 选项。

Crontab - Quick reference

Crontab - Quick reference

Setting up cronjobs in Unix and Solaris

cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris.
Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.

1. Crontab Restrictions
____________
You can execute crontab if your name appears in the file
/usr/lib/cron/cron.allow. If that file does not exist, you can use
crontab if your name does not appear in the file
/usr/lib/cron/cron.deny.
If only cron.deny exists and is empty, all users can use crontab. If neither file exists, only the root user can use crontab. The allow/deny files consist of one user name per line.


2. Crontab Commands
__________
export EDITOR=vi ;to specify a editor to open crontab file.

crontab -e Edit your crontab file, or create one if it doesn't already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)

3. Crontab file
___________
Crontab syntax :-
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.

* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)

* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).

Note: The specification of days can be made in two fields: monthday and weekday. If both are specified in an entry, they are cumulative .

4. Crontab Example
_______

A line in crontab file like below removes the tmp files from /home/someuser/tmp each day at 6:30 PM.

30 18 * * * rm /home/someuser/tmp/*

Changing the parameter values as below will cause this command to run at different time schedule below :

min hour day/month month day/week Execution time
30 0 1 1,6,12 * -- 00:30 Hrs on 1st of Jan, June & Dec.

:

0 20 * 10 1-5 --8.00 PM every weekday (Mon-Fri) only in Oct.

:

0 0 1,10,15 * * -- midnight on 1st ,10th & 15th of month

:

5,10 0 10 * 1 -- At 12.05,12.10 every Monday & on 10th of every month
:

Note : If you inadvertently enter the crontab command with no argument(s), do not attempt to get out with Control-d. This removes all entries in your crontab file. Instead, exit with Control-c.

5. Crontab Environment
___________
cron invokes the command from the user's HOME directory with the shell, (/usr/bin/sh).
cron supplies a default environment for every shell, defining:
HOME=user's-home-directory
LOGNAME=user's-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh

Users who desire to have their .profile executed must explicitly do so
in the crontab entry or in a script called by the entry.

6. Disable Email
____________

By default cron jobs sends a email to the user account executing the cronjob. If this is not needed put the following command At the end of the cron job line .

>/dev/null 2>&1


7. Generate log file
________________

To collect the cron execution execution log in a file :

30 18 * * * rm /home/someuser/tmp/* > /home/someuser/cronlogs/clean_tmp_dir.log

浅谈Sybase 数据库的备份方案

Sybase数据库产品自从1987年问世以来,它的客户机 /服务器(client/server)工作模式、分布处理的基础体系结构、完善的安全保密性能、高速快捷的运行方式、多平台跨操作系统的广泛应用等优 点,迅速被IT界接受并推广应用。我们作为金融业的用户,也在1995年开始使用Sybase10版本。在具体的使用中,发现集中式的数据管理有其优点, 就是数据风险范围大为缩小,但是作为Sybase的服务器一端,数据风险比较集中,如何做好数据库的数据备份,成为至关重要的问题。

在实际应用中,我们总结出了两种全量备份方案:

一、使用Sybase的Backup Server(备份服务器),做Dump备份
   转储数据库(Dump database),就是为整个数据库(包括数据、表结构、触发器、游标、存储过程、事务日志等)做一次物理备份。转储数据库时,系统自动执行一次 checkpoint,即将日志和数据从缓冲区拷贝到硬盘(只拷贝脏页),把已被分配的页(日志和数据)转储到设备。

命令格式为:
   dump database 数据库名 to 设备文件名 with 参数

如果备份到硬盘的文件上,可以不预先估算备份文件的 大小,只要硬盘有足够的存储空间就可以。如果是备份到dds磁带上,那么就要估算一下备份后的大小,90米的dds磁带压缩存储空间为4G,120米的磁 带压缩存储空间为8G,如果数据库的备份文件超过了这个尺寸,就要考虑多文件转储,使用stripe参数。

命令格式为:
  dump database 数据库名 to 设备文件名1
  stripe on 设备文件名2
  stripe on 设备文件名3……
  with 参数

这种数据备份方式是将整个数据库的运行环境完整的复 制一份,包括数据库的脏页和碎片,在使用load命令恢复时,只能恢复到同样大小的数据库中(数据和日志的大小都只能和原来完全一致),适用于在每天的日 终营业网点下班后的日常备份。优点是数据库完整无误,缺点是不能直接查看备份内容。

二、分数据结构和数据记录做两次备份
  
在一般情况下,生产机的数据库都比较庞大,而实验机则相对较小,难以在实验环境中以load命令恢复工作机的内容。所以,在工作实践中,我们摸索出了第二种全量备份方案。

1、数据结构备份
   在windows 平台的Sybase SQL Server Manager(数据库管理)平台中选择ServeràGenerate ddl则产生整个数据库服务器的所有信息,如果选择databaseàgenerate ddl则产生所选定数据库的信息,以master库为例,产生的文件主要包括:config.ddl(配置)、devices.ddl(设备)、 database.ddl(数据库)、logins.ddl(用户)、remote.ddl(远程)、cache.ddl(缓冲)、 segment.ddl()、group.ddl(用户组)、user.ddl(用户)、default.ddl(确省)、rule.ddl(规则)、 udt.ddl、table.ddl(表)、view.ddl(视图)、proc.ddl(存储过程)、triger.ddl(触发器)。

2、数据记录备份
   将数据库各表以Sybase自代的bcp(bulk copy)工具的方式导成一定格式的文本文件,命令格式:

bcp 表名 out 路径名 文件名 -c -t 分隔符 -u (用户名)-p(密码)-S(服务器名)

如果将一个数据库中的所有表都做一个bcp备份,就 需要针对每一个表都做一次bcp,在一般情况下,一个数据库有100多个表,工作量比较大。可以利用数据库中的系统表信息做一个bcp备份脚本。原理是每 一个用户表在系统表中都有信息记载,可以通过isql语句查询得到。现举一例说明:

1)、先编辑一个名为mkbcpout.sql的文件,内容如下:

select "echo bcp '"+name+" out ……………………'

"+"bcp "+name+" out ./+"name+".table -c -t '|' -Uuser -Ppassword -S SERVER" from sysobjects where type='U'

go

2)、执行isql命令,以此文件作为输入,执行结果输出到另外一个文件里:

isql -Uuser -Ppassword -S server -I mkbcpout.sql -O bcpout

3)、对bcppout文件稍微修改,增加可执行权限

chmod +x bcpout

4)、执行bcpout,导出数据文本

./bcpout

3、数据库恢复
    业务生产机可能为小型机,而实验开发环境的硬件环境为PC server,安装好win nt或SCO unix下的Sybase服务器后,根据需要创建空间足够大的数据库和tempdb(系统临时数据库),创建数据库用户,并将其更改为此数据库的所有者, 要注意两点:1)此数据库允许bcp拷贝,2)此数据库自动清除log。命令格式为:

1> sp_dboption databasedbname ,"select into/bulkcopy",true

2> go

1> sp_dboption databasename,"trunc log on chkpt",true

2> go

上述两个配置可能与生产机的配置不同。

然后以新创建的数据库用户登录,导入数据结构,注意要首先导入表结构,然后才是存储过程、触发器等等。命令格式:

1、 isql -Uusername -Ppassword -I table.ddl -o error.log.table

2、 isql -Uusername -Ppassword -I proc.ddl -o error.log.proc

 ……

为了提高bcp导入数据的速度,需要将比较大的表的 索引和主键删除,否则的话,每bcp进一条数据,数据库都自动写一条log日志,记载此数据的上一条和下一条记录,确定本记录在此表中的准确位置,一是影 响bcp速度,二是数据库的log飞速膨胀。数据库的自动清除log功能只有在一个事务结束后才起作用。

准备工作做完后,开始倒入数据记录。使用类似做bcpout的方法做一个bcpin的脚本,然后执行:

./bcpin |tee error.bcpin

使用tee管道输出的目的是让计算机完整记录下倒入过程,自动存入error.bcpin文件中,待倒入结束后,我们只需要检查日志文件,不需要一直紧盯着计算机屏幕。
  所有工作做完之后,不要忘记重新将删除的主键和索引建上。
  如果有现成的数据库,只需要单纯地导入数据记录,则首先将数据库中所有用户表(也就是所有type="U"的表)清空,命令格式:

1> truncate table tablename

2> go

当然最好也是利用做bcpout脚本的做一个truncate脚本,通过执行此脚本将所有用户表清空。然后的数据导入、处理索引和主键的过程与上面类似。

三、利用做bcp备份脚本的方法做数据库碎片整理
     Sybase数据库作为联机事务处理应用服务器,每天应用程序都对数据库做大量的插入、修改和删除等操作,不可避免的在数据库的物理存储介质上留下页碎片 和扩展单元碎片,从而影响数据库的存储效率和运行速度。具体表现为:业务繁忙时出现死锁(dead lock),数据库的输入/输出资源被大量占用,业务处理速度慢。其解决办法是:

1、 清空数据库中的所有表,命令格式:
    isql -Uusername -Ppassword -I truncate.sql -o error.truncate

2、 删除所有表的索引和主键
    isql -Uusername -Ppassword -I dropindex.sql -o error.dropindex

3、导入数据
    ./bcpin

4、 添加索引和主键
    isql -Uusername -Ppassword -I addindex.sql -o error.addindex

5、 更新数据库状态
    1> update statistics tablename
    2> go

上述操作都是针对数据库中的所有用户表进行的,利用做bcp备份脚本的方法做出相应的脚本,使繁琐的数据库维护变得简便易行,还克服了直接使用isql语句操作风险大、没有操作日志的毛病。

笔者在实际工作中,使用第一种方法对生产机做日常全 量备份,日终通过unix的crontab定时批量作业(具体做法请参考《中国金融电脑》2001年第10期有关crontab的文章)bcp出全部数 据。使用高档PC server 搭建模拟运行环境,在需要的情况下导入生产机数据,处理运行中后台server的各种问题,待研究出解决办法后再在生产机上做相应调整,这样做风险小,效 果好。

sp_dboption专题


sp_dboption

显示或者更改数据库选项,sp_dboption的更改操作必须在master数据库中进行

sp_dboption <dbname>, <optname>, {true|false}

<optname>用引号包围,选项名称可以简写,只要足够系统识别到唯一的选项。如"READ ONLY"可以简写为"READ"

只有sa和dbo才有权使用sp_dboption更改数据库选项,但是任何用户都可以使用sp_dboption查看数据库选项

SELECT INTO

打开SELECT INTO之后,可以非常方便的对于表中的数据进行批量复制到一个新表,并将新表命名

BULKCOPY

打开BULKCOPY之后,允许SELECT INTO到一个已经存在的表中

READ ONLY

打开READ ONLY之后,数据库只读

AUTO IDENTITY

打开AUTO IDENTITY之后,数据库自动为没有PK,UK,identity列的表格添加一个名为syb_identity_col的numeric(10)的identity列

INDENTITY IN NONUNIQUE INDEX

打开INDENTITY IN NONUNIQUE INDEX之后,数据库自动为不包含PK,UK列的索引添加表中的identity列入索引

星期三, 九月 13, 2006

php5.0.4配置文件简体中文版php.ini

;*******************************************************************************
;************************以下这部分是php.ini-recommended中的内容****************
;*******************************************************************************
[php 5.0.4 php.ini-recommended]
;;;;;;;;;;;;;;;;;
;;关于这个文件 ;;
;;;;;;;;;;;;;;;;;
; 这个版本是推荐使用的、PHP5风格的php.ini版本。
; 这个版本使用了一些非标准设置,目的是使PHP更加高效、安全,鼓励更加整洁的代码,
; 代价是可能与某些程序不兼容,并给开发带来难度。我们鼓励在正式发布网站时使用这个
; 配置。
; 所有与默认不同的设置都有明显的注明,你可以决定是否使用与默认不同的设置。
; 有关php.ini的普通说明请参考php安装文件夹下的php.ini-dist文件。
; 这个文件和php.ini-dist不同,有些参数的设置改变了,这样做是为了提高性能和保障安
; 全。
; 请确认你阅读了不同之处,并且修改过你的脚本,再采用这个版本的配置文件。
;-----------------------------------------------------------------
;> register_globals = Off [安全,性能]
; 不再为输入数据注册全局变量(POST, GET, cookies, 环境变量, 服务器变量)
; 不要使用$foo,而要使用$_REQUEST["foo"](包含任何通过请求传送的数据,即:POST,
; GET, cookies, 环境变量, 服务器变量), 或使用指定的$_GET["foo"], $_POST["foo"],
; $_COOKIE["foo"], $_FILES["foo"](不包含在$_REQUEST数组中), 这取决于请求来自何处
; 同时,你可以查看import_request_variables()函数(将 GET/POST/Cookie 变量导入
; 到全局作用域中)。
; 注意,register_globals将在下一个版本中被废除(默认关闭),因为它总是带来太多的安
; 全问题。
; 请参考 http://php.net/manual/en/security.registerglobals.php 以获得更多信息。
;
;> register_long_arrays = Off [性能]
; 禁用旧式的长式预定义数组($HTTP_*_VARS),取而代之以短式预定义超全局数组。
;
;> display_errors = Off [安全]
; 关闭这个特性,脚本执行期间的错误/警告将不会显示输出,这样就不会将敏感信息暴露
; 给远端用户。
; 一些错误/警告信息会暴露可能被攻击者利用的脚本信息、服务器信息、数据库信息。
; 正式发布网站时应当关闭这个特性。
;
;> log_errors = On [安全]
; 这个指令是上一个指令的补充。
; 脚本执行期间的错误将被记录到日志文件中(比如系统日志),可以有几种不同的配置方法
; 配合将"display_errors"关闭,这个设置可以让你明白那里出了问题,而不会暴露任何敏
; 感信息给远端用户。
;
;> output_buffering = 4096 [性能]
; 设置一个4K的输出缓冲。请用输出缓存可以减少写入动作,有时还能减少传输数据包的大
; 小,这些都有助于提高性能。
; 这个参数的实际收益取很大程度上取决于你使用的是什么Web服务器,使用的是什么样的
; 脚本。
;
;> register_argc_argv = Off [性能]
; 禁止注册有些多余的$argv和$argc全局变量
;
;> magic_quotes_gpc = Off [性能]
; 不将输入的数据用反斜杠进行转义,以便发送给数据库时不需要更多的处理。
; 事实上,你应该对每一个发送到数据库的输入数据使用addslashes()函数。
;
;> variables_order = "GPCS" [性能]
; 使得$_ENV数组中的环境变量不再杂乱无章。
; 你应当使用getenv()函数存取环境变量。
;
;> error_reporting = E_ALL [代码清洁,安全(?)]
; 默认情况下,PHP错误报告等级是E_NOTICE
; E_ALL表示报告所有非致命错误,因为这些错误可能会导致大问题(比如使用了未定义的变
; 量)。
;
;> allow_call_time_pass_reference = Off [代码清洁]
; 禁止默认将函数的参数按引用传递。
; PHP4/5风格的处理办法是在函数声明时指定按引用传递。
;*******************************************************************************
;**************以下这部分是php.ini-dist的内容, ************************
;**************但是包含了与php.ini-recommended的不同之处************************
;*******************************************************************************
[PHP 5.0.4 php.ini-dist]
;;;;;;;;;;
;; 警告 ;;
;;;;;;;;;;
; 这是PHP新安装时的默认设置。默认设置适合于开发但是不适合正式应用。
; 出于安全方面考虑,请在发布正式应用程序时使用php.ini-recommended
; 并且参考如下页面:http://php.net/manual/en/security.php
;;;;;;;;;;;;;;;;;;;
;; 关于 php.ini ;;
;;;;;;;;;;;;;;;;;;;
; 这个文件控制了PHP许多方面的性能和行为。 为了让PHP正确读取这个文件,
; 它必须被命名为'php.ini'。PHP将按照如下顺序依次查找该文件:
; 1.当前工作目录;2.环境变量PHPRC指明的路径;3.编译时指定的路径。
; 在windows下,编译时的路径是Windows的安装目录(C:\WINDOWS等)。
; 在命令行模式下,php.ini的查找路径可以用 -c 参数指定。
;
; 该文件的语法非常简单。空白字符(" ","\t",...)和用分号(";")开始的行被简单地忽略
; 章节标题(例如 : [php])也被简单地忽略,即使将来它们可能有某种意义。
;
; 设置格式如下:
; directive = value
; 指令标识符(directive) 是大小写敏感的! "foo=bar" 不同于 "FOO = bar"。
; 值(value)可以是:
; 1.一个字符串、2.一个数字、3.一个 PHP常量(如:E_ALL, M_PI)、
; 4.一个INI常量(On, Off, True, False, Yes, No, None)、
; 5.一个表达式(如:E_ALL & ~E_NOTICE)、
; 6.用引号括起来的字符串("foo").
;
; INI文件中的表达式仅限于使用位运算符/逻辑非/小括号。
; | 位或
; & 位与
; ~ 位非
; ! 逻辑非
;
; 布尔标志可用 1, On, True, Yes 打开,亦可用 0, Off, False, No 关闭。
;
; 一个空字符串可以用在等号后不写任何东西表示,或者用 none 关键字,举例如下:
; foo = 将foo置为空字符串
; foo = none 将foo置为空字符串
; foo = "none" 将foo置为字符串'none'
;
; 如果你在值设置中使用常量,而这些常量属于动态扩展(PHP扩展或Zend扩展)
; 那么你只能在调入这些动态扩展的行之后使用这些常量。
;
; 所有在 php.ini-dist 文件里设定的值与内建的默认值相同。
; 也就是说,如果 php.ini 不存在,或者你删掉了某些行,默认值与之相同。
;;;;;;;;;;;;;;;
;;; 语言选项 ;;
;;;;;;;;;;;;;;;
engine = On
; 使PHP脚本语言引擎在Apache下有效。
zend.ze1_compatibility_mode = Off
; 允许使用兼容Zend引擎1(PHP 4.x)的模式
short_open_tag = On
; 允许 "<?...?>" 短标识,否则只有"<?php...?>"和"<script>...</script>"才能被识别
; 注意:除非你的php程序只供自己使用,否则请不要使用短标记。
; 如果要和XML结合使用PHP,你可以选择禁用此选项以方便直接嵌入使用 <?xml ?>,
; 不然你必须用PHP来输出:<? echo '<?xml version="1.0"'; ?>
; 本指令也会影响到缩写形式 <?=,它和 <? echo 等价,要使用此缩写必须允许短标识
asp_tags = Off
; 是否允许ASP风格的标记"<% %>",这也会影响到缩写形式:<%= $value %>
precision = 12
;[recommended]->precision = 14
; 浮点型数据显示的有效位数
y2k_compliance = On
; 强制打开2000年适应 (可能在非Y2K适应的浏览器中导致问题)
output_buffering = Off
;[recommended]->output_buffering = 4096
; 输出缓存允许你甚至在输出正文内容之后发送http头(包括cookies)。
; 其代价是输出层减慢一点点速度。
; 你可以在运行期间通过调用输出缓冲函数启用输出缓存。
; 你还可以通过设置"output_buffering=On"来为所有文件启用输出缓存(默认4096)。
; 如果你想指定缓冲区的最大字节数,你可以直接将"On"替换成数字,
; 比如:"output_buffering=4096"指定了缓存上限为4096字节。
;output_handler =
; 你可以将所有脚本输出重定向到一个输出处理函数。
; 比如,重定向到"mb_output_handler"函数时,字符编码将被透明地转换为指定的编码。
; 一旦你在这里指定了输出处理程序,"output_buffering"将被自动打开。
; 注意1: 在编写可移植脚本的时候不能依赖这个指令,而应明确的调用ob_start()函数打
开输出缓存。

; 使用这个指令可能会导致某些你不熟悉的脚本出错。
; 注意2: 你不能同时使用"mb_output_handler"和"ob_iconv_handler"
; 你也不能同时使用"ob_gzhandler"和"zlib.output_compression"
; 注意3: 如果启用了zlib输出压缩,"output_handler"必须为空,取而代之,必须启用
; "zlib.output_handler"。
zlib.output_compression = Off
; 使用zlib库透明地压缩脚本输出结果。
; 该指令的值可以设置为:Off/On/字节数(用来作为压缩缓冲区大小,默认为4KB)
; 如果在php.ini或者apache配置中打开这个功能,当浏览器发送
; "Accept-Encoding: gzip(deflate)"头时,"Content-Encoding: gzip(deflate)"和
; "Vary: Accept-Encoding"头将加入到应答头当中。
; 你可以在答头输出之前用ini_set()函数在脚本中禁止这个特性,如果你输出一个
; "Content-Type: image/"这样的应答头,压缩将不会启用(为了防止Netscape的bug)。
; 你可以在输出"Content-Type: image/"之后使用
; "ini_set('zlib.output_compression', 'On')"重新打开这个特性。
; 注意1: 压缩率会受压缩缓冲区大小的影响,如果你想得到更好的压缩质量,
; 请指定一个较大的压缩缓冲区。
; 注意2: 如果启用了zlib输出压缩,"output_handler"必须为空,取而代之,必须启用
; "zlib.output_handler"。
;zlib.output_handler =
; 在打开"zlib.output_compression"指令的情况下,除这里以外,你不能另外指定输出处
; 理程序。
; 这个指令和"output_handler"起相同的作用,但是顺序不同。
implicit_flush = Off
; 这个指令告诉PHP输出层在每个输出块之后自动刷新自身数据。默认为 FALSE
; 这等效于在每个print()、echo()、HTML块之后自动调用flush()函数。
; 打开这个选项对程序执行的性能有严重的影响,通常只推荐在调试时使用。
; 在CLI SAPI的执行模式下,该标记默认为 TRUE 。
unserialize_callback_func=
; 如果解序列化程序需要实例化一个未定义类,该这里指定的回调函数将以该未定义类的名
; 字作为参数被调用,
; 以免得到不完整的"__PHP_Incomplete_Class"对象。
; 如果这里没有指定函数,或者指定的函数不包含(或实现)那个未定义的类,将会显示一条
; 警告信息。
; 只有在你真想执行这样一个回调函数的情况下,才需要指定该参数的值。
; 可以通过 php.ini、ini_set() 或 .htaccess 定义"unserialize_callback_func"。
; 若要禁止这个特性,只需置空此设定。
serialize_precision = 100
; 将浮点型和双精度型数据序列化存储时,序列化精度指明了有效位数。
; 默认值能够确保浮点型数据被解序列化程序解码时不会有数据丢失。
allow_call_time_pass_reference = On
;[recommended]->allow_call_time_pass_reference = Off
; 强迫函数调用时按引用传递参数。
; php反对使用这一方法,并可能在将来版本的PHP/Zend里不再支持。
; 鼓励的方法是在函数声明里指定哪些参数按引用传递。
; 我们鼓励你尝试关闭这一选项并确认你的脚本仍能正常工作,以保证你的脚本在将来版本
; 的语言里仍能正常工作。
; (每次使用此特性都会收到一条警告:参数会被按值传递而不是按照引用传递)
;;;;;;;;;;;;;;
;; 安全模式 ;;
;;;;;;;;;;;;;;
safe_mode = Off
; 安全模式
safe_mode_gid = Off
; 安全模式默认情况下在打开文件时会做UID比较检查。
; 如果你想将其放宽到GID比较,可以打开这个参数。
safe_mode_include_dir =
; 在安全模式下,该文件夹和其子文件夹下的文件被包含时,将跳过UID/GID检查。
; (文件夹必须必须在"include_path"中或者用完整路径来包含)
; 从PHP4.2 开始,本指令可以接受和"include_path"指令类似的风格用分号隔开的路径,
; 而不只是一个目录。
; 指定的限制实际上是一个前缀,而非一个目录名,也就是说"/dir/incl"将允许访问
; "/dir/include"和"/dir/incls"
; 如果您希望将访问控制在一个指定的目录,那么请在结尾加上一个斜线,
; 例如:"/dir/incl/"
safe_mode_exec_dir =
; 在安全模式下,只有该文件夹下的可执行程序才能被允许通过system()和其它执行系统程
; 序的函数执行。
; 这些函数是:escapeshellarg, escapeshellcmd, exec, passthru, proc_close,
; proc_get_status,
; proc_nice, proc_open, proc_terminate, shell_exec, system ....
safe_mode_allowed_env_vars = PHP_
; 该指令包含用逗号分隔的前缀列表,表示用户在安全模式下仅可以更改在此列出的前缀开
; 头的环境变量的值。
; 因为设置某些环境变量,可能会导致潜在的安全漏洞。
; 默认地,用户将仅能设定以PHP_开头的环境变量,(如: PHP_FOO=BAR)。
; 注意: 如果这一参数值为空,PHP将允许用户更改任意环境变量!
safe_mode_protected_env_vars = LD_LIBRARY_PATH
; 这个指令包含一个用逗号分隔的环境变量列表,在安全模式下,列表中的变量是远端用户
; 不能用putenv()更改的。
; 这些变量甚至在"safe_mode_allowed_env_vars"设置为允许的情况下也会得到保护。
;open_basedir =
; 将PHP允许打开的所有文件都限制在此目录下。无论安全模式是否打开,该参数都将起作
; 用。
; 如果web服务器使用了per-directory或虚拟主机,这个参数将非常有意义。
; 当一个脚本试图用例如fopen()或者gzopen()打开一个指定目录树之外的文件时,将遭到
; 拒绝。
; 所有的符号连接都会被解析,所以不可能通过符号连接来避开此限制。
; 特殊值'.'指定了存放该脚本的目录将被当做基准目录。
; 在Windows中,用分号分隔目录。在任何其它系统中用冒号分隔目录。
; 作为Apache模块时,父目录中的open_basedir路径将自动被继承。
; 用open_basedir指定的限制实际上是前缀,不是目录名。也就是说"/dir/incl"将允许访
; 问"/dir/include"和"/dir/incls"
; 如果您希望将访问控制在一个指定的目录,那么请在结尾加上一个斜线,例如:
; "/dir/incl/"
; 默认是允许打开所有文件。
disable_functions =
; 这个指令让你可以出于安全原因禁用特定的函数。它接受一个用逗号分隔的函数名列表。
; 无论安全模式是否打开,该参数都将起作用。
; 本指令只能设置在php.ini中。例如你不能将其设置在httpd.conf中
disable_classes =
; 这个指令让你可以出于安全原因禁用特定的类。它接受一个用逗号分隔的类名列表。
; 无论安全模式是否打开,该指令都将起作用。本指令自 PHP 4.3.2 起可用。
; 本指令只能设置在php.ini中。例如你不能将其设置在httpd.conf中
;highlight.string = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.bg = #FFFFFF
;highlight.default = #0000BB
;highlight.html = #000000
; 语法高亮模式的色彩。
; 只要能被<font color=???>接受的东西就能正常工作。
;;;;;;;;;;
;; 杂项 ;;
;;;;;;;;;;
expose_php = On
; 决定PHP是否暴露它被安装在服务器上的事实(比如出现在http头中)
; 它不会有安全上的威胁, 但它使得检查你的服务器上是否安装了PHP成为了可能。
;;;;;;;;;;;;;;
;; 资源限制 ;;
;;;;;;;;;;;;;;
max_execution_time = 30
; 每个脚本最大允许执行时间, 按秒计。默认为30秒。
; 这个参数有助于阻止劣质脚本无休止的占用服务器资源。
; 注: "max_execution_time"仅影响脚本本身的运行时间。
; 任何其它花费在脚本运行之外的时间,如用system()/sleep()函数的使用、数据库查询、
; 文件上传等,都不包括在内。
; 在安全模式下,你不能用ini_set()在运行时改变这个设置。
max_input_time = 60
; 每个脚本接收输入数据的最大允许时间(POST, GET, upload), 按秒计
memory_limit = 8M
; 设定一个脚本所能够申请到的最大内存字节数。
; 这有助于防止劣质脚本消耗完服务器上的所有内存。
; 要使用此指令必须在编译的时候激活。
; 因此 configure 一行中应该包括:--enable-memory-limit
; 如果不需要任何内存上的限制,必须将其设为 -1
; 自php4.3.2 起,当设置了memory_limit后,memory_get_usage()函数将变为可用
;;;;;;;;;;;;;;;;;;;;
;; 出错处理和日志 ;;
;;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
;[recommended]->error_reporting = E_ALL
; 显示所有的错误,除了提醒和编码标准化警告。
; 错误报告是位字段。可以将数字加起来得到想要的错误报告等级。
; E_ALL - 所有的错误和警告(不包括 E_STRICT)
; E_ERROR - 致命性的运行时错误
; E_WARNING - 运行时警告(非致命性错误)
; E_PARSE - 编译时解析错误
; E_NOTICE - 运行时提醒(这些经常是你代码中的bug引起的,也可能是有意的行
; 为造成的。)
; E_STRICT - 编码标准化警告,允许PHP建议如何修改代码以确保最佳的互操作
; 性向前兼容性。
; E_CORE_ERROR - PHP启动时初始化过程中的致命错误
; E_CORE_WARNING - PHP启动时初始化过程中的警告(非致命性错)
; E_COMPILE_ERROR - 编译时致命性错
; E_COMPILE_WARNING - 编译时警告(非致命性错)
; E_USER_ERROR - 用户自定义的错误消息
; E_USER_WARNING - 用户自定义的警告消息
; E_USER_NOTICE - 用户自定义的提醒消息
;
; 例子:
;error_reporting = E_ALL & ~E_NOTICE ; 显示所有的错误,除了提醒
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; 仅显示错误
display_errors = On
;[recommended]->display_errors = Off
; 作为输出的一部分显示出错误信息
; 在最终发布的web站点上,强烈建议你关掉这个特性,并使用错误日志代替(参看下面)
; 在最终发布的web站点打开这个特性可能暴露一些安全信息,
; 例如你的web服务上的文件路径、数据库规划或别的信息。
display_startup_errors = Off
; 即使"display_errors"特性被打开,关闭此参数也将不显示PHP启动时的错误。
; 强烈建议你关掉这个特性,除非你必须要用于调试中。
log_errors = Off
;[recommended]->log_errors = On
; 在日志文件里记录错误(服务器指定的日志,stderr标准错误输出,
; 或error_log(下面的))
; 正如上面说明的那样,强烈建议你在最终发布的web站点时用日志记录错误而不是直接输
; 出。
log_errors_max_len = 1024
; 设置错误日志文件的最大长度。
; 设为 0 可以允许无限长度。
ignore_repeated_errors = Off
; 忽略重复的错误信息
; 如果关闭这个参数,错误信息必须出现在同一个文件的同一行才被忽略。
; 如果打开这个参数,则没有这个限制。
ignore_repeated_source = Off
; 忽略重复的错误源
; 忽略重复的错误信息时忽略重复的错误源
; 如果打开这个参数,将不会记录不同的出错文件和对应行的错误信息。
report_memleaks = On
; 报告内存泄漏
; 如果关闭该参数,将不记录或者显示内存泄漏
; 这个参数只在调试编译中起作用,并且必须在错误报告中包含 E_WARNING
track_errors = Off
; 保存最近一个错误/警告消息于变量$php_errormsg (boolean)中
;html_errors = Off
; 禁用出错信息中的HTML标记
; 注意: 不要在发布的程序中使用这个特性。
;docref_root = "/phpmanual/"
;docref_ext = .html
; 如果打开了html_errors参数,PHP将会在出错信息上显示超连接,
; 直接链接到一个说明这个错误或者导致这个错误的函数的页面。
; 你可以从http://www.php.net/docs.php下载php手册,并设置docref_root参数,将他指
; 向你本地的手册所在目录。
; 你还必须设置"docref_ext"来指定文件的扩展名。
; 注意: 不要在发布的程序中使用这个特性。
;error_prepend_string = "<font color=ff0000>"
; 用于错误信息前输出的字符串
;error_append_string = "</font>"
; 用于错误信息后输出的字符串
;error_log = filename
; 将错误日志记录到哪个文件中。
; 如果设为"syslog", 错误日志将被记录到系统日志中(NT下的事件日志,
; Unix下的syslog(3))
;;;;;;;;;;;;;;
;; 数据处理 ;;
;;;;;;;;;;;;;;
;arg_separator.output = "&"
; PHP所产生的URL中来分隔参数的分隔符。默认值是"&"
;arg_separator.input = ";&"
; PHP解析URL中的变量时使用的分隔符列表,默认值是"&"
; 注意: 字符串中的任何字符都将被看着分割符
variables_order = "EGPCS"
;[recommended]->variables_order = "GPCS"
; PHP注册 GET, POST, Cookie, Environment, Built-in 变量的顺序。
; (以 G, P, C, E, S 表示,通常以 EGPCS 或 GPC 或 ES 的方式引用)。
; 按从左到右记录,新值覆盖旧值。
; 举例说,将其设为"GP",会导致 PHP 完全忽略环境变量、cookies 、server,
; 并用 GET 方法的变量覆盖 POST 方法的同名变量
register_globals = Off
; 是否将这些 EGPCS 变量注册为全局变量。自 PHP 4.2.0 开始,本指令默认为 off
; 例如,如果打开这个特性,那么URL:http://www.example.com/test.php?id=3 将产生
; $id
; 或者从 $_SERVER['DOCUMENT_ROOT'] 得到 $DOCUMENT_ROOT 。
; 如果你不想让脚本中的全局变量和用户输入的数据搞混的话,请关闭它。
; 推荐使用PHP的预定义变量来替代,例如超全局变量:$_ENV,$_GET,$_POST,
; $_COOKIE 和 $_SERVER
; 请注意, register_globals不能在运行时设定(ini_set()),尽管在主机允许时可以用
; .htaccess 来设置
; 一个 .htaccess 项目的例子:php_flag register_globals on
; 注: register_globals 受 variables_order 指令的影响。
register_long_arrays = On
;[recommended]->register_long_arrays = Off
; 是否启用旧式的长式数组(HTTP_*_VARS),推荐关闭该特性以获得更好的性能。
register_argc_argv = On
;[recommended]->register_argc_argv = Off
; 是否声明 argv和argc 变量(其中包含用GET方法传来的数据)
; 【argv为变量数组,argc为变量数组中元素个数】
; 若你不想使用这两个变量,应当关掉它以提高性能。
post_max_size = 8M
; PHP接受的POST数据最大长度。此设定也影响到文件上传。
; 要上传大文件,该值必须大于"upload_max_filesize"
; 如果配置脚本中激活了内存限制,"memory_limit"也会影响文件上传。
; 一般说来,"memory_limit"应该比"post_max_size"要大。
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 魔术引号(自动字符串转义) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
magic_quotes_gpc = On
;[recommended]->magic_quotes_gpc = Off
; 在输入的GET/POST/Cookie数据里使用自动字符串转义【比如,值 (It's "PHP!") 会自动
; 转换成 (It\'s \"PHP!\")】
; 这里的设置自动影响$_GEST,$_POST,$_COOKIE数组的值。如果打开,值 (It's "PHP!")
; 会自动转换成 (It\'s \"PHP!\")。
; (个人意见:关闭此特性, 因为它在处理双字节汉字的时候可能会破坏某些繁体字和特殊字
; 符)
magic_quotes_runtime = Off
; 对运行时从外部资源产生的数据使用自动字符串转义
; 例如:用SQL查询得到的数据,用exec()函数得到的数据,等等
magic_quotes_sybase = Off
; 采用 Sybase形式的自动字符串转义( 用 '' 表示 ' 而不用 \' )
auto_prepend_file =
; 指定在主文件之前自动解析的文件名。
; 该文件就像调用了include()函数一样被包含进来,因此会使用"include_path"
auto_append_file =
; 指定在主文件之后自动解析的文件名。
; 该文件就像调用了include()函数一样被包含进来,因此会使用"include_path"
; 注: 如果脚本通过 exit() 终止,则自动后缀不会发生。
default_mimetype = "text/html"
; default_charset = "iso-8859-1"
; PHP总是默认地在"Content-type:"头中设置输出文档的MIME类型和字符集的编码方式。
; 要让输出字符集失效,只要设置为空或注释掉即可。
; PHP的默认设置会输出"Content-Type: text/html"
; 若去掉"default_charset"前的注释并将其设为"gb2312",
; 那么将会输出"Content-Type: text/html; charset=gb2312"
;always_populate_raw_post_data = On
; 总是填充$HTTP_RAW_POST_DATA变量,"HTTP_RAW_POST_DATA"意为"HTTP原始POST数据"
;;;;;;;;;;;;;;;;
;; 路径和目录 ;;
;;;;;;;;;;;;;;;;
;include_path = ".;c:\php\includes"
; 指定一组目录用于require(),include()和fopen_with_path()函数来寻找文件。
; 格式和系统的 PATH 环境变量类似:
; 一组目录的列表,在 UNIX 下用冒号分隔,在 Windows 下用分号分隔。
; 在包含路径中使用 '.' 可以允许相对路径,它代表当前目录。
; UNIX: "/path1:/path2"
; Windows: "\path1;\path2"
doc_root =
; PHP页面在服务器上的根目录。仅在非空时有效。
; 如果PHP被配置为安全模式,则此目录之外的文件一概不被解析。
; 如果PHP编译时没有指定FORCE_REDIRECT,并且在非IIS服务器上以CGI方式运行,
; 则必须设置此项。(参见手册中的安全部分)
; 替代方案是使用下面的"cgi.force_redirect"指令。
user_dir =
; 告诉php在使用 /~username 打开脚本时到哪个目录下去找,仅在非空时有效。
; 也就是在用户目录之下使用PHP文件的基本目录名,例如:public_html
extension_dir = "./"
; 存放扩展库(模块)的目录,也就是PHP用来寻找动态连接扩展库的目录
enable_dl = On
; 是否使dl()函数有效。
; dl()函数在除apache以外的多线程的服务器(如:IIS或Zeus)上不能正确地工作,
; 并在其上默认为禁止。
;cgi.force_redirect = 1
; 打开cgi强制重定向为以CGI方式运行的php提供了必要的安全保护,php默认打开了该参数
; 你若自己关闭了它,请自己负责后果
; 注意:在IIS/OmniHTTPD/Xitami上则必须关闭它!
;cgi.nph = 1
; 如果该参数打开,那么它会强制cgi对每个http请求始终发送状态码: 200
;cgi.redirect_status_env =
; 如果打开了cgi.force_redirect,并且你没有将php运行在Apache或Netscape(iPlanet)
; 服务器上,可能需要设定一个cgi重定向环境变量名,PHP将去寻找它来知道可以继续执行
; 下去。
; 设置这个变量会导致安全漏洞,请务必在设置前搞清楚自己在做什么。
;fastcgi.impersonate = 1
; IIS中的FastCGI支持模仿客户端安全令牌的能力。这使得IIS能够定义运行时所基于的请
; 求的安全上下文。
; Apache中的mod_fastcgi不支持此特性(03/17/2002)
; 如果在IIS中运行则设为1,默认为 0
;cgi.rfc2616_headers = 0
; 指定PHP在发送HTTP响应代码时使用何种报头。
; 如果设定为0,PHP发送一个"Status: "报头,Apache和其它web server都支持。
; 若设为0,则PHP使用Apache支持的头。若设为1,则PHP使用RFC2616标准的头。默认值为0
; 除非你知道自己在做什么,否则保留其值为 0
;;;;;;;;;;;;;;
;; 文件上传 ;;
;;;;;;;;;;;;;;
file_uploads = On
; 是否允许HTTP文件上传。参见upload_max_filesize,upload_tmp_dir,post_max_size
;upload_tmp_dir =
; 文件上传时存放文件的临时目录。必须是PHP进程用户可写的目录。如果未指定则PHP使用
; 系统默认值。
upload_max_filesize = 2M
; 允许上传的文件的最大尺寸。
;;;;;;;;;;;;;;
;; 文件打开 ;;
;;;;;;;;;;;;;;
allow_url_fopen = On
; 是否允许打开远程文件( http:// or ftp://)
;from="john@doe.com"
; 定义匿名ftp的密码(一个email地址)
;user_agent="PHP"
; 定义"User-Agent"字符串
default_socket_timeout = 60
; socket超时,单位是秒
;auto_detect_line_endings = Off
; 如果的你脚本必须处理Macintosh文件,或者你运行在Macintosh上,同时又要处理unix或
; win32文件,
; 设置这个标志可以让PHP自动侦察文件结束符,以便fgets()和file()函数正常工作。
; 默认值是 Off,因为在检测第一行的 EOL 习惯时会有很小的性能损失,
; 而且在 Unix 系统下使用回车符作为项目分隔符的人们会遭遇向下不兼容的行为。
;;;;;;;;;;;;;;
;; 动态扩展 ;;
;;;;;;;;;;;;;;
; 若你希望一个扩展库自动加载,可用下面的语法:
; extension=modulename.extension
; 例如,在windows上:
; extension=msql.dll
; 在UNIX上:
; extension=msql.so
; 注意,这只应当是模块的名字,不需要附带目录信息。
; 上面的extension_dir已经指示了扩展库的位置。
;Windows 扩展
;注意,ODBC是内置支持的,不需要使用扩展。(MySQL没有内置)
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_mysql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_yaz.dll
;extension=php_zip.dll
;;;;;;;;;;;;;;
;; 模块设置 ;;
;;;;;;;;;;;;;;
[Syslog]
define_syslog_variables = Off
; 是否定义各种的系统日志变量,如:$LOG_PID, $LOG_CRON 等等。
; 关掉它以提高效率的好主意。
; 你可以在运行时调用函数define_syslog_variables()来定义这些变量
[mail function]
SMTP = localhost ;仅用于win32系统
smtp_port = 25 ;仅用于win32系统
;sendmail_from = me@example.com ;仅用于win32系统
;sendmail_path = ;仅用于unix, 也可支持参数(默认的是'sendmail -t -i')
;mail.force_extra_parameters =
; 强制添加一些特殊参数如邮件二进制数据,作为扩展参数传输
; 这些参数将自动替换mail()的第5个参数,即使在安全模式下
[SQL]
sql.safe_mode = Off
[ODBC]
;odbc.default_db = (暂未实现)
;odbc.default_user = (暂未实现)
;odbc.default_pw = (暂未实现)
odbc.allow_persistent = On ; 是否允许持久连接
odbc.check_persistent = On ; 在重用前检查连接是否还可用
odbc.max_persistent = -1 ; 每个进程中允许的最大持久连接数。-1 代表无限制
odbc.max_links = -1 ; 每个进程中允许的最大连接数(持久和非持久)。
; -1 代表无限制
odbc.defaultlrl = 4096
; 处理LONG类型的字段。返回变量的字节数,0代表通过
odbc.defaultbinmode = 1
; 处理二进制数据。0代表通过,1返回原样, 2转换为字符
; 参见odbc_binmode和odbc_longreadlen文档以得到uodbc.defaultlrl和
; uodbc.defaultbinmode的解释。
[MySQL]
; php内置的MySQL扩展库无法同4.1.0以上版本的MySQL一起工作。你需要使用MySQLi扩展。
; MySQLi扩展模块与recode扩展模块共同使用的时候,可能会造成PHP的崩溃和启动时出现
; 问题。
; 如果您需要除latin(默认)以外其它的字符集,您需要安装有已编译字符集支持的外置
; libmysql(未集成)
mysql.allow_persistent = On ; 允许或禁止持久连接
mysql.max_persistent = -1 ; 每个进程中允许的最大持久连接数。-1 代表无限制
mysql.max_links = -1 ; 每个进程中允许的最大连接数(持久和非持久)。
; -1 代表无限制
mysql.default_socket = ; 用于本地MySql连接的默认的套接字名。
; 为空时使用MYSQL内置的默认值
mysql.default_port =
; mysql_connect()使用的默认TCP端口,如果没有指定默认端口号,
; mysql_connect()将按顺序从:(1)$MYSQL_TCP_PORT环境变量、
; (2)/etc/services文件中的mysql-tcp项(unix)、
; (3)编译时指定的MYSQL_PORT常量中获得
; Win32下,只使用 MYSQL_PORT 常量。
mysql.default_host = ; mysql_connect() 默认使用的主机(安全模式下无效)
mysql.default_user = ; mysql_connect() 默认使用的用户名(安全模式下无效)
mysql.default_password =
; mysql_connect() 默认使用的密码(安全模式下无效)
; 注意,在这个文件下保存密码通常是一个坏主意
; 任何可以使用PHP访问的用户都可以运行
; 'echo cfg_get_var("mysql.default_password")'来显示密码!
; 而且当然地,任何有读该文件权力的用户也能看到那个密码。
mysql.connect_timeout = 60
; 连接超时(秒),-1 代表无限制。
; 在Linux中,这个参数设定了等候来自服务器的响应的时长。
mysql.trace_mode = Off
; 跟踪模式。当打开这个特性后,扫描表或索引时SQL的警告将会被显示。
[MySQLI]
mysqli.max_links = -1 ; 每个进程中允许的最大连接数(持久和非持久)-1 代表无限制
mysqli.default_socket = ; 用于本机MySql连接的默认的套接字名。
;为空时使用MYSQL内置的默认值
mysqli.default_port = 3306
; mysqli_connect()使用的默认TCP端口,如果没有指定默认端口号,
; mysqli_connect()将按顺序从:(1)$MYSQL_TCP_PORT环境变量、
; (2)/etc/services文件中的mysql-tcp项(unix)、
; (3)编译时指定的MYSQL_PORT常量 中获得。
; Win32下,只使用 MYSQL_PORT 常量。
mysqli.default_host = ; mysqli_connect() 默认使用的主机(安全模式下无效)
mysqli.default_user = ; mysqli_connect() 默认使用的用户名(安全模式下无效)
mysqli.default_password =
; mysqli_connect() 默认使用的密码(安全模式下无效)
; 注意,在这个文件下保存密码通常是一个坏主意
; 任何可以使用PHP访问的用户都可以运行
; 'echo cfg_get_var("mysql.default_password")'来显示密码!
; 而且当然地,任何有读该文件权力的用户也能看到那个密码。
mysqli.reconnect = Off
; 跟踪模式。当打开这个特性后,扫描表或索引时SQL的警告将会被显示。
[mSQL]
msql.allow_persistent = On ; 允许或禁止持久连接
msql.max_persistent = -1 ; 最大持久连接数。-1 代表无限制
msql.max_links = -1 ; 最大连接数(持久和非持久)。-1 代表无限制
[PostgresSQL]
pgsql.allow_persistent = On ; 允许或禁止持久连接
pgsql.max_persistent = -1 ; 每个进程中允许的最大持久连接数。-1 代表无限制
pgsql.max_links = -1 ; 每个进程中允许的最大连接数(持久和非持久)。
; -1 代表无限制
pgsql.auto_reset_persistent = Off
; 检测用在pg_pconnect()上中断了的持久连接,需要一些额外开销。
pgsql.ignore_notice = 0
; 是否忽略PostgreSQL后端的通告消息。记录后端的通告消息需要一些额外开销。
pgsql.log_notice = 0
; 是否在日志中记录PostgreSQL后端的通告消息。除非pgsql.ignore_notice=0,
; 否则无法记录。
[Sybase]
sybase.allow_persistent = On ; 允许或禁止持久连接
sybase.max_persistent = -1 ; 每个进程中允许的最大持久连接数。-1 代表无限制
sybase.max_links = -1 ; 每个进程中允许的最大连接数(持久和非持久)。
; -1 代表无限制
;sybase.interface_file = "/usr/sybase/interfaces"
sybase.min_error_severity = 10 ; 显示错误的最低严重性
sybase.min_message_severity = 10 ; 显示消息的最低重要性
sybase.compatability_mode = Off
; 与PHP3兼容的模式。若打开,这将导致PHP自动根据结果的Sybase类型赋值,
; 而不是把它们全当成字符串。
; 这个兼容模式不会永远保留,将来会被丢弃。
[Sybase-CT]
sybct.allow_persistent = On ; 允许或禁止持久连接
sybct.max_persistent = -1 ; 每个进程中允许的最大持久连接数。-1 代表无限制
sybct.max_links = -1 ; 每个进程中允许的最大连接数(持久和非持久)。
;-1 代表无限制
sybct.min_server_severity = 10 ; 显示服务端错误的最低严重性
sybct.min_client_severity = 10 ; 显示客户端错误的最低严重性
[dbx]
; returned column names can be converted for compatibility reasons
; possible values for dbx.colnames_case are
; "unchanged" (default, if not set)
; "lowercase"
; "uppercase"
; the recommended default is either upper- or lowercase, but
; unchanged is currently set for backwards compatibility
dbx.colnames_case = "unchanged"
[bcmath]
bcmath.scale = 0
; 用于所有bcmath函数的10十进制数数字的个数
[browscap]
;browscap = extra/browscap.ini
;browscap = c:/windows/system32/inetsrv/browscap.ini ;winxp
;browscap = c:/winnt/system32/inetsrv/browscap.ini ;win2000
; 只有PWS和IIS需要这个设置
; 你可以从 http://www.garykeith.com/browsers/downloads.asp 得到一个
; browscap.ini 文件。
[Informix]
ifx.default_host = ; ifx_connect() 默认使用的主机(安全模式下无效)
ifx.default_user = ; ifx_connect() 默认使用的用户名(安全模式下无效)
ifx.default_password = ; ifx_connect() 默认使用的密码(安全模式下无效)
ifx.allow_persistent = On ; 允许或禁止持久连接
ifx.max_persistent = -1 ; 每个进程中允许的最大持久连接数。-1 代表无限制
ifx.max_links = -1 ; 每个进程中允许的最大连接数(持久和非持久)。
; -1 代表无限制
ifx.textasvarchar = 0
; 若打开,select状态符返回一个"text blob"字段的内容,而不是它的id
ifx.byteasvarchar = 0
; 若打开,select状态符返回一个"byte blob"字段的内容,而不是它的id
ifx.charasvarchar = 0
; 追踪从固定长度的字符列里剥离的空格。可能对 Informix SE 用户有效。
ifx.blobinfile = 0
; 若打开,text和byte blobs的内容被导出到一个文件而不是保存到内存。
ifx.nullformat = 0
; 设为0, NULL被作为空字段返回。设为1, NULL作为字串"NULL"返回。
[Session]
; 注意,除非使用session_register()或$_SESSION注册了一个变量。
; 否则不管是否使用了session_start(),都不会自动添加任何session记录。
session.save_handler = files
; 用于保存/检索数据的处理程序,默认是文件(files)。
;session.save_path = "/tmp"
; 在"session.save_handler=files"的情况下,这个参数指定了会话数据文件的保存路径。
; Windows用户必须修改此参数才能使用会话相关函数。
; 你可以这样定义路径(N是一个整数):session.save_path = "N;[MODE;]/path"
; N表示可以使用N层深度的子目录,而不是将所有数据文件都保存在一个目录下。
; [MODE;]加了括号表示可选,表示它必须用8进制数来表示,其默认值是600 (等于384)。
; The file storage module creates files using mode 600 by default.
; Note that this does not overwrite the process's umask.
; 这是一个提高Windows下海量会话性能的好主意。
; 注意0: "N;/path"两边的双引号不能省略。
; 注意1: php不会自动建立这些文件夹结构。你可以使用ext/session目录下的脚本来做这
; 件事情。
; 注意2: 如果你指定的文件夹可以被不安全的用户读取(比如默认的"/tmp"),那么将会带
; 来安全漏洞。
; 注意3: 参见下面有关垃圾搜集的章节。
session.use_cookies = 1
; 是否使用cookie在客户端保存session id,默认为1(使用)
;session.use_only_cookies = 1
; 只使用Cookie来承载会话,默认为0 (关闭)
; 打开这个选项可以避免用URL传递会话带来的安全问题。但是禁用Cookie的客户端将使
; session无法工作。
session.name = PHPSESSID
;用在cookie里的会话标识名,只能包含字母和数字。
session.auto_start = 0
; 在客户访问任何页面时自动初始化会话,默认禁止。
; 因为类定义必须在session启动之前被载入,所以若打开这个选项,你就不能在sessions
; 中存放对象。
session.cookie_lifetime = 0
; session_cookie的有效期(秒),若为0,则仅在浏览器打开期间有效。
session.cookie_path = /
; session_cookie的作用路径
session.cookie_domain =
; session_cookie的作用域,默认为空。
session.serialize_handler = php
; 用来序列化/解序列化数据的处理程序,php是PHP的标准序列化/解序列化处理程序。
session.gc_probability = 1
session.gc_divisor = 100
;[recommended]->session.gc_divisor = 1000
; 定义在每次初始化会话时,启动垃圾回收程序的概率。
; 这个收集概率计算公式如下:gc_probability/gc_divisor
; 比如:1/100 表示每一个新会话初始化时,有1%的概率会启动垃圾回收程序。
session.gc_maxlifetime = 1440
; 经过此参数所指的秒数后,保存的数据将被视为'垃圾'并由垃圾回收程序清理。
; 判断的标准是文件建立的时间,而不是最后刷新数据的时间。
; 注意: 如果你使用了子目录来存储会话的数据文件(参见:session.save_path),垃圾回
; 收程序不会自动启动。
; 你必须使用一个你自己编写的shell脚本、克隆目录或者其他办法来执行垃圾搜集。
; 比如,下面的脚本相当于设置了"session.gc_maxlifetime=1440" (24分钟):
; cd /path/to/sessions; find -cmin +24 | xargs rm
session.bug_compat_42 = 1
;[recommended]->session.bug_compat_42 = 0
session.bug_compat_warn = 1
; PHP4.2之前的版本有一个未注明的"特性"(也可看作bug):
; 即使在"register_globals = Off"的情况下也允许初始化全局session变量,
; 如果你在PHP4.3之后的版本中使用这个特性,会显示一条警告。你可以分别禁用这个特性
; 和警告。
; 若打开bug_compat_42,将只显示警告。
session.referer_check =
; 检查HTTP头中的"Referer"以判断包含于URL中的会话id是否有效
; HTTP_REFERER必须包含这个参数指定的字符串,否则URL中的会话id将被视为无效。
; 默认为空,即不检查。
;session.entropy_length = 16
; 从文件中读取多少字节(entropy:平均信息量)[设定session从高熵值资源读取的位数]
; 默认为0,表示禁用。
;session.entropy_file = /dev/urandom
; 指定创建会话id的文件夹[使用外部高熵值资源或文件来建立session代码,
; 例如 UNIX 系统上的 /dev/random 或 /dev/urandom]
session.cache_limiter = nocache
; 设为{none/nocache/private/private_no_expire/public}以指定会话页面的缓存控制模
; 式,或者设为空以阻止在http应答头中发送禁用缓存的命令。
; 默认为"nocache"
session.cache_expire = 180
; 指定会话页面在客户端cache中的有效期限(分钟)
; "session.cache_limiter=nocache"时,此设置将失效。
session.use_trans_sid = 0
; 默认是禁止用明码在URL中显示sid(session_id)的,因为它会给你的用户带来安全危险,
; 因为:
; 1- 用户可能将包含有效sid的URL 通过email/irc/QQ/MSN...途径告诉给其他人。
; 2- 包含有效sid的URL可能会被保存在公用电脑上。
; 3- 用户可能保存带有固定不变sid的URL在他们的收藏夹或者浏览历史纪录里面。
session.hash_function = 0
;[recommended]->session.hash_function = 1
; 生成session_id的hash函数,SHA-1的安全性更高一些
; 0: MD5 (128 bits)
; 1: SHA-1 (160 bits)
session.hash_bits_per_character = 4
;[recommended]->session.hash_bits_per_character = 5
; 指定在session_id字符串中的每个字符内保存多少位二进制数,
; 这些二进制数是hash函数的运算结果。
; 4 bits: 0-9, a-f
; 5 bits: 0-9, a-v
; 6 bits: 0-9, a-z, A-Z, "-", ","
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
;[recommended]->url_rewriter.tags = "a=href,area=href,frame=src,input=src,
; form=fakeentry"
; 指定重写哪些HTML标签来包含sid(session_id)(仅在"session.use_trans_sid"打开的情
; 况下有效)
; form和fieldset比较特殊:
; 如果你包含他们,URL重写器将添加一个隐藏的"<input>",它包含了本应当额外追
; 加到URL上的信息。
; 如果你想兼容XHTML标准,请使用"fieldset"代替"form"。
; 注意:所有合法的项都需要一个等号——即使后面没有值。
[MSSQL]
mssql.allow_persistent = On ; 允许或禁止持久连接
mssql.max_persistent = -1 ; 每个进程中允许的最大持久连接数。-1 代表无限制
mssql.max_links = -1 ; 每个进程中允许的最大连接数(持久和非持久)。
; -1 代表无限制
mssql.min_error_severity = 10 ; 显示错误的最低严重性
mssql.min_message_severity = 10 ; 显示消息的最低重要性
mssql.compatability_mode = Off ; 与旧版的PHP3.0兼容的模式。
;mssql.connect_timeout = 5 ; 连接超时(秒)
;mssql.timeout = 60 ; 查询超时(秒)
;mssql.textlimit = 4096 ; 取值范围:0 - 2147483647
;mssql.textsize = 4096 ; 取值范围:0 - 2147483647
;mssql.batchsize = 0
; 每批记录最大条数(0 表示所有记录都在一批当中)
;mssql.datetimeconvert = On
; 指定datetime/datetim4字段的返回方式。
; On => 按照SQL server的设置返回
; Off => 按照 YYYY-MM-DD hh:mm:ss 格式返回
mssql.secure_connection = Off
; 连接到数据库时使用NT身份认证
;mssql.max_procs = 25
; 指定最大进程数,默认为 25
[Assertion]
;assert.active = On ; 断言(表达式),默认生效。
;assert.warning = On ; 为每个失败的断言发出警告。
;assert.bail = Off ; 默认不释放。
;assert.callback = 0 ; 如果断言失败,就调用一个用户函数。
;assert.quiet_eval = 0 ; 根据error_reporting(),显示断言错误信息
; 如果不需希望显示错误消息,设值为1,并在eval()附件设置
; error_reporting(0)
[Ingres II]
ingres.allow_persistent = On ; 允许或禁止持久连接
ingres.max_persistent = -1 ; 最大持久连接数。-1 代表无限制
ingres.max_links = -1 ; 最大连接数(持久和非持久)。-1 代表无限制
ingres.default_database = ; 默认 database (format : [node_id::]dbname[/srv_class]
ingres.default_user = ; 默认 user
ingres.default_password = ; 默认 password
[Verisign Payflow Pro]
pfpro.defaulthost = "test-payflow.verisign.com" ; 默认的 Payflow 代理服务器;
pfpro.defaultport = 443 ; 默认的连接端口;
pfpro.defaulttimeout = 30 ; 默认超时时间(按秒计);
;pfpro.proxyaddress = ; 默认的代理的IP地址(如果需要)
;pfpro.proxyport = ; 默认的代理的端口;
;pfpro.proxylogon = ; 默认的代理的登录用户名;
;pfpro.proxypassword = ; 默认的代理的密码;
[com]
;com.typelib_file = ; 含GUID文件的路径,IID或包含类型库的文件
;com.allow_dcom = true ; 允许分布式COM调用
;com.autoregister_typelib = true ; com_load()函数自动注册类型库组件常数
;com.autoregister_casesensitive = false ; 自动注册类型库组件常数时大小写敏感
;com.autoregister_verbose = true ; 对重复注册的常量显示警告
[mbstring]
;mbstring.language = Japanese
; 用于内部字符表示的语言
;mbstring.internal_encoding = EUC-JP
; internal/script编码。
; 注意:有些编码不能用于此(比如:SJIS, BIG5, ISO-2022-*)
;mbstring.http_input = auto
; http输入编码
;mbstring.http_output = SJIS
; http输出编码。必须将output_handler设置为"mb_output_handler"函数才可以。
;mbstring.encoding_translation = Off
; 允许依照mbstring.internal_encoding设置进行自动编码转换
; 打开这个特性会让输入的字符会转化为内部编码
; 注意: 千万不要将自动编码转换使用于可移植的库或者程序
;mbstring.detect_order = auto
; 编码自动检测指令
;mbstring.substitute_character =
; 当一种字符不能被转换为另一种字符的时候,这里的值就是替代字符。
;mbstring.func_overload = 0
; 用多字节字符串函数替换单字节字符串函数。
; mail(), ereg()...将被替换为mb_send_mail(), mb_ereg()...
; 可用0,1,2,4来组合。比如7表示替换所有。
; 0: 无替换
; 1: 替换mail()
; 2: 替换str*()
; 4: 替换ereg*()
[FrontBase]
;fbsql.allow_persistent = On
;fbsql.autocommit = On
;fbsql.default_database =
;fbsql.default_database_password =
;fbsql.default_host =
;fbsql.default_password =
;fbsql.default_user = "_SYSTEM"
;fbsql.generate_warnings = Off
;fbsql.max_connections = 128
;fbsql.max_links = 128
;fbsql.max_persistent = -1
;fbsql.max_results = 128
;fbsql.batchSize = 1000
[exif]
; Exif UNICODE用户注释将被处理为UCS-2BE/UCS-2LE ,JIS保持不变。
; 在多字节字符串的支持下 this 将被自动的转换为设定的编码。
; 若将mbstring.internal_encoding设为空,根据解码设置,
; 就可以区别motorola和intel的字节指令(解码设置不能为空)
;exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel = UCS-2LE
;exif.encode_jis =
;exif.decode_jis_motorola = JIS
;exif.decode_jis_intel = JIS
[Tidy]
;tidy.default_config = /usr/local/lib/php/default.tcfg
; 默认tidy配置文件路径。
tidy.clean_output = Off
; 是否允许tidy自动清理和修正输出。
; 警告: 如果脚本可能会输出非html文档(比如动态图片),请不要打开此特性。
[soap]
soap.wsdl_cache_enabled=1
; 打开或者关闭WSDL缓冲特性
soap.wsdl_cache_dir="/tmp"
; SOAP扩展存放chche文件的目录。
soap.wsdl_cache_ttl=86400
; cache文件使用期限(秒)。过期后将使用新文件。
; 局部变量:
; tab宽度: 4
; End: