Home > php教程 > php手册 > 无法载入 mysql 扩展 请检查 PHP 配置

无法载入 mysql 扩展 请检查 PHP 配置

WBOY
Release: 2016-05-25 16:52:15
Original
1152 people have browsed it

今天在配置apache与php环境时个人感觉配置好了,自己写了测试php文件都是可以成功执行了,但是在运行 phpMyAdmin 时提示无法载入 mysql 扩展,请检查 PHP 配置,后来经过排查找出了解决办法,下面分享给大家.

环境配置好了我测试文件如一 a.php

<?php 
echo phpinfo(); 
$cn = mysql_connect(&#39;localhost&#39;,&#39;ttftroat&#39;,&#39;xxx&#39;) or die(mysql_error()); 
?>
Copy after login

输入结果是没有问题了,但我在利用phpmyadmin时提示:phpMyAdmin - 错误,无法载入 mysql 扩展,请检查PHP 配置 - 文档.

解决办法:搜索"extension_dir = ./",改成"extension_dir = C:phpext",再把这些分号去了:

extension=php_mbstring.dll 
extension=php_gd2.dll 
extension=php_mysql.dll
Copy after login

再重启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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template