- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我对 myadminphp 有疑问。我尝试进入管理区域,但是当我使用 url 时,页面是白色的。我在 error.log 上看到了这个错误
session_start(): Failed to initialize storage module: memcache (path: /var/lib/php5) in /usr/share/phpmyadmin/libraries/session.inc.php on line 81
我不知道我能做什么!Tx 寻求所有帮助
我的session.inc.php
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* session handling
*
* @todo add failover or warn if sessions are not configured properly
* @todo add an option to use mm-module for session handler
* @see http://www.php.net/session
* @uses session_name()
* @uses session_start()
* @uses ini_set()
* @package phpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
}
// verify if PHP supports session, die if it does not
if (!@function_exists('session_name')) {
PMA_warnMissingExtension('session', true);
} elseif (ini_get('session.auto_start') == true && session_name() != 'phpMyAdmin') {
// Do not delete the existing session, it might be used by other
// applications; instead just close it.
session_write_close();
}
// disable starting of sessions before all settings are done
// does not work, besides how it is written in php manual
//ini_set('session.auto_start', 0);
// session cookie settings
session_set_cookie_params(0, $GLOBALS['PMA_Config']->getCookiePath(),
'', $GLOBALS['PMA_Config']->isHttps(), true);
// cookies are safer (use @ini_set() in case this function is disabled)
@ini_set('session.use_cookies', true);
// optionally set session_save_path
$path = $GLOBALS['PMA_Config']->get('SessionSavePath');
if (!empty($path)) {
session_save_path($path);
}
// but not all user allow cookies
@ini_set('session.use_only_cookies', false);
// do not force transparent session ids, see bug #3398788
//@ini_set('session.use_trans_sid', true);
@ini_set('url_rewriter.tags',
'a=href,frame=src,input=src,form=fakeentry,fieldset=');
//ini_set('arg_separator.output', '&');
// delete session/cookies when browser is closed
@ini_set('session.cookie_lifetime', 0);
// warn but dont work with bug
@ini_set('session.bug_compat_42', false);
@ini_set('session.bug_compat_warn', true);
// use more secure session ids
@ini_set('session.hash_function', 1);
// some pages (e.g. stylesheet) may be cached on clients, but not in shared
// proxy servers
session_cache_limiter('private');
// start the session
// on some servers (for example, sourceforge.net), we get a permission error
// on the session data directory, so I add some "@"
// See bug #1538132. This would block normal behavior on a cluster
//ini_set('session.save_handler', 'files');
$session_name = 'phpMyAdmin';
@session_name($session_name);
if (! isset($_COOKIE[$session_name])) {
// on first start of session we check for errors
// f.e. session dir cannot be accessed - session file not created
$orig_error_count = $GLOBALS['error_handler']->countErrors();
$r = session_start();
if ($r !== true || $orig_error_count != $GLOBALS['error_handler']->countErrors()) {
setcookie($session_name, '', 1);
/*
* Session initialization is done before selecting language, so we
* can not use translations here.
*/
PMA_fatalError('Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.');
}
unset($orig_error_count);
} else {
session_start();
}
/**
* Token which is used for authenticating access queries.
* (we use "space PMA_token space" to prevent overwriting)
*/
if (!isset($_SESSION[' PMA_token '])) {
$_SESSION[' PMA_token '] = md5(uniqid(rand(), true));
}
/**
* tries to secure session from hijacking and fixation
* should be called before login and after successfull login
* (only required if sensitive information stored in session)
*
* @uses session_regenerate_id() to secure session from fixation
*/
function PMA_secureSession()
{
// prevent session fixation and XSS
session_regenerate_id(true);
$_SESSION[' PMA_token '] = md5(uniqid(rand(), true));
}
?>
最佳答案
通常这意味着你在 Apache 配置或 php.ini 中的 session.save_path
参数中有一个错误的路径
尝试设置
ini_set("session.save_path", "/path/to/tmp");
在文件的开头。如果有帮助,请编辑您的 php.ini 文件,否则尝试在某处找到它,也许在 VirtualHost 部分
关于php - session_start() : Failed to initialize storage module: memcache (path:/var/lib/php5) in/usr/share/phpmyadmin/libraries/session. inc.php 第 81 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21387375/
我正在使用源代码中的Postgres 13(Rel_13_STRATE分支),并且我使用的是来自apachea/age源代码的(Release/PG13/1.3.0分支)中的1.3.0版的Apache
/usr/bin/ld: cannot find -ldlib /usr/bin/ld: cannot find -lcblas /usr/bin/ld: cannot find -llapack 在
我正在尝试运行 project 。但它给出了一个错误 fs.js:666 return binding.readdir(pathModule._makeLong(path));
我的新 CentOS7 中有两个目录: Work_Folder1/my_project/linux_dev.cfg Work_Folder2/my_project/linux_dev.cfg 如果我尝
我正在读这个thread和 PostgreSQL 9.4 的手册。我跑 ps auxw | grep postgres | grep -- -D 但是得到 postgres 17340 0.0
我想在我的 shell 中使用系统服务,但该服务的 bin 路径在不同的机器上是不同的(/usr/sbin/myservice 或/usr/local/sbin/myservice)。 那么,我怎样才
我正在为 centos 制定 RPM 规范,如果 arch 是 64 位的,它需要将共享库安装到/usr/lib64,否则需要安装到/usr/lib? 最佳答案 这不是它应该的工作方式。决定库去向的不
我使用 gem install watchr 在 OS X (10.8.3) 上安装了 watchr。它安装在 /usr/bin/watchr $ which watchr /usr/bin/watc
在linux下我们经常用到的四个应用程序的目录是:/bin、/sbin、/usr/bin、/usr/sbin bin: bin为binary的简写主要放置一些系统的必备执行档例如:cat、cp
我在 Pop_OS 下使用 PyCharm 2020.2.3 和 Python 3.8.6! 20.10(你可以像我使用 Ubuntu 20.10 一样)无法在 /usr/bin 或 /usr/lib
我在新的 MacBook 中使用 OS X Yosemite。刚刚安装了 Homebrew 和一些基本的软件包,最近搬到了这台新电脑上。 我注意到,当我安装新的 brew 包时,偶尔会出现链接错误。出
我到 gcc 的链接行连续包含以下两个条目: -lrt -lpam 这似乎扩展为: /usr/lib64/librt.so /usr/lib/libpam.so 为什么 rt 解析为 lib64 而
我有一个大型捆绑软件发行版的错误 Makefile。在某些时候,编译器总是“忘记”我想在 32 位程序中编译。这导致部分程序具有 64 位库,而其他程序具有 32 位库。 如何在每次运行 gcc 时强
如果我安装了Go发行版软件包,则会在/usr/lib/golang/pkg中看到很多文件,在/usr/lib/golang/src中看到非常相似的文件集。这两组之间有什么关系? pkg是从src中的源
我在安装 python 2.7.6 时犯了一个错误,没有使用 home brew,现在我的 python 设置为 /usr/local/bin/python 中的 python(这是 2.7.6)。
我是一名见习程序员,有时我的头脑浮在云端.. 我的同事通过 ssh 连接来搞乱我的专业计算机。其中一位告诉我,防止这种情况发生的最佳方法是保护我的计算机。为了做到这一点,我不小心更改了/usr 目录的
我在 ubuntu 16.04 上尝试编译 fbthrift ( https://github.com/facebook/fbthrift ) 时遇到奇怪的错误 make[4]: Entering d
我遇到了这个奇怪的问题 ag: /usr/lib64/liblzma.so.5: no version information available (required by ag) 由于某种原因,预装
我用的是 ubuntu。 我发现安装的许多 Python 库都在 /usr/lib/python 和 /usr/lib64/python 中。 当我打印一个模块对象时,模块路径显示该模块位于/usr/
在 Linux 上,特别是 Debian Jessie,我应该使用 /usr/bin/python 还是应该在 /usr/local/bin 中安装另一个副本? 据我所知,前者是系统版本,随着操作系统
我是一名优秀的程序员,十分优秀!