由 necfans 在 01-24-2004 22:10 发表:
请教:这样的php.ini和httpd.conf安全吗?速度如何啊?
php.ini
> quote:
>
> * * *
>
>
>
> [PHP]
>
> engine = On
>
> short_open_tag = On
>
> asp_tags = Off
>
> precision = 12
>
> y2k_compliance = On
>
> output_buffering = Off
>
> ;output_handler =
>
> zlib.output_compression = Off
>
> ;zlib.output_handler =
>
> implicit_flush = Off
>
> unserialize_callback_func=
>
> serialize_precision = 100
>
> allow_call_time_pass_reference = On
>
> safe_mode = on
>
> safe_mode_gid = Off
>
> safe_mode_include_dir =
>
> safe_mode_exec_dir = "d:\php"
>
> safe_mode_allowed_env_vars = PHP_
>
> safe_mode_protected_env_vars = LD_LIBRARY_PATH
>
> ;open_basedir =
>
> disable_functions = phpinfo,get_cfg_var
>
> disable_classes =
>
> expose_php = On
>
> max_execution_time = 30
>
> max_input_time = 60
>
> memory_limit = 8M
>
> error_reporting = E_ALL
>
> display_errors = off
>
> display_startup_errors = Off
>
> log_errors = off
>
> log_errors_max_len = 1024
>
> ignore_repeated_errors = Off
>
> ignore_repeated_source = Off
>
> report_memleaks = On
>
> track_errors = Off
>
> ;html_errors = Off
>
> ;docref_root = "/phpmanual/"
>
> ;docref_ext = .html
>
> ;error_prepend_string = "
1<font color="ff0000">"
2>
3> ;error_append_string = "</font>
"
>
> ;error_log = filename
>
> ;error_log = syslog
>
> ;arg_separator.output = "&"
>
> ;arg_separator.input = ";&"
>
> register_globals = Off
>
> register_argc_argv = On
>
> post_max_size = 8M
>
> gpc_order = "GPC"
>
> magic_quotes_gpc = On
>
> magic_quotes_runtime = Off
>
> magic_quotes_sybase = Off
>
> auto_prepend_file =
>
> auto_append_file =
>
> default_mimetype = "text/html"
>
> default_charset = "gb2312"
>
> ;always_populate_raw_post_data = On
>
> ;include_path = ".;c:\php\includes"
>
> doc_root =
>
> user_dir =
>
> extension_dir = "d:\soft\php\extensions"
>
> enable_dl = On
>
> ;cgi.rfc2616_headers = 0
>
> file_uploads = On
>
> ;upload_tmp_dir =
>
> upload_max_filesize = 1M
>
> allow_url_fopen = off
>
> default_socket_timeout = 60
>
>
>
>
>
> [Syslog]
>
> define_syslog_variables = Off
>
>
>
> [mail function]
>
> SMTP =
>
> sendmail_from =
>
>
>
> [Java]
>
> ;java.class.path = .\php_java.jar
>
> ;java.home = c:\jdk
>
> ;java.library = c:\jdk\jre\bin\hotspot\jvm.dll
>
> ;java.library.path = .\
>
>
>
> [SQL]
>
> sql.safe_mode = Off
>
>
>
> [ODBC]
>
> ;odbc.default_db = Not yet implemented
>
> ;odbc.default_user = Not yet implemented
>
> ;odbc.default_pw = Not yet implemented
>
> odbc.allow_persistent = On
>
> odbc.check_persistent = On
>
> odbc.max_persistent = -1
>
> odbc.max_links = -1
>
> odbc.defaultlrl = 4096
>
> odbc.defaultbinmode = 1
>
>
>
> [MySQL]
>
> mysql.allow_persistent = On
>
> mysql.max_persistent = -1
>
> mysql.max_links = -1
>
> mysql.default_port = 3306
>
> mysql.default_socket = "d:/soft/mysql/bin/mysqld-nt.exe"
>
> mysql.default_host = localhost
>
> mysql.default_user =
>
> mysql.default_password =
>
> mysql.connect_timeout = 60
>
> mysql.trace_mode = Off
>
>
>
> [mSQL]
>
> msql.allow_persistent = On
>
> msql.max_persistent = -1
>
> msql.max_links = -1
>
>
>
> [PostgresSQL]
>
> pgsql.allow_persistent = On
>
> pgsql.auto_reset_persistent = Off
>
> pgsql.max_persistent = -1
>
> pgsql.max_links = -1
>
> pgsql.ignore_notice = 0
>
> pgsql.log_notice = 0
>
> sybase.allow_persistent = On
>
> sybase.max_persistent = -1
>
> sybase.max_links = -1
>
> sybase.min_error_severity = 10
>
> sybase.min_message_severity = 10
>
> sybase.compatability_mode = Off
>
>
>
> [Sybase-CT]
>
> sybct.allow_persistent = On
>
> sybct.max_persistent = -1
>
> sybct.max_links = -1
>
> sybct.min_server_severity = 10
>
> sybct.min_client_severity = 10
>
>
>
> [dbx]
>
> dbx.colnames_case = "unchanged"
>
>
>
> [bcmath]
>
> bcmath.scale = 0
>
>
>
> [browscap]
>
> ;browscap = extra/browscap.ini
>
>
>
> [Informix]
>
> ifx.default_host =
>
> ifx.default_user =
>
> ifx.default_password =
>
> ifx.allow_persistent = On
>
> ifx.max_persistent = -1
>
> ifx.max_links = -1
>
> ifx.textasvarchar = 0
>
> ifx.byteasvarchar = 0
>
> ifx.charasvarchar = 0
>
> ifx.blobinfile = 0
>
> ifx.nullformat = 0
>
>
>
> [Session]
>
> session.save_handler = files
>
> session.save_path = d:/soft/alltmp
>
> session.use_cookies = 1
>
> session.name = PHPSESSID
>
> session.auto_start = 0
>
> session.cookie_lifetime = 0
>
> session.cookie_path = /
>
> session.cookie_domain =
>
> session.serialize_handler = php
>
> session.gc_probability = 1
>
> session.gc_divisor = 100
>
> session.gc_maxlifetime = 1440
>
> session.bug_compat_42 = 1
>
> session.bug_compat_warn = 1
>
> session.referer_check =
>
> session.entropy_length = 0
>
> session.entropy_file =
>
> ;session.entropy_length = 16
>
> ;session.entropy_file = /dev/urandom
>
> session.cache_limiter = nocache
>
> session.cache_expire = 180
>
> session.use_trans_sid = 0
>
> url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
>
>
>
> [MSSQL]
>
> mssql.allow_persistent = On
>
> mssql.max_persistent = -1
>
> mssql.max_links = -1
>
> mssql.min_error_severity = 10
>
> mssql.min_message_severity = 10
>
> mssql.compatability_mode = Off
>
> ;mssql.connect_timeout = 5
>
> ;mssql.timeout = 60
>
> ;mssql.textlimit = 4096
>
> ;mssql.textsize = 4096
>
> ;mssql.batchsize = 0
>
> ;mssql.datetimeconvert = On
>
> mssql.secure_connection = Off
>
> ;mssql.max_procs = 25
>
>
>
> [Assertion]
>
> ;assert.active = On
>
> ;assert.warning = On
>
> ;assert.bail = Off
>
> ;assert.callback = 0
>
> ;assert.quiet_eval = 0
>
>
>
> [Ingres II]
>
> ingres.allow_persistent = On
>
> ingres.max_persistent = -1
>
> ingres.max_links = -1
>
> ingres.default_database =
>
> ingres.default_user =
>
> ingres.default_password =
>
>
>
> [Verisign Payflow Pro]
>
> pfpro.defaulthost = "test-payflow.verisign.com"
>
> pfpro.defaultport = 443
>
> pfpro.defaulttimeout = 30
>
> ;pfpro.proxyaddress =
>
> ;pfpro.proxyport =
>
> ;pfpro.proxylogon =
>
> ;pfpro.proxypassword =
>
>
>
> [Sockets]
>
> sockets.use_system_read = On
>
>
>
> [com]
>
> ;com.typelib_file =
>
> ;com.allow_dcom = true
>
> ;com.autoregister_typelib = true
>
> ;com.autoregister_casesensitive = false
>
> ;com.autoregister_verbose = true
>
>
>
> [Printer]
>
> ;printer.default_printer = ""
>
>
>
> [mbstring]
>
> ;mbstring.language = Japanese
>
> ;mbstring.internal_encoding = EUC-JP
>
> ;mbstring.http_input = auto
>
> ;mbstring.http_output = SJIS
>
> ;mbstring.encoding_translation = Off
>
> ;mbstring.detect_order = auto
>
> ;mbstring.substitute_character = none
>
> ;mbstring.func_overload = 0
>
>
>
> [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
>
>
>
> [Crack]
>
> ; crack.default_dictionary = "c:\php\lib\cracklib_dict"
>
>
>
> [exif]
>
> ;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
>
>
>
> [Zend]
>
> zend_optimizer.optimization_level=15
>
> zend_extension_ts="D:\soft\zend\lib\ZendExtensionManager.dll"
>
> zend_extension_manager.optimizer_ts="D:\soft\zend\lib\Optimizer-2.1.0"
>
>
>
> * * *
httpd.conf
> quote:
>
> * * *
>
> ServerRoot "D:/soft/Apache/Apache2"
>
> PidFile logs/httpd.pid
>
> Timeout 300
>
> KeepAlive On
>
> MaxKeepAliveRequests 100
>
> KeepAliveTimeout 15
>
>
1<ifmodule mpm_winnt.c="">
2>
3> ThreadsPerChild 250
4>
5> MaxRequestsPerChild 0
6>
7> </ifmodule>
>
> Listen 80
>
> LoadModule access_module modules/mod_access.so
>
> LoadModule actions_module modules/mod_actions.so
>
> LoadModule alias_module modules/mod_alias.so
>
> LoadModule asis_module modules/mod_asis.so
>
> LoadModule auth_module modules/mod_auth.so
>
> LoadModule autoindex_module modules/mod_autoindex.so
>
> LoadModule cgi_module modules/mod_cgi.so
>
> LoadModule dir_module modules/mod_dir.so
>
> LoadModule env_module modules/mod_env.so
>
> LoadModule imap_module modules/mod_imap.so
>
> LoadModule include_module modules/mod_include.so
>
> LoadModule isapi_module modules/mod_isapi.so
>
> LoadModule log_config_module modules/mod_log_config.so
>
> LoadModule mime_module modules/mod_mime.so
>
> LoadModule negotiation_module modules/mod_negotiation.so
>
> LoadModule setenvif_module modules/mod_setenvif.so
>
> LoadModule userdir_module modules/mod_userdir.so
>
> LoadModule php4_module d:/soft/php4/sapi/php4apache2.dll
>
> ServerAdmin [email protected]
>
> ServerName bbs.xbbs.cn:80
>
> UseCanonicalName Off
>
> DocumentRoot "D:/php"
>
>
1<directory></directory>
>
> Options FollowSymLinks
>
> AllowOverride None
>
>
>
>
1<directory "d:="" php"="">
2>
3> php_admin_value open_basedir "D:/php"
4>
5> </directory>
>
>
1<directory "d:="" attachments="" php=""></directory>
>
> php_flag engine off
>
>
>
> UserDir "My Documents/My Website"
>
> DirectoryIndex index.html index.php index.htm index.shtml index.php3
>
> AccessFileName .htaccess
>
>
1<files "^\\.ht"="" ~="">
2>
3> Order allow,deny
4>
5> Deny from all
6>
7> </files>
>
> TypesConfig conf/mime.types
>
> DefaultType text/plain
>
>
1<ifmodule mod_mime_magic.c="">
2>
3> MIMEMagicFile conf/magic
4>
5> </ifmodule>
>
> HostnameLookups Off
>
> ErrorLog logs/error.log
>
> LogLevel warn
>
> LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
>
> LogFormat "%h %l %u %t "%r" %>s %b" common
>
> LogFormat "%{Referer}i -> %U" referer
>
> LogFormat "%{User-agent}i" agent
>
> CustomLog logs/access.log common
>
> ServerTokens Full
>
> ServerSignature On
>
> Alias /icons/ "D:/soft/Apache/Apache2/icons/"
>
>
>
>
1<directory "d:="" apache="" apache2="" icons"="" soft="">
2>
3> Options Indexes MultiViews
4>
5> AllowOverride None
6>
7> Order allow,deny
8>
9> Allow from all
10>
11> </directory>
>
>
>
> AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "D:/soft/Apache/Apache2/manual$1"
>
>
>
>
1<directory "d:="" apache="" apache2="" manual"="" soft="">
2>
3> Options Indexes
4>
5> AllowOverride None
6>
7> Order allow,deny
8>
9> Allow from all
10>
11>
12>
13> <files *.html="">
14>
15> SetHandler type-map
16>
17> </files>
18>
19>
20>
21> SetEnvIf Request_URI ^/manual/de/ prefer-language=de
22>
23> SetEnvIf Request_URI ^/manual/en/ prefer-language=en
24>
25> SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
26>
27> SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
28>
29> SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
30>
31> SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
32>
33> RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
34>
35> </directory>
>
>
>
> ScriptAlias /cgi-bin/ "D:/soft/Apache/Apache2/cgi-bin/"
>
>
>
>
1<directory "d:="" apache="" apache2="" cgi-bin"="" soft="">
2>
3> AllowOverride None
4>
5> Options None
6>
7> Order allow,deny
8>
9> Allow from all
10>
11> </directory>
>
>
>
> IndexOptions FancyIndexing VersionSort
>
>
>
> AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
>
>
>
> AddIconByType (TXT,/icons/text.gif) text/*
>
> AddIconByType (IMG,/icon