这是我的配置文件,参考吧!
[PHP];;;;;;;;;;;
; WARNING ;
;;;;;;;;;;;
; This is the default settings file for new PHP installations.
; By default, PHP installs itself with a configuration suitable for
; development purposes, and *NOT* for production purposes.
; For several security-oriented considerations that should be taken
; before going online with your site, please consult php.ini-recommended
; and http://php.net/manual/en/security.php.
;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;
; This file controls many aspects of PHP's behavior. In order for PHP to
; read it, it must be named 'php.ini'. PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory. The
; path in which the php.ini file is looked for can be overridden using
; the -c argument in command line mode.
;
; The syntax of the file is extremely simple. Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
;
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
;
; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
;
; Expressions in the INI file are limited to bitwise operators and parentheses:
; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.
;
; An empty string can be denoted by simply not writing anything after the equal
; sign, or by using the None keyword:
;
; foo = ; sets foo to an empty string
; foo = none ; sets foo to an empty string
; foo = "none" ; sets foo to the string 'none'
;
; If you use constants in your value, and these constants belong to a
; dynamically loaded extension (either a PHP extension or a Zend extension),
; you may only use these constants *after* the line that loads the extension.
;
; All the values in the php.ini-dist file correspond to the builtin
; defaults (that is, if no php.ini is used, or if you delete these lines,
; the builtin defaults will be identical).
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;; Enable the PHP scripting language engine under Apache.
engine = On; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
short_open_tag = On; Allow ASP-style <% %> tags.
asp_tags = Off; The number of significant digits displayed in floating point numbers.
precision = 14; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
y2k_compliance = Off; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit. You can enable output buffering during runtime by calling the output
; buffering functions. You can also enable output buffering for all files by
; setting this directive to On. If you wish to limit the size of the buffer
; to a certain size - you can use a maximum number of bytes instead of 'On', as
; a value for this directive (e.g., output_buffering=4096).
output_buffering = Off; You can redirect all of the output of your scripts to a function. For
; example, if you set output_handler to "ob_gzhandler", output will be
; transparently compressed for browsers that support gzip or deflate encoding.
; Setting an output handler automatically turns on output buffering.
output_handler =; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
zlib.output_compression = Off; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block. This is equivalent to calling the
; PHP function flush() after each and every call to print() or echo() and each
; and every HTML block. Turning this option on has serious performance
; implications and is generally recommended for debugging purposes only.
implicit_flush = Off; Whether to enable the ability to force arguments to be passed by reference
; at function call time. This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend. The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration. You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).
allow_call_time_pass_reference = On
;
; Safe Mode
;
safe_mode = Off; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then turn on safe_mode_gid.
safe_mode_gid = Off; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path or full path must
; be used when including)
safe_mode_include_dir =; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
safe_mode_exec_dir =; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
;
;open_basedir =; Setting certain environment variables may be a potential security breach.
; This directive contains a comma-delimited list of prefixes. In Safe Mode,
; the user may only alter environment variables whose names begin with the
; prefixes supplied here. By default, users will only be able to set
; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
;
; Note: If this directive is empty, PHP will let the user modify ANY
; environment variable!
safe_mode_allowed_env_vars = PHP_; This directive contains a comma-delimited list of environment variables that
; the end user won't be able to change using putenv(). These variables will be
; protected even if safe_mode_allowed_env_vars is set to allow to change them.
safe_mode_protected_env_vars = LD_LIBRARY_PATH; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_functions =; Colors for Syntax Highlighting mode. Anything that's acceptable in
; <font color="??????"> would work.
highlight.string = #CC0000
highlight.comment = #FF9900
highlight.keyword = #006600
highlight.bg = #FFFFFF
highlight.default = #0000CC
highlight.html = #000000
;
; Misc
;
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
expose_php = On
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
[PHP];;;;;;;;;;;
; WARNING ;
;;;;;;;;;;;
; This is the default settings file for new PHP installations.
; By default, PHP installs itself with a configuration suitable for
; development purposes, and *NOT* for production purposes.
; For several security-oriented considerations that should be taken
; before going online with your site, please consult php.ini-recommended
; and http://php.net/manual/en/security.php.
;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;
; This file controls many aspects of PHP's behavior. In order for PHP to
; read it, it must be named 'php.ini'. PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory. The
; path in which the php.ini file is looked for can be overridden using
; the -c argument in command line mode.
;
; The syntax of the file is extremely simple. Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
;
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
;
; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
;
; Expressions in the INI file are limited to bitwise operators and parentheses:
; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.
;
; An empty string can be denoted by simply not writing anything after the equal
; sign, or by using the None keyword:
;
; foo = ; sets foo to an empty string
; foo = none ; sets foo to an empty string
; foo = "none" ; sets foo to the string 'none'
;
; If you use constants in your value, and these constants belong to a
; dynamically loaded extension (either a PHP extension or a Zend extension),
; you may only use these constants *after* the line that loads the extension.
;
; All the values in the php.ini-dist file correspond to the builtin
; defaults (that is, if no php.ini is used, or if you delete these lines,
; the builtin defaults will be identical).
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;; Enable the PHP scripting language engine under Apache.
engine = On; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
short_open_tag = On; Allow ASP-style <% %> tags.
asp_tags = Off; The number of significant digits displayed in floating point numbers.
precision = 14; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
y2k_compliance = Off; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit. You can enable output buffering during runtime by calling the output
; buffering functions. You can also enable output buffering for all files by
; setting this directive to On. If you wish to limit the size of the buffer
; to a certain size - you can use a maximum number of bytes instead of 'On', as
; a value for this directive (e.g., output_buffering=4096).
output_buffering = Off; You can redirect all of the output of your scripts to a function. For
; example, if you set output_handler to "ob_gzhandler", output will be
; transparently compressed for browsers that support gzip or deflate encoding.
; Setting an output handler automatically turns on output buffering.
output_handler =; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
zlib.output_compression = Off; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block. This is equivalent to calling the
; PHP function flush() after each and every call to print() or echo() and each
; and every HTML block. Turning this option on has serious performance
; implications and is generally recommended for debugging purposes only.
implicit_flush = Off; Whether to enable the ability to force arguments to be passed by reference
; at function call time. This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend. The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration. You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).
allow_call_time_pass_reference = On
;
; Safe Mode
;
safe_mode = Off; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then turn on safe_mode_gid.
safe_mode_gid = Off; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path or full path must
; be used when including)
safe_mode_include_dir =; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
safe_mode_exec_dir =; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
;
;open_basedir =; Setting certain environment variables may be a potential security breach.
; This directive contains a comma-delimited list of prefixes. In Safe Mode,
; the user may only alter environment variables whose names begin with the
; prefixes supplied here. By default, users will only be able to set
; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
;
; Note: If this directive is empty, PHP will let the user modify ANY
; environment variable!
safe_mode_allowed_env_vars = PHP_; This directive contains a comma-delimited list of environment variables that
; the end user won't be able to change using putenv(). These variables will be
; protected even if safe_mode_allowed_env_vars is set to allow to change them.
safe_mode_protected_env_vars = LD_LIBRARY_PATH; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_functions =; Colors for Syntax Highlighting mode. Anything that's acceptable in
; <font color="??????"> would work.
highlight.string = #CC0000
highlight.comment = #FF9900
highlight.keyword = #006600
highlight.bg = #FFFFFF
highlight.default = #0000CC
highlight.html = #000000
;
; Misc
;
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
expose_php = On
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; error_reporting is a bit-field. Or each number up to get desired error
; reporting level
; E_ALL - All errors and warnings
; E_ERROR - fatal run-time errors
; E_WARNING - run-time warnings (non-fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to an
; empty string)
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
;
; Examples:
;
; - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors except for notices
;
error_reporting = E_ALL & ~E_NOTICE; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = Off; Store the last error/warning message in $php_errormsg (boolean).
track_errors = Off; Disable the inclusion of HTML tags in error messages.
;html_errors = Off; String to output before an error message.
;error_prepend_string = "<font color=ff0000>"; String to output after an error message.
;error_append_string = "</font>"; Log errors to specified file.
;error_log = filename; Log errors to syslog (Event Log on NT, not valid in Windows 95).
;error_log = syslog; Warn if the + operator is used with strings.
warn_plus_overloading = Off
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
;
; Note - track_vars is ALWAYS enabled as of PHP 4.0.3; The separator used in PHP generated URLs to separate arguments.
; Default is "&".
;arg_separator.output = "&"; List of separator(s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!
;arg_separator.input = ";&"; This directive describes the order in which PHP registers GET, POST, Cookie,
; Environment and Built-in variables (G, P, C, E & S respectively, often
; referred to as EGPCS or GPC). Registration is done from left to right, newer
; values override older values.
variables_order = "EGPCS"; Whether or not to register the EGPCS variables as global variables. You may
; want to turn this off if you don't want to clutter your scripts' global scope
; with user data. This makes most sense when coupled with track_vars - in which
; case you can access all of the GPC variables through the $HTTP_*_VARS[],
; variables.
;
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = On; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information). If you don't use these variables, you
; should turn it off for increased performance.
register_argc_argv = On
post_max_size = 8M; This directive is deprecated. Use variables_order instead.
gpc_order = "GPC"; Magic quotes
;; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header. To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
;default_charset = "iso-8859-1"
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
include_path=.;c:\apache\htdocs
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
doc_root =; The directory under which PHP opens the script using /~usernamem used only
; if nonempty.
user_dir =; Directory in which the loadable extensions (modules) reside.
extension_dir = c:\php4\extensions; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
enable_dl = On; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
; cgi.force_redirect = 1; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
; cgi.redirect_status_env = ;
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;; Whether to allow HTTP file uploads.
file_uploads = On; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On; Define the anonymous ftp password (your email address)
;from="[email protected]"
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.
Apache 1.3.24
PHP 4.2.0
MYSQL 3.23.41a
phpMyadmin 2.2.4*************
*一.基本安装*
*************
还用说吗?大家已经人手一份程序,把他们全装上就行了~!呵呵~~建议把他们都装在一个目录下,方便使用嘛。
注意:如果有最新版的程序,建议安装最新版的,这样子很有可能解决以前出现的问题!切记!:)这里假设Windows98/2K装在目录windir下。其它程序建议安装如下:
x:\SERVER
|
|-PROGRAM
|
|-PHP PHP程序目录
|
|-MYSQL MYSQL程序目录
|
|-MYADMIN phpMyadmin程序目录
|
|-APACHE 服务器程序目录*********
*二.设置*
*********
关键就是这里了!大家一步一步慢慢来~!*****
*(1)*将PHP目录下的PHP4TS.DLL复制到windir\system(Win2K是system32),还有将PHP.INI-DIST复制到windir,改名为PHP.INI
*****有一些无关紧要的设置,按自己的需要改吧~:
upload_max_filesize = 2097152; 上载文件的最大字节
include_path = \path1;\path2;\path3…… 在使用include函数时,只有指定目录下的文件才可以被包含******************************************************************************************
关于Session : 有些人说PHP在运行Session的会显示错误,这个问题多半是因为没有为Session建立一个叫
tmp的目录。方法:在x:\下面建立一个tmp的目录。
***********************************************************************************************
*(2)*修改Apache的配置文件
*****在安装的时候,Apache会提示你输入服务器名等,其实都不重要的。因为这些可以后来再改的,哈哈。最重要的,是修改CONF目录下的HTTPD.CONF文件:
Servername xxxxxx 改为 Servername localhost******************************************************************************************
注意:
(1)有人反映,如上设置后,别人的机器无法访问到自己的服务器,访问时会转向localhost。
这个是Apache的问题,有如下规律:如果访问的URL是 http://你的IP/目录
Apache收到请求后 会把URL解析到你所设的ServerName 也就是localhost
那客户方就会访问失败了。要改成 http://你的IP/目录/
才能正常访问.另外.这个问题在直接访问文件的时候不存在.(2)在DocumentRoot的下面不远,会有这样几行:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "E:/server/program/Apache/htdocs">下面有一行:
Options FollowSymLinks MultiViews Indexes请把Indexes删除,改成
Options FollowSymLinks MultiViews这样,htdocs就不会被列出目录列表,要不是太没有安全感啦!大家一定要改!!
******************************************************************************************让Apache支持PHP其实也是很容易的呀,加上下面这么几句,就可以了!
ScriptAlias /php4/ "x:/PROGRAM/SERVER/PHP/"
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4 .php3
AddType application/x-httpd-php4 .php4
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php4 "/php4/php.exe"这是以CGI方式运行PHP程序!
运行Apache后,显示
Apache/1.3.24 (Win32) running...如果想要以模块方式运行,请按这样子:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
LoadModule php4_module "x:/server/program/php/sapi/php4apache.dll"运行Apache后,显示
Apache/1.3.24 (Win32) PHP/4.1.2 running...强烈推荐使用模块方式!!!Apache的默认启动文档为index.html、index.html还有DirectoryIndex,我们改成这样,支持更多的文档:
DirectoryIndex index.htm
DirectoryIndex index.html
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex index.php4好,已经完成了……一半(*#$*^&(#*&%#*&@……)!不过还是先写用phpinfo()写一个测试文件看看吧!:)******************************************************************************************
Win2K的Apache是以服务方式运行,方法是在控制台中运行Apache -i安装服务,运行Apache -u卸载服务。
***********************************************************************************************
*(3)*设置MYSQL
*****在目录下有一个文件MY-EXAMPLE.CNF拷贝到C:\下面,改名为MY.CNF
可以加入用户名,密码,登陆主机,数据库和端口等信息!到BIN目录下,运行MYSQLD-MAX(感觉这个是最好的)!正常情况下DOS窗口一闪而过, 然后按Ctrl+Alt+Del看看有没有,有就是行啦~:)******************************************************************************************
Win2K的MYSQL也是以服务方式运行,方法是在控制台中运行mysqld-max-nt --install安装服务,运行
mysqld-max-nt --remove卸载服务。然后要在winmysqladmin中设置my.ini文件,这是Win2K与Win98差别
最大的地方!!切记!!
******************************************************************************************
*****
*(4)*设置phpMyadmin
*****最新版的phpMyadmin比以前的几版又强大了很多!推荐大家使用!
需要修改一下目录下的config.inc.php文件,把127行的:
$cfgDefaultLang = 'en';
改为
$cfgDefaultLang = 'zh';这样就成中文版的了!虽然意思有点别扭……呵呵~!还有这里:
$cfgServers[1]['host'] = 'localhost';
$cfgServers[1]['port'] = '3306';
$cfgServers[1]['adv_auth'] = false;
$cfgServers[1]['stduser'] = 'root';
$cfgServers[1]['stdpass'] = '';
$cfgServers[1]['user'] = 'root';
$cfgServers[1]['password'] = '';
$cfgServers[1]['only_db'] = '';
$cfgServers[1]['verbose'] = '';这里是有关登录MYSQL服务器的设置,按上面改,缺啥补啥,这样就是使用MYSQL的缺省配置啦~呵呵:)到此,全部安装完成!去爽吧~:)
看看php带的安装说明文件吧iis+php 安装省事些
extension_dir = F:\php4\extensions就可以了.
那些extension除了必要,其它很少用得着的,完全可以不加.
#Bindaddress不要改请楼主按我写的装一下,好吗?
再试试。
Apache的默认安装目录是c:\program files\apache group\apache,
不过为了方便起见,不妨将它安装到c:\apache目录下。配置文件是
c:\apache\conf\httpd.conf,通常至少需要修改的是ServerName这
一项,把注释符号“#”去掉,最简单是后面跟IP地址,对于有WINS
的局域网用户可以用机器名,对于有DNS的网络用户可以用域名。在
Windows 2000下没有设置ServerName这一项会造成Apache不能启动。
还有一个影响是当用如下方式使用Alias时:
Alias /userdir "c:/userdir/"
假如这样调用:
http://localhost/userdir/
不会产生任何问题,可是如果这样调用:
http://localhost/userdir
那么localhost会被替换成ServerName所指定的值,如果这个值不能
被正确解析,就无法访问。
用户的配置项目添加在httpd.conf或者srm.conf中都可以,一说是将
所有的配置项目都放在httpd.conf中,这样只需要修改维护这一个
配置文件,比较方便,而且避免了冲突(这是srm.conf文件中说的!)。
可是httpd.conf确实太大了,要在里面搜索特定的项目就不很容易。
还有一说是将所有的用户自己添加修改的配置项目都放在srm.conf中,
这个文件很小,便于察看修改,本人倾向于后者。
在httpd.conf中,Apache的其它常用的可能需要修改的设置有:
ServerAdmin [email protected] #管理员的e-mail地址DocumentRoot "c:/apache/htdocs" #默认的根路径
注意路径全都是用斜线而不是反斜线来分隔DirectoryIndex index.html index.php index.php3 index.htm index.shtml
这一项指明了在每个目录中的默认文档及其顺序AccessFileName .htaccess #目录访问的配置文件名
用资源管理器会发现无法将一个文件改名成“.htaccess”,不过
在命令行方式下可以,用notepad也可以另存为这个文件名。关于PHPMYADMIN
在apache中
建一个alias就了
在httpd.conf中
加入
Alias /mysql "f:/phpMyAdmin/"
<Directory "f:/phpMyAdmin/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
只用如下几项了
$cfgPmaAbsoluteUri ='http://localhost';
$cfgServers[1]['user'] = 'root';
$cfgServers[1]['password'] = ''; 以上是apache+php+mysqlPHP4快速安装:
1. 将 php-4.0.0-Win32.zip 解压缩到一个目录下,例如
c:\apache\php
2. 将 c:\apache\php\php.ini-dist 拷贝到 c:\winnt 目录下,
并改名为 php.ini
3. 将 c:\apache\php\php4ts.dll 拷贝到 c:\winnt\system32 目录下
4. 修改 c:\apache\conf\srm.conf ,加入如下几行:
ScriptAlias /php/ "c:/apache/php/"
Addtype application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
5. 重新启动Apache (net stop apache, net start apache)
PHP4就可以运行了,创建一个文件 c:\apache\htdocs\info.php ,
内容只有一行:
<? phpinfo(); ?>
然后在浏览器地址栏中输入:http://localhost/info.php
PHP4内置对MySql的支持,不需要额外设置
非常感谢大家,好了,结帐吧!!对了想问一下,Apache运行成功会显示:Apache/1.3.12 (Win32) running... 那么,PHP运行成功会显示什么呀???
就会显示当前系统的PHP配置
当然,这是在PHP配置成功的情况下,试试吧
祝你成功。
最后再补充一句:有问题可以随时找我