Home > Backend Development > PHP Tutorial > win7 sp1筹建PHP环境,PHP连接不到mysql,很奇怪

win7 sp1筹建PHP环境,PHP连接不到mysql,很奇怪

WBOY
Release: 2016-06-13 12:37:32
Original
920 people have browsed it

win7 sp1搭建PHP环境,PHP连接不到mysql,很奇怪
找不到原因啊,我本地mysql可以在cmd下面完全可以连接,新建数据库,数据表,一切正常,但是用PHP连接就不行,先说下我的环境

win7sp1 64 ,php5.2.5 apache2.2
php和apache已经整合了,APACHE的最后配置是这样的

LoadModule php5_module "D:/service/php/php5apache2_2.dll"
PHPIniDir "D:/service/php"
AddType application/x-httpd-php .php

但是phpinfo里面没有mysql的信息,我自己找了下,有的说是HOST文件的问题,我添加了 127.0.0.1到localhost也是一样,然后用虚拟机安装也是一样,PHP.INI已经开启了mysql和mysqli的模块,我不知道问题出在哪儿。










然后用mysql_connect()来连接就提示mysql_connect这个函数出问题,应该是这个意思吧



PHP里面EXT的位置也是对的,EXT目录里面也有php_mysql.dll文件,请大牛帮我分析下问题会是出在什么地方,非常感谢。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template