Home > Backend Development > PHP Tutorial > 大神php连接Mysql , php.ini配置有关问题

大神php连接Mysql , php.ini配置有关问题

WBOY
Release: 2016-06-13 12:46:34
Original
819 people have browsed it

大神求救php连接Mysql , php.ini配置问题
跟很多人一样,出现php连接不上,在网上搜了很多,都没有解决
首先我的配置:apache2.2.22 + php5.4.14 + mysql 5.0
错误信息:
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\apache\htdocs\index.php on line 6


在windows下有php.ini 并且配置了
extension=php_mysql.dll
extension=php_mysqli.dll  前面的;去掉了
我的安装路径是这样的:
extension_dir = "C:/myenv/php-5.3.5/ext"
路径都是没问题的

把 ../mysql/bin/libmySQL.dll   拷贝到 php5.0 下面,还有拷贝到 php5.0/ext 目录下
windows/System32中导入了libmySQL.dll   php5ts.dll 两个文件



在apache中的http.conf中 配置了
#载入apache处理PHP模块,用于PHP文件配置
LoadModule php5_module C:/myenv/php-5.3.5/php5apache2_2.dll
#PHPIniDir用于指定PHP的ini文件
PHPIniDir "C:/myenv/php-5.3.5"
AddType application/x-httpd-php .php .phtml


我已经尽力了,搞了半天没搞出来 ,郁闷,求高手解救!!!

PHP MySQL Apache
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