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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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 is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.
