`

使用PHP访问MySQL,Apache httpd.exe报错

    博客分类:
  • php
阅读更多

我的环境是:

apache 2.2.17

php-5.2.17

mysql-5.1.47

按照http://www.php.net/manual/en/install.windows.php步骤配置完成后,访问hello world.php没有问题,但是一旦访问mysql,就会出现Visual Stuido的debugger界面(因为我机器上有Visual Stuido的缘故),提示“an unhandled win32 exception occured in httpd.exe[5248]”,点yes,进去后提示“Unhandled exception at 0x007dacca in httpd.exe: 0xC0000005: Access violation reading location 0x00000014.”

最终的解决办法是将php-5.2.17下的libmysql.dll拷贝到apache的bin目录。这里注意的是,虽然mysql的bin目录也有这个文件,但是copy过去后问题仍然存在,只有把php目录的libmysql.dll copy过去才好使。

 

分享到:
评论
1 楼 zyllezi 2012-06-14  
困扰了好久,终于解决了,多谢博主

相关推荐

Global site tag (gtag.js) - Google Analytics