��4������

����Ŀ¼
php3.ini�ļ�
Apache�
��
CGI
��
��������
��ȫ����

php3.ini�ļ�

PHP����������ʱ��ȡphp3.ini�ļ��������Է�����ģ�鷽ʽ���е�PHP,��web server����ʱ���ж�ȡ��CGI�汾��PHP��ÿһ�ε��ö�������ȡ��

��Apache��httpd.conf�ļ�������ָ�����к���������һ�µIJ��֣�ֻ�������������ǰ����php3_ ǰ׺ ��

һ������ָ��

auto_append_file string
ָ�������ļ������Զ��������ļ������֡�����ļ����� include() ��������һ��������,���� include_path ��ʹ�á�

Ĭ�ϵ�ֵ�����Զ�׷�ӡ�

ע��: ���script������ exit()���������Ļ�, ���ᷢ���Զ�׷�ӡ�

auto_prepend_file string
ָ�������ļ�ǰ���Զ��������ļ������֡�����ļ����� include() ��������һ��������,���� include_path ��ʹ�á�

Ĭ�ϵ�ֵ������auto-prepending��

��
cgi_ext string
��
display_errors boolean
��������Ƿ񽫳�����Ϣ��HTML���һ������Ļ����ʾ��
doc_root string
PHP�ڷ������ϵĸ�Ŀ¼�������ڷǿ�ʱ�����PHP������Ϊ ��ȫģʽ,�κδ�Ŀ¼������ļ�����ʹ��PHP����
engine boolean
�������ΪApacheģ���PHPʮ�����á�����վ���ÿ����ͬ��Ŀ¼�����������趨PHP�������Ŀ���״̬��ͨ����httpd.conf�ļ����ʵ��ĵط�����php3_engine����, �����������ֹPHP�����ִ�С�
error_log string
��¼script���������ļ������������ᱻ��¼���������ָ��syslog, �������Ϣ����¼��ϵͳ�Ĵ����¼�С�����UNIXϵͳ�д���syslog(3) ,��Windows NT�д����¼���¼��ϵͳ�����¼������Windows 95�в����á�
error_reporting integer
���ó�������ļ��𡣸ò�����һ����������������bitֵ��������Ҫ����Ĵ��󼶱��bitֵ��������

Table 4-1. ����������

bitֵ ��������
1 һ�����
2 һ�㾯��
4 ����������
8 �ǽ����Ĺ���ģʽ����

Ĭ�ϵ�ֵ�� 7 (һ�����һ�㾯�棬����������)��

open_basedir string
�޶�PHPֻ�ܴ�ָ��Ŀ¼�����ļ�.

��һ��script������ͼ��һ���ļ�������, fopen �� gzopenʱ,���ļ���λ�ûᱻ��顣�����ļ�����ָ��Ŀ¼ʱ��PHP���ܾ����������е�symlink���ӽ���ת�������������޷�ͨ�� symlink�ķ����ӹ�������ơ�

�ض���ֵ . ��ʾscript�����ŵ�Ŀ¼������Ϊ����Ŀ¼��

Ĭ��ֵ�����������е��ļ���

gpc_order string
����GET/POST/COOKIE����������˳��Ĭ�������� "GPC"�����磬�������"GP",������PHP��ȫ���� cookies����ʹ������POST�����ı�������GET�����е�ͬ��������
include_path string
ָ�� require(), include() ��fopen_with_path() ����Ѱ�������ļ���һ��Ŀ¼����ʽ������������PATH: һ����ð�ŷָ���Ŀ¼����ָ��UNIX�У���Windows���÷ֺţ���

Example 4-1. UNIX include_path

include_path=.:/home/httpd/php-lib

Example 4-2. Windows include_path

include_path=.;c:\www\phplib

Ĭ�������� . (��ǰĿ¼)��

isapi_ext string
��
log_errors boolean
�����Ƿ��script����ij�����Ϣ��¼����������error log�ļ���������ܺͲ��÷������йء�
magic_quotes_gpc boolean
ΪGPC (Get/Post/Cookie)��������magic_quotes��״̬����magic_quotes����ʱ,���е� ' (������), " (˫����), \ (��б��) ��NUL���Զ��滻Ϊһ����б�ߺš����magic_quotes_sybaseҲ��������, a һ�������Ž����滻Ϊһ����б�ߺż�һ�������ţ��� ' ���滻Ϊ \' ��
magic_quotes_runtime boolean
If magic_quotes_runtime is enabled, most functions that return data from any sort of external source including databases and text files will have quotes escaped with a backslash. ���magic_quotes_sybaseҲ��������, a һ�������Ž����滻Ϊһ����б�ߺż�һ�������ţ��� ' ���滻Ϊ \' ��
magic_quotes_sybase boolean
���magic_quotes_sybase����ͬʱ��������magic_quotes_gpc�� magic_quotes_runtime�������ģ���ô�����ű��滻Ϊһ����б�ߺż�һ�������ţ��� ' ���滻Ϊ \' ��
max_execution_time integer
��������һ��script�������е��ʱ�������룩����ʱ�Ľ���������ǿ����ֹ�����ܷ�ֹ���ҵ�script����������������
memory_limit integer
����һ��script�����������������ڴ��ֽ��������ܷ�ֹ���ҵ�script����ľ�ϵͳ�����ڴ档
nsapi_ext string
��
short_open_tag boolean
�Ƿ�����ʹ����д��PHP��ʾ��<? ?>���������XML�л��ʹ��PHP���Ͳ��ò��ر����ѡ�������ó���ʽ��PHP��ʾ�� <?php ?> �ˡ�
sql.safe_mode boolean
��
track_errors boolean
�����������,����һ��������Ϣʼ�ճ�����ȫ�ֱ��� $php_errormsg�С�
track_vars boolean
�����������,GET, POST ��cookie����������ڸ��Զ�Ӧ��ȫ������$HTTP_GET_VARS, $HTTP_POST_VARS �� $HTTP_COOKIE_VARS���ҵ���
upload_tmp_dir string
�����ļ���������ʱ�ļ���ŵ�Ŀ¼����Ŀ¼������κ�PHP�û���д��
user_dir string
�û���Ŀ¼�µ�PHP�ļ���Ŀ¼����,����public_html��
warn_plus_overloading boolean
�����������,�����ַ���ʹ�üӺţ��� +��ʱ�����������Ϣ����ʹ������׷���script�����е��ַ�������Ӧ��ʹ��"."���ӷ�����д�ĵط���
������ע������˵��PHP���ַ��������ӷ���".",������"+"��

�ʼ�����ָ��

SMTP string
Windows���PHP��ִ���ʼ����ͺ��� mail() ʱ��ʹ�õ�SMTP��������DNS����IP��ַ��
sendmail_from string
Windows���PHP�ڷ����ʼ�ʱ"From:"����ʾ��mail��ַ��
sendmail_path string
sendmail���ĸ�Ŀ¼�£�ͨ���� /usr/sbin/sendmail�� /usr/lib/sendmail��configure ����᳢���ҳ����Ŀ¼����Ĭ�����ã����������ʧ���ˣ�������ڴ����á�

���ڲ�ʹ��sendmail�����ϵͳֻҪ��Ϊ��Ӧ�ij��򼴿ɡ�����, Qmail ���û����Խ�Ŀ¼��Ϊ /var/qmail/bin/sendmail

��ȫģʽ����ָ��

safe_mode boolean
�Ƿ�����PHP��ȫģʽ��
safe_mode_exec_dir string
���PHP�����ڰ�ȫģʽ��, system()������һЩ�������������ܾ�ִ�в������Ŀ¼�µ�ϵͳ����   

����������ָ��

debugger.host string
������ʹ�õ�DNS����IP��ַ��
debugger.port string
������ʹ�õĶ˿ڡ�
debugger.enabled boolean
�Ƿ񿪷ŵ�������

��չװ������ָ��

enable_dl boolean
��ָ�������Apacheģ�鷽ʽ��PHP������Ե����趨ÿ�������������ÿ��Ŀ¼�ܷ�ͨ��dl()������̬װ��PHP��չģ�顣

�رն�̬װ�ع�����Ҫ�dz��ڰ�ȫ�ԵĿ��ǡ�ʹ�ö�̬װ��ʱ���Ժ������е�safe_mode��open_basedir�����ơ�

Ĭ������³�ʹ�ð�ȫģʽ�ⶼ������̬װ�أ��ڰ�ȫģʽ��, ����ʹ�� dl() ������

extension_dir string
PHP���ĸ�Ŀ¼�²�������Ķ�̬װ�ؿ⡣
extension string
PHP����ʱװ���ĸ�����Ķ�̬װ�ؿ⡣

MySQL ����ָ��

mysql.allow_persistent boolean
�Ƿ�����������MySQL���ӡ�
mysql.max_persistent integer
ÿ��MySQL�������ij�����������
mysql.max_links integer
ÿ��MySQL���������������������������ӡ�

mSQL ����ָ��

msql.allow_persistent boolean
�Ƿ�����������mSQL���ӡ�
msql.max_persistent integer
ÿ��mSQL�������ij�����������
msql.max_links integer
ÿ��mSQL���������������������������ӡ�

Postgres ����ָ��

pgsql.allow_persistent boolean
�Ƿ�����������Postgres���ӡ�
pgsql.max_persistent integer
ÿ��Postgres�������ij�����������
pgsql.max_links integer
ÿ��Postgres���������������������������ӡ�

Sybase ����ָ��

sybase.allow_persistent boolean
�Ƿ�����������Sybase���ӡ�
Whether to allow persistent Sybase connections.
sybase.max_persistent integer
ÿ��Sybase�������ij�����������
sybase.max_links integer
ÿ��Sybase���������������������������ӡ�

Sybase-CT ����ָ��

sybct.allow_persistent boolean
�Ƿ�����������Sybase-CT���ӡ�
sybct.max_persistent integer
ÿ��Sybase-CT�������ij�����������
sybct.max_links integer
ÿ��Sybase-CT���������������������������ӡ�

BC ��ѧ��������ָ��

bcmath.scale integer
����bc��ѧ������ʮ�������֡�

�������������ָ��

browscap string
����������ļ������֡�

ͳһ�� ODBC ����ָ��

uodbc.default_db string
���δ�� odbc_connect() �� odbc_pconnect() ��ָ���Ļ����˲�����ʾODBC����Դ��
uodbc.default_user string
���δ�� odbc_connect() �� odbc_pconnect() ��ָ���Ļ����˲�����ʾ�û�����
uodbc.default_pw string
���δ�� odbc_connect() �� odbc_pconnect() ��ָ���Ļ����˲�����ʾ���롣
uodbc.allow_persistent boolean
�Ƿ�����������ODBC���ӡ�
uodbc.max_persistent integer
ÿ��ODBC�������ij�����������
uodbc.max_links integer
ÿ��ODBC���������������������������ӡ�