


windows-server - php+iis6.0+mysql+windows server 2003 总是导致应用地址池奔溃停止运行?
先描述一下大前提:
服务器使用的是 windows server 2003 + iis6 + mysql + php[isapi模式] 进行配置的,并且站点上有13个虚拟站点,其中 4个站点为纯PHP脚本站点,其他是asp或者 asp.net 站点,所以服务器并不是那么纯净。
现在问题是,
在这4个PHP站点中,一个是dzx!2.5搭建的社区系统(A),一个是使用jishigou搭建的微博平台(B),一个是使用ucenter搭建的用户中心(C),最后一个位自己写的程序(D)。
以上A、B、C、D创建站点时,均自有程序应用地址池分别对应为:A1,B1,C1,D1;
在流量和IP均为发生大变动的情况下,站点A的A1应用地址池总是无故假死,但其他站点B、C、D都可正常访问,需要手动回收和释放当前A1,甚至都无法正常启动World Wide Web Publishing Service服务。登录服务器上看,总会弹出这个提示(如下图):
以上错误信息均在php + iis + isapi模式下运行;
倘若,更换php的运行模式为fastcgi,则不会出现以上情况,但是fastcgi的线程数总会提示满,于是需要开启更大的线程以此解决。
最后,站点A使用的dzx!2.5为原生系统,前端并未修改,修改的为后台。
回复内容:
先描述一下大前提:
服务器使用的是 windows server 2003 + iis6 + mysql + php[isapi模式] 进行配置的,并且站点上有13个虚拟站点,其中 4个站点为纯PHP脚本站点,其他是asp或者 asp.net 站点,所以服务器并不是那么纯净。
现在问题是,
在这4个PHP站点中,一个是dzx!2.5搭建的社区系统(A),一个是使用jishigou搭建的微博平台(B),一个是使用ucenter搭建的用户中心(C),最后一个位自己写的程序(D)。
以上A、B、C、D创建站点时,均自有程序应用地址池分别对应为:A1,B1,C1,D1;
在流量和IP均为发生大变动的情况下,站点A的A1应用地址池总是无故假死,但其他站点B、C、D都可正常访问,需要手动回收和释放当前A1,甚至都无法正常启动World Wide Web Publishing Service服务。登录服务器上看,总会弹出这个提示(如下图):
以上错误信息均在php + iis + isapi模式下运行;
倘若,更换php的运行模式为fastcgi,则不会出现以上情况,但是fastcgi的线程数总会提示满,于是需要开启更大的线程以此解决。
最后,站点A使用的dzx!2.5为原生系统,前端并未修改,修改的为后台。
不建议用isapi方式,建议使用 http://www.iis.net/download/FastCGI
C:\WINDOWS\system32\inetsrv\fcgiext.ini内容仅供参考
<code>[Types] php=PHP [PHP] ExePath=D:\php\php-cgi.exe InstanceMaxRequests=10000 EnvironmentVars=PHP_FCGI_MAX_REQUESTS:10000 </code>
php.ini中几个关键点仅供参考
<code>output_buffering = On cgi.force_redirect = 0 cgi.fix_pathinfo = 1 fastcgi.impersonate = 1 </code>
php.ini中的安全考虑
<code>disable_functions = system,passthru,shell_exec,exec,popen,proc_open enable_dl = Off </code>
php.ini中尽量设置独立的临时目录等
<code>upload_tmp_dir = "d:/tmp/uploadtemp/" session.save_path = "d:/tmp/sessiondata/" date.timezone = "Etc/GMT-8" ; GMT+8 mbstring.language = Neutral ; Set default language to Neutral(UTF-8) (default) mbstring.internal_encoding = UTF-8 ; Set internal encoding to UTF-8 </code>
建议在windows平台使用线程安全的php,建议所有php站点使用同一个程序应用池。
如果有可能,别在windows平台跑php。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.

The main difference between MySQL and MariaDB is performance, functionality and license: 1. MySQL is developed by Oracle, and MariaDB is its fork. 2. MariaDB may perform better in high load environments. 3.MariaDB provides more storage engines and functions. 4.MySQL adopts a dual license, and MariaDB is completely open source. The existing infrastructure, performance requirements, functional requirements and license costs should be taken into account when choosing.

Multiple calls to session_start() will result in warning messages and possible data overwrites. 1) PHP will issue a warning, prompting that the session has been started. 2) It may cause unexpected overwriting of session data. 3) Use session_status() to check the session status to avoid repeated calls.

SQL is a standard language for managing relational databases, while MySQL is a database management system that uses SQL. SQL defines ways to interact with a database, including CRUD operations, while MySQL implements the SQL standard and provides additional features such as stored procedures and triggers.

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

MySQL and phpMyAdmin can be effectively managed through the following steps: 1. Create and delete database: Just click in phpMyAdmin to complete. 2. Manage tables: You can create tables, modify structures, and add indexes. 3. Data operation: Supports inserting, updating, deleting data and executing SQL queries. 4. Import and export data: Supports SQL, CSV, XML and other formats. 5. Optimization and monitoring: Use the OPTIMIZETABLE command to optimize tables and use query analyzers and monitoring tools to solve performance problems.

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

To safely and thoroughly uninstall MySQL and clean all residual files, follow the following steps: 1. Stop MySQL service; 2. Uninstall MySQL packages; 3. Clean configuration files and data directories; 4. Verify that the uninstallation is thorough.
