php5.2以下版本安装与扩展库的安装
php5.2以上版本安装与扩展库的安装
安装完phpmyadmin,大家经常出现的问题就是报错:"无法载入mysql扩展,请检查php配置"。
如果你使用的是php5.2以上的版本,请注意:php对服务的扩展功能做了一定的改动,也就是说,你安装php和扩展的方式也要做调整了。
主要的调整有两方面,一是PHP5.2以上的版本中,PHP.INI文件无需添加到WINDOWS目录下。二是类如"mysql扩展"这样的库文件 C:\PHP\libmcrypt.dll要复制到到C:\PHP\ext目录中,而不是像老版本的安装方式复制到c:\windows \system32中。
具体的安装步骤请耐心参考下文:
1.将PHP5.2.X解压至你的安装目录,如C:\PHP
2.在apache的配置文档http.conf文件中,加入以下代码,使apache能将php以模块方式加载:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
3.在apache的配置文档http.conf文件中,加入以下代码,指定PHP.INI文件的所在目录:
PHPIniDir "C:/php"
4.将PHP.INI-DIST更名为PHP.INI,并编辑C:\PHP\PHP.INI文件:
找到extension_dir = "./"
更改为extension_dir = "C:\php\ext"
找到;extension=php_mysql.dll
去掉前面的分号。
5.现在是最重要的步骤,请注意:复制C:\PHP\libmysql.dll至C:\PHP\ext目录下,用来支持MYSQL扩展库,
并在APACHE2.2的配置文件中加入
LoadFile C:\php\php5ts.dll
LoadFile C:\php\libmysql.dll
6.重启WEB服务
7.IIS用户,更改内容同上,需要把PHP.INI文件复制到%STSTEMROOT%下
完成以上操作后重启服务。
当配置完毕所有服务后,安装PhpMyAdmin,会有出现"无法载入 mcrypt 扩展,请检查 PHP 配置"的提示,针对这个问题的解决办法是:
1.编辑APACHE2.2.X的配置文件HTTPD.CONF中添加LoadFile C:\php\libmcrypt.dll
2.复制C:\PHP\libmcrypt.dll到C:\PHP\ext,用于完整扩展文件。
3.编辑C:\PHP\PHP.INI文件,找到;extension=php_mcrypt.dll,去掉前面分号";"
如果,安装PhpMyAdmin时也出现--"没有发现 PHP 的扩展设置mbstring, 而当前系统好像在使用宽字符集;没有 mbstring 扩展的 phpMyAdmin 不能正确识别字符串,可能产生不可意料的结果"的提示,针对这个问题的解决办法是:
编辑C:\PHP\PHP.INI找到;extension=php_mbstring.dll,去掉前面的分号";"
完成以上操作后再次重启服务。
最后,是使用PHPMYADMIN3前的一些基本把配置,这个配置是针对phpMyadmin3.0以上的版本。
配置前确定你以按上文正确配置了PHP运行环境。
配置基本步骤如下:
1.复制phpMyAdmin\libraries\config.default.php到phpMyAdmin根目录并改名为config.inc.php
2.编辑config.inc.php
$cfg['blowfish_secret'] = '';更改为$cfg['blowfish_secret'] = 'abcd';两个单引号中随便输入任何字符都可以。
$cfg['Servers'][$i]['auth_type'] = 'config';更改为$cfg['Servers'][$i]['auth_type'] = 'cookie';
保存后,刷新页面,输入MYSQL的登陆账号和密码就可以了。
如果出现Cookies 必须启用才能登入的问题,清空浏览器的Cookies就可以了
原文:http://student.csdn.net/space.php?uid=435961&do=blog&id=36724

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...
