解决【Apache is running a threaded MPM, but your php module is not compiled to be threadsafe.】

【详细错误】:Apache is running a threaded MPM, but your php module is not compiled to be threadsafe. you need to recompile php. pre-configuration failed.

【造成原因】:服务管理器由IIS更换至Apache,原php版本是无线程安全(nts)的,因此需要将php同时更换为线程安全版本(ts).

【处理办法】:

1.  下载新的php5.2.17 VC6 x86 Thread Safe,更新原php程序.

2. 打开php.ini文件:(添加或打开)

extension_dir = "PHP安装目录\ext"

default_charset = "gbk" 

extension=php_mysql.dll

3.把php5ts.dll复制到c:\windows\system32下.

下面再配置一下Apache的conf文件:

1. 打开apache目录下/conf/httpd.conf文件.

2. 编辑添加新的记录:

LoadModule php5_module "php安装目录/php5apache2_2.dll"
PHPIniDir "php安装目录/php.ini"
AddType application/x-httpd-php .php

3. 再次启动apache,ok启动成功~



你可能感兴趣的:(apache,thread,PHP,windows,Module,extension)