win7 php iis mysql环境搭建

安装完PHP mysql 记得重新启动一下电脑。或者是在cmd 中用iisreset 重启一下iis 。 

 

http://www.chinaz.com/server/2010/0712/120236_4.shtml

如果根据上面链接无法下载到fastcgi  搜搜cgi 选择iis cgi 那个安装也可以

phpadmin 登陆出现 缺少mysqli的错误

北极的飞熊2012-03-16 16:50
我查阅了很多网站 终于找到了问题的所在

1.检查php.ini ;extension=php_mysqli.dll是不是已经启用 也就是去掉前面的;

2.检查php.ini extension_dir 地址是不是指向了php目录的ext目录下这步是关键 我就是处在这一步的问题上 我把 extension_dir = "e:\www\php54\ext" 设置成了自己的目录 就可以了 

3.检查lib_mysql.dll有没有拷贝到windows目录下  这个dll文件有多种形式的 有没加下划线的libmysql_d.dll 因此要注意自己看

4.检查php安装目录ext目录下,php_mysqli.dll文件是不是存在 网上也说明 最好使用zip包解压 不会出现文件丢失

5.查看php详细页面<?php phpinfo(); ?>,看看mysql和mysqli是不是已经启动这一步就是检查你有没有开启mysqli的
没有开启的话 你查找mysqli关键字是无法再php详细页面看到的 

cgi 配置如下链接

http://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/configuring-the-fastcgi-extension-for-iis-60

that handles multiple process pools is called the application manager.

Configuring FastCGI

Script Maps

To route requests to the FastCGI handler, you must associate the FastCGI handler with IIS. In IIS 6.0 and IIS 5.1, you can do this by using an IIS configuration setting called a "script map." Script maps are used to associate file extensions with the ISAPI handler that executes when that file type is requested. The script map also has an optional setting that verifies that the physical file associated with the request exists before allowing the request to be processed. For security reasons, this is the default setting.

However, you might want to allow a request to be processed that is not associated with a physical file. The ISAPI extension that contains the FastCGI handler is called fcgiext.dll. To configure the FastCGI handler to accept PHP requests, you must create a new script map that associates the ".php" extension with fcgiext.dll. For Ruby on Rails, you must map the ".rb" extension to fcgiext.dll and so on. In IIS 6.0 it is also possible to use a wildcard character in the script map. In this situation, all requests are routed to a single ISAPI extension. If you create a wildcard script map for fcgiext.dll, all requests go to FastCGI, regardless of the file extension that is requested.

To create a script map for the FastCGI handler on IIS 6.0 and IIS 5.1:

  1. Open IIS Manager.
  2. Double-click the machine icon for the local computer.
  3. Right-click Web Sites and then click Properties.
  4. Click the Home Directory tab.
  5. Click the Configuration… button.
  6. Click the Add… button.
  7. Browse to %WINDIR%\system32\inetsrv\ and select fcgiext.dll as the executable file.
    Note: If you are using a 64-bit platform in WOW mode, you must use the fcgiext.dll file that is located in the %WINDIR%\SysWOW64\inetsrv path.
  8. In the Extension text box, enter .php (or another extension that is specific to your FastCGI application).
  9. Under Verbs, in the Limit to text box, enterGET,HEAD,POST.
  10. Select the Script engine and Verify that file exists check boxes.
  11. Click OK.

FCGIEXT.ini

The configuration for FastCGI is a collection of one or more applications. A FastCGI application consists of a pool of processes that each handle HTTP requests. Each process in the pool handles one request at a time. After each request, the process is returned to the pool to await another request. Each application is required to have its own section in the configuration file to specify its behavior.

The main section of the fcgiext.ini file is the [types] section. This section associates file extensions from the URL with FastCGI applications.

The general syntax is as follows:

[types]
abc=Application1
def:/lm/w3svc/1701187997/root/app1=Application2
*:/lm/w3svc/1701187997/root/app1=Application3
def:1701187997=Application4
*:1701187997=Application5
def=Application6
*=Application7

The above example consists of seven mappings that are mapped as follows:

  • The file extension "abc" is associated with the FastCGI application named "Application 1".
  • The file extension "def" is associated with the FastCGI application named "Application 2", but only for requests that are made to the application /app1 under the site with the numeric identifier of "1701187997". Note that application-specific mappings override site, extension-specific mappings.
  • Requests to the application /app1 under the Web site with the identifier of "1701187997" and with a file extension other than "def" are associated with the FastCGI application named "Application 3".
  • The file extension "def" is associated with the FastCGI application named "Application 4", but only for requests that are made to the applications other than /app1 under the Web site with the numeric identifier of "1701187997". Note that site-specific mappings override non-site-specific mappings.
  • Requests to the applications other than /app1 under the Web site with the identifier of "1701187997" and with file extensions other than "def" are associated with the FastCGI application named "Application 5".
  • The file extension "def" is associated with the FastCGI application named "Application 6" for requests that are not for sites with the numeric identifier of "1701187997".
  • Requests with a file extension that does not have a specific mapping are associated with the FastCGI application named "Application 7".

Note: Application names are ASCII and should generally contain only alphanumeric characters. Space characters are allowed. Application names are not case sensitive.

Note: Multiple mappings can be associated with the same FastCGI application.

FastCGI Application Settings

The FastCGI extension has a set of configuration settings that controls the behavior of FastCGI processes that are associated with the FastCGI process pool. This section lists all the settings that are supported by FastCGI and their format:

  • ExePath - The physical path to the process executable to use in the pool.
  • Arguments - Arguments to pass to each process in the pool at start time. This setting is optional.
  • EnvironmentVars – Environment variables that are set for the process executable associated with this pool. This setting uses the following format:

EnvironmentVars=Name:Value,Name:Value,…,Name:Value

Example:

EnvironmentVars=VARIABLE1:10000,VARIABLE2:20000

If the environment variable value contains a space character, then enclose the value in quotes. If the environment variable value contains a comma character, then this character is escaped with "/". Similarly, if the environment variable value contains "/", then this character should be escaped as well.

Example:

EnvironmentVars=VARIABLE1:"C://PHP",VARIABLE2="1/,2/,3"
  • Protocol – This setting specifies the protocol to use to communicate with the FastCGI process. The allowed values are 'NamedPipe' and 'Tcp'. If not specified, the default value is 'NamedPipe'.
  • QueueLength – This setting specifies the maximum number of requests to this application's process pool that are queued before the FastCGI handler starts returning errors to clients, indicating that the application is too busy. If not specified, the default value is 1000.
  • MaxInstances – This is the highest number of process instances allowed in the process pool. Note that the FastCGI handler will not create this number of processes unless they are needed. If your application never receives more than two concurrent requests, your application only creates two processes. The default is 0, which means that the number of process instances will be adjusted automatically based on available memory and current CPU usage .
  • InstanceMaxRequests – This is the number of requests that are sent to a process in the pool before it is shut down and recycled. The default value is 1000.
  • IdleTimeout – This is the number of seconds that a process can remain idle without working on a request before it shuts down. The default is 300 seconds.
  • ActivityTimeout – This is the number of seconds that the FastCGI handler waits for I/O activity from a process before it is terminated. The default is 30 seconds.
  • RequestTimeout – This is the maximum amount of time that a FastCGI process is allowed to handle a request before it is terminated. The default value is 90 seconds.
  • ResponseBufferLimit – Data from FastCGI processes is buffered before being returned to the client as responses. This property specifies the amount of response data, inbytes, that is buffered for requests to this application. This bufferis flushed to the client once it is full, or when the response is complete, whichever occurs first. If not specified, the default value is4194304 (4MB).
  • FlushNamedPipe – There are some cases where a FastCGI application might not read all of the data from the named pipe that communicates with the Web server. If this happens, the Web server waits for a read that is not coming, causing a deadlock on that member of the process pool. This most often happens in the case where the FastCGI process abnormally exits. For instance, the process may have an internal notion of the maximum number of requests that it can handle that is less than theInstanceMaxRequests setting. Setting FlushNamedPipe to 1 will cause FastCGI to flush data that might lead to this condition. The default value is 0.
  • UnhealthyOnQueueFull – If the value is 1, the worker process that is hosting is flagged to IIS as unhealthy any time that the application's request queue is filled. IIS checks health whenever it does a ping to the worker process. If that worker process has been flagged as unhealthy, it (along with everything it is hosting) will be recycled. If not specified, the default value is 0.
  • MonitorChangesTo - This property specifies the path to a file, changes to which will trigger a recycle of FastCGI executables that are running for this FastCGI process pool. If the value of this property is blank, file change monitoring is disabled. The path to a file can be absolute or relative to the folder in which the FastCGI process (as specified by ExePath) is present. If not specified, the default value is blank.
  • StderrMode - This setting specifies how content that is received on stderr is handled. The allowed values are:
    • 'ReturnStderrIn500' - The FastCGI extension will set the response status code to 500 and send whatever was received on the stderr stream as a response. This is the same behavior as in the FastCGI Extension v1.0.
    • 'ReturnGeneric500' - The FastCGI extension will set the response status code to 500, but will return a generic 500 response.
    • 'IgnoreAndReturn200' - Data on stderr is completely ignored and the FastCGI extension will send what was received onstdout as a response, with the status code 200.
    • 'TerminateProcess' - The FastCGI extension will terminate the FastCGI process as soon as it returns anything onstderr. A generic response with the status code 500 will be sent to the HTTP client.

    If this setting is not specified, the default value is 'ReturnStderrIn500'.
  • MaxInstances - This setting dictates the maximum number of FastCGI processes that can be launched for each application pool. This value is also equal to the maximum number of requests that can be processed simultaneously, since one process handles only one request at a time. This setting existed in the FastCGI Extension v1.0; however, with FastCGI Extension v1.5, the value can be set to 0, which will turn on automatic adjustment of the maximum number of instances. When the value is set to 0, the FastCGI extension will constantly analyze current CPU load and memory availability and, based on that, will increase or decrease the number of FastCGI process instances that are running at the same time.
  • SignalBeforeTerminateSeconds - This setting specifies the number of seconds to elapse after setting the shutdown event and before calling TerminateProcess, thereby forcibly terminating the process. The default value is 0, which means that the event is not set and the FastCGI processes can be terminated abruptly at any time. If this value is greater than 0, the FastCGI process will create an event that is inherited by the child process. The value of this event's handle is set as the environment variable _FCGI_SHUTDOWN_EVENT_. The name of the named pipe, which is used to communicate with the process, is stored in the environment variable _FCGI_X_PIPE_.
  • ActivityTimeout - This is the number of seconds that the FastCGI handler waits for I/O activity from a process before it is terminated. This setting existed in the FastCGI Extension v1.0, but in v1.5 its default value has been increased from 30 seconds to 70 seconds.

Using UTF-8 Encoding for Server Variables

By default, the FastCGI extension uses ASCII encoding when setting server variables that are used by PHP. When the requested URL contains non-ASCII characters, server variables that derive their values from the requested URL string may be set incorrectly. PHP applications that rely on those server variables may not work as a result.

To prevent this, the FastCGI extension can be configured to use UTF-8 encoding when setting server variables. To configure FastCGI to use UTF-8 encoding for a particular set of server variables, use theREG_MULTI_SZ registry keyFastCGIUtf8ServerVariables and set its value to a list of server variable names. For example:

reg add HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\w3svc\Parameters/vFastCGIUtf8ServerVariables/t REG_MULTI_SZ/d REQUEST_URI\0PATH_INFO

The above example configures the FastCGI extension to use UTF-8 encoding when setting the REQUEST_URI and PATH_INFO server variables.

After setting the registry key, restart IIS by using the iisreset command.

Warning: Using UTF-8 encoding for server variables may affect how PHP core and PHP applications work. Make sure to verify that applications work as expected after the registry key has been changed.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值