今天自己尝试这学习PHP环境搭建。
没想到安装apche server 2.2启动后报出错误,错误log如下:
Starting the Apache2.2 service The Apache2.2 service is running. ] Apache/2.2.21 (Win32) configured -- resuming normal operations [Fri Sep 23 15:45:03 2011] [notice] Server built: Sep 9 2011 10:26:10 [Fri Sep 23 15:45:03 2011] [notice] Parent: Created child process 2452 [Fri Sep 23 15:45:03 2011] [notice] Child 2452: Child process is running [Fri Sep 23 15:45:03 2011] [notice] Child 2452: Acquired the start mutex. [Fri Sep 23 15:45:03 2011] [notice] Child 2452: Starting 64 worker threads. [Fri Sep 23 15:45:03 2011] [notice] Child 2452: Starting thread to listen on port 80.
经过在网上搜索,解决办法如下。
1 将php.ini所在目录添加到环境变量path中
2 新建系统变量 PHPRC=“php.ini所在目录”
3 如果经过以上两部还是不成功那就出绝招:将php安装目录下libmysql.dll文件拷贝到windows/system32下
4 将libmysql.dll拷贝到apache/bin下
我是经过124步骤之后就成功了:)
还发生以下错误:
[Fri Sep 23 16:18:14 2011] [crit] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. Pre-configuration failed [Fri Sep 23 16:18:14 2011] [notice] Child 2452: Released the start mutex [Fri Sep 23 16:18:15 2011] [notice] Child 2452: All worker threads have exited. [Fri Sep 23 16:18:15 2011] [notice] Child 2452: Child process is exiting
php的版本 和你的apach版本不一致。apache不支持。需要重新下载安装php.下载地址:http://windows.php.net/download/ 下载注意选择类型,例如:VC6 x86 Non Thread Safe (2011-Mar-22 13:28:39)
httpd-2.2.21-win32-x86-no_ssl.msi 安装OK。
httpd-2.2.21-win32-x86-openssl-0.9.8r.msi安装一直报以下错误,原因可能是ssl认证的问题吧?
Starting the Apache2.2 service The Apache2.2 service is running. ] Apache/2.2.21 (Win32) configured -- resuming normal operations [Fri Sep 23 15:45:03 2011] [notice] Server built: Sep 9 2011 10:26:10 [Fri Sep 23 15:45:03 2011] [notice] Parent: Created child process 2452 [Fri Sep 23 15:45:03 2011] [notice] Child 2452: Child process is running [Fri Sep 23 15:45:03 2011] [notice] Child 2452: Acquired the start mutex. [Fri Sep 23 15:45:03 2011] [notice] Child 2452: Starting 64 worker threads. [Fri Sep 23 15:45:03 2011] [notice] Child 2452: Starting thread to listen on port 80.