登陆后出现:
Index of /phpMyAdmin-3.5.1-all-languages
而没有出现登陆窗口。phpMyAdmin我是解压到了这里。
/var/www/html/phpMyAdmin-3.5.1-all-languageslibraries/config.default.php
配置文件如下:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin-3.5.1-all-languages/';
Index of /phpMyAdmin-3.5.1-all-languages
而没有出现登陆窗口。phpMyAdmin我是解压到了这里。
/var/www/html/phpMyAdmin-3.5.1-all-languageslibraries/config.default.php
配置文件如下:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin-3.5.1-all-languages/';
你确定你没弄错?
难道是这个原因?我现在浏览器输入http://localhost/phpMyAdmin-3.5.1-all-languages/
出现下面的php代码,没有出现登陆界面<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* forms frameset
*
* or common.inc.php
* @package PhpMyAdmin
*//**
* Gets core libraries and defines some variables
*/
require_once './libraries/common.inc.php';// free the session file, for the other frames to be loaded
session_write_close();// Gets the host name
if (empty($HTTP_HOST)) {
if (PMA_getenv('HTTP_HOST')) {
$HTTP_HOST = PMA_getenv('HTTP_HOST');
} else {
如果你的专业方向只是mysql数据库,那不如直接在命令行下敲命令吧!
但为什么打开
http://localhost/phpMyAdmin-3.5.1-all-languages/index.php
还是显示代码的形式呢?
vi /var/www/html/info.php
<?php
phpinfo();
?>我测试了下这个info.php能正常运行了。
为什么
http://localhost/phpMyAdmin-3.5.1-all-languages/index.php还是没有显示登陆界面,只显示php代码呢
2:复制一份phpMyAdmin 里面的 config.sample.inc.php ,将其命名为:config.inc.php
3:找到下面两行,将//注释符去掉。并改为你mysql的用户名与密码。
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';4:url上输入 http://localhost/phpMyAdmin/index.php进行访问。
就显示出一些参数啊。
不是显示php代码了。
System Linux localhost.localdomain 2.6.35.14-106.fc14.i686 #1 SMP Wed Nov 23 13:57:33 UTC 2011 i686
Build Date Sep 28 2011 17:35:06
Configure Command './configure' '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--d
phpmyadmin 不是有个setup 可以进去里面生成一个相关配置文件的操作的. 不过我记得我即使不生成这个文件也不会出现php代码... ...
?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* forms frameset
*
* or common.inc.php
* @package PhpMyAdmin
*//**
* Gets core libraries and defines some variables
*/
require_once './libraries/common.inc.php';// free the session file, for the other frames to be loaded
session_write_close();// Gets the host name
if (empty($HTTP_HOST)) {
if (PMA_getenv('HTTP_HOST')) {
$HTTP_HOST = PMA_getenv('HTTP_HOST');
} else {
$HTTP_HOST = '';
}
}
// purge querywindow history
$cfgRelation = PMA_getRelationsParam();
if ($GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork']) {
PMA_purgeHistory($GLOBALS['cfg']['Server']['user']);
}
unset($cfgRelation);
你看看源代码如果是?php 前面加个< 然后看看 你是不是改过文件啊
可phpmyadmin进去后还出现php代码。
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* forms frameset
*
* or common.inc.php
* @package PhpMyAdmin
*//**
* Gets core libraries and defines some variables
*/
require_once './libraries/common.inc.php';// free the session file, for the other frames to be loaded
session_write_close();// Gets the host name
if (empty($HTTP_HOST)) {
if (PMA_getenv('HTTP_HOST')) {
$HTTP_HOST = PMA_getenv('HTTP_HOST');
} else {
$HTTP_HOST = '';
}
}
// purge querywindow history
$cfgRelation = PMA_getRelationsParam();
if ($GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork']) {
PMA_purgeHistory($GLOBALS['cfg']['Server']['user']);
}
没碰过这种事情,你仔细看看那个索引文件是不是php结尾的...还是变成index.html了....
你apache默认索引的文件没改过吧?要修改成index.php index.html ....
http://localhost/phpMyAdmin-3.5.1-all-languages/
用firefox登陆还是出现上面那个问题,还是显示php代码。
但用google chrome
重新登陆,终于有点转机了。
出现
phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.请问错误日记在php和apache的哪个位置
yum install php
没做什么配置。
你是Centos吧?据说这个权限比较变态,还没试过,你小心设置.
所以正确配置Apache、PHP和mysql:http://download.csdn.net/detail/dmtnewtons/4253940