+ -
当前位置:首页 → 问答吧 → Apache老崩溃,非常头疼的问题,请各位看看是怎么回事。

Apache老崩溃,非常头疼的问题,请各位看看是怎么回事。

时间:2008-10-08

来源:互联网

我的环境:Windows Vista Ultimate SP1
Apache 2.2.8
PHP 5.2.6.6
Mysql 5.1.28

在一个php文件中如下代码:[code]<?php


$server = 'localhost';
$user = 'root';
$password = '';
$client_flags = 128;


$link = mysql_connect($server, $user, $password, true, $client_flags);
[/code]当执行到mysql_connect这句的时候,Apache就会崩溃,提示:
Apache HTTP Server已停止工作并已关闭。
出现了一个问题,该问题导致应用程序停止正常工作。如果有可用的解决方案,Windows将会通知您。


windows事件查看器中:
错误应用程序 httpd.exe,版本 2.2.9.0,时间戳 0x4852383f,错误模块 php5ts.dll,版本 5.2.6.6,时间戳 0x481b8f4b,异常代码 0xc0000005,错误偏移量 0x0000abda, 进程 ID 0xa50,应用程序启动时间 0x01c92930b1686968。
任务类别:(100)


Apache的log中:
[Wed Oct 08 17:49:43 2008] [notice] Parent: child process exited with status 255 -- Restarting.
[Wed Oct 08 17:49:43 2008] [notice] Apache/2.2.9 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Wed Oct 08 17:49:43 2008] [notice] Server built: Jun 13 2008 04:04:59
[Wed Oct 08 17:49:43 2008] [notice] Parent: Created child process 5528
[Wed Oct 08 17:49:43 2008] [error] python_init: Python version mismatch, expected '2.5', found '2.5.2'.
[Wed Oct 08 17:49:43 2008] [error] python_init: Python executable found 'D:\\Program Files\\Apache Software Foundation\\Apache2.2.9\\bin\\httpd.exe'.
[Wed Oct 08 17:49:43 2008] [error] python_init: Python path being used 'C:\\Windows\\system32\\python25.zip;D:\\Program Files\\Python25\\Lib;D:\\Program Files\\Python25\\DLLs;D:\\Program Files\\Python25\\Lib\\lib-tk;;D:\\Program Files\\Apache Software Foundation\\Apache2.2.9\\bin'.
[Wed Oct 08 17:49:43 2008] [notice] mod_python: Creating 8 session mutexes based on 0 max processes and 64 max threads.
[Wed Oct 08 17:49:43 2008] [notice] Child 5528: Child process is running
[Wed Oct 08 17:49:43 2008] [notice] Child 5528: Acquired the start mutex.
[Wed Oct 08 17:49:43 2008] [notice] Child 5528: Starting 64 worker threads.
[Wed Oct 08 17:49:43 2008] [notice] Child 5528: Starting thread to listen on port 80.
[Wed Oct 08 17:49:43 2008] [notice] Child 5528: Starting thread to listen on port 10008.




是今天忽然出现的这个问题,之前用的都没问题,而且配置文件也没改过。
mod_python去掉也一样,排除mod_python的问题。
已经把PHP、MySQL、Apache都重装过了,还是这个错误。

而且那个php文件用php.exe运行也没有报错。


其他的方法想不到了,请各位帮帮忙,这个问题搞的我真有点没辙了。



作者: jaypei   发布时间: 2008-10-08

感觉这个报错是和你几个dll的匹配有关.

老实说玩apache就别在windows下了.问题多多.

作者: londit.cn   发布时间: 2008-10-14

原帖由 londit.cn 于 2008-10-14 18:12 发表
感觉这个报错是和你几个dll的匹配有关.

老实说玩apache就别在windows下了.问题多多.
把这些问题解决了
你就是环境配置的高手了

作者: jackygz   发布时间: 2008-10-14

个人感觉 apache 2.2.9 兼容性有点低
换个版本试试看看

作者: jackygz   发布时间: 2008-10-14

不只是mod_python问题,本身apache兼容python+php就很不好.
所以建议你把python卸栽试试吧(注意一定要卸栽干净才行,不只是卸栽个mod_python,其他相关也一样)
-------------------------
另外:mysql_connect($server, $user, $password, true, $client_flags);
改成:
mysql_connect($server, $user, $password);
试试

作者: xieaotian   发布时间: 2008-10-15

热门下载

更多