HOME
  Security
   Software
    Hardware
  
FPGA
  CPU
   Android
    Raspberry Pi
  
nLite
  Xcode
   etc.
    ALL
  
LINK
BACK
 

2020/04/01

phpMyAdminのログイン状態のタイムアウト時間を 24分から伸ばす設定変更方法 phpMyAdminのログイン状態のタイムアウト時間を 24分から伸ばす設定変更方法

(phpMyAdminとは、MySQLのデータベースを Webブラウザで操作できる便利ツール)

Tags: [Windows開発]




● phpMyAdminとは?

 MySQLのデータベースを Webブラウザで操作できる PHP言語で作られたツール。
 マウス操作で MySQL DBを操作できるので便利。

phpMyAdmin
 phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web .


● phpMyAdminのログイン状態のタイムアウト時間を 24分から伸ばす設定変更方法

 1) phpMyAdminの設定ファイル config.default.phpの LoginCookieValidityを書き換える
 2) PHP環境設定ファイル php.iniの session.gc_maxlifetimeを書き換える


● phpMyAdminの設定ファイル config.default.phpの LoginCookieValidityを書き換える

 config.default.phpファイルは phpMyAdminをインストールしたディレクトリの下に有ります。
 例: /var/www/html/phpMyAdmin

# /var/www/html/phpMyAdmin/libraries/config.default.php

cd /var/www/html/phpMyAdmin/
cat ./libraries/config.default.php | grep LoginCookieValidity

/**
 * validity of cookie login (in seconds; 1440 matches php.ini's
 * session.gc_maxlifetime)
 *
 * @global integer $cfg['LoginCookieValidity']
 */
$cfg['LoginCookieValidity'] = 1440;

1440秒 / 60秒 = 24分、24分間ログイン状態が有効

1800 = 30分
3600 = 60分
4200 = 70分

● PHP環境設定ファイル php.iniの session.gc_maxlifetimeを書き換える

cat /etc/php.ini | grep maxlife
... 略 ...

[Session]

... 略 ...

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; http://php.net/session.gc-maxlifetime
session.gc_maxlifetime = 1440

; NOTE: If you are using the subdirectory option for storing session files
;       (see session.save_path above), then garbage collection does *not*
;       happen automatically.  You will need to do your own garbage
;       collection through a shell script, cron entry, or some other method.
;       For example, the following script is the equivalent of setting
;       session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
;          find /path/to/sessions -cmin +24 -type f | xargs rm

... 略 ...


● LoginCookieValidityは phpMyAdminの「設定」メニューからも書き換え可能

$cfg['LoginCookieValidity']

$cfg['LoginCookieValidity']

Type: integer [number of seconds]
Default value: 1440

Define how long a login cookie is valid. Please note that php configuration option session.gc_maxlifetime might limit session validity and if the session is lost, the login cookie is also invalidated.
 So it is a good idea to set session.gc_maxlifetime at least to the same value of $cfg['LoginCookieValidity'].

 ・phpMyAdminの「設定」メニュー
 ・「機能」
 ・「一般」タブ
 ・「ログインクッキーの有効期間」 1440
  Define how long (in seconds) a login cookie is valid.

・phpMyAdminのタイムアウト時間の設定変更方法、LoginCookieValidityは phpMyAdminの「設定」メニューからも書き換え可能
phpMyAdminのタイムアウト時間の設定変更方法、LoginCookieValidityは phpMyAdminの「設定」メニューからも書き換え可能


phpMyAdminのタイムアウト時間の設定変更方法、LoginCookieValidityは phpMyAdminの「設定」メニューからも書き換え可能


phpMyAdminのタイムアウト時間の設定変更方法、LoginCookieValidityは phpMyAdminの「設定」メニューからも書き換え可能





Tags: [Windows開発]



[HOME] | [BACK]
リンクフリー(連絡不要、ただしトップページ以外は Web構成の変更で移動する場合があります)
Copyright (c) 2020 FREE WING,Y.Sakamoto
Powered by 猫屋敷工房 & HTML Generator

http://www.neko.ne.jp/~freewing/software/phpmyadmin_extend_timeout/