php - 我安装了 Apache 并向其中添加了 PHP,而不是安装了 MySql,但 PHPMYADMIN 无法正常工作?

标签 php mysql phpmyadmin

我正在使用 XAMP对于 Windows,但是 MySql 形成了很多问题所以卸载并安装了Apache Web Server .我将 Apache 连接到 PHP它工作正常。我安装了MySql再次运行,效果很好。

现在我无法获得MySqlPHPMyAdmin一起工作.我没有测试 PHP 看它是否适用于 MySql没有 PHPMyAdmin .

我的 PHPMYADMIN config.inc 文件:

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpMyAdmin sample configuration, you can use it as base for
 * manual configuration. For easier setup you can use setup/
 *
 * All directives are explained in Documentation.html and on phpMyAdmin
 * wiki <http://wiki.phpmyadmin.net>.
 *
 * @version $Id: config.sample.inc.php 13111 2009-11-09 15:02:21Z lem9 $
 * @package phpMyAdmin
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = '***********'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';

/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma_relation';
// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
// $cfg['Servers'][$i]['history'] = 'pma_history';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

/*
 * End of servers configuration
 */

 /*
  * Directories for saving/loading files from server
  */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>

$cfg['blowfish_secret'] = '************'; 这行/* 您必须为 COOKIE A​​UTH 填写此内容! */ 不是真的这么说,我只是不想分享而已。顺便说一句,它只包含字母。

PHP PHP.INI 文件:

我太大了,不能放在这里。要查看它,请查看链接: http://ericlounge.host22.com/000/stack/php.ini

顺便说一句:我正在使用 Windows 7

编辑:抱歉信息不足。我很着急。我不再是了:

错误说: 无法加载 mysql 扩展。请检查您的 PHP 配置。 - 文档

我的 PHPINFO PAGE 没有提到任何关于 MySql 的信息,但我可能已经错过了。我把源代码放到一个页面中。只需点击以下链接: http://ericlounge.host22.com/000/stack/phpinfo.html

我按照 pdjota 所说的做了,但我得到了错误:

fatal error :在第 2 行调用 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mysqltest.php 中未定义的函数 mysql_connect()

最佳答案

创建一个只包含

<?php
phpinfo();
?>

从浏览器访问它并查看 php 是否配置了 mysql 支持。

你的 phpinfo 输出应该有一个 MySQL 部分, 这是一个你应该有类似 mysql 信息的例子 http://74.125.47.132/search?q=cache:Pto_DJIncV8J:www.entropy.ch/software/MacOSX/php/test.php+phpinfo&cd=6&hl=en&ct=clnk&gl=us&client=firefox-a

关于php - 我安装了 Apache 并向其中添加了 PHP,而不是安装了 MySql,但 PHPMYADMIN 无法正常工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2299400/

相关文章:

php - 如何在 Android 应用程序中比较 mysql 和 PHP 中的表

mysql - 将相关表中每种颜色产品的尺寸列显示为行?

php - where_in 只返回 1 行

php - 自动刷新网页

javascript - 不允许用于访问此页面的 HTTP 动词

javascript - 使用 Ajax 在提交表单时保持在同一页面上不起作用

MySQL 向变量中插入一列

mysql - 如何从按公共(public)列排序的数据库中导出所有表?

php - 交响学说协会

php - 在 PHP 类中使用全局 DB 变量