The purpose of this document is to provide a complete overview of the PHP session
handler life cycle updated to version 7.0 or above. In particular, I want to
emphasize what methods and in what order are called when the native PHP functions
are used for session management.
I created this document because the information on the web and the official
documentation are very superficial on this topic, in particular on what
concerns the implementation of a safe and stable session handler.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Tmux is a "terminal multiplexer", it enables a number of terminals to be accessed and controlled from a single terminal. | |
| If you use Debian/Ubuntu, you can just run apt-get install tmux, and voila. | |
| Since the title was about centos 7, then do the following step to install tmux. | |
| (1). tmux has a library dependency on libevent which, of course, isn’t installed by default. | |
| $ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| $ tar xzvf libevent-2.0.21-stable.tar.gz | |
| $ cd libevent-2.0.21-stable | |
| $ ./configure && make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install tmux 3.0a on Centos | |
| # install deps | |
| sudo yum install -y gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz | |
| tar -xf libevent-2.1.11-stable.tar.gz | |
| cd libevent-2.1.11-stable | |
| ./configure --prefix=/usr/local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias kc='kubectl' | |
| alias kclf='kubectl logs --tail=200 -f' | |
| alias kcgs='kubectl get service -o wide' | |
| alias kcgd='kubectl get deployment -o wide' | |
| alias kcgp='kubectl get pod -o wide' | |
| alias kcgn='kubectl get node -o wide' | |
| alias kcdp='kubectl describe pod' | |
| alias kcds='kubectl describe service' | |
| alias kcdd='kubectl describe deployment' | |
| alias kcdf='kubectl delete -f' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install tmux 2.8 on Centos | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz | |
| tar -xf libevent-2.1.8-stable.tar.gz | |
| cd libevent-2.1.8-stable | |
| ./configure --prefix=/usr/local |
This page provides a full overview of PHP's SessionHandler
life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and
what you can expect will be called in your custom SessionHandler implementation.
Each example is a separate script being run by a client with cookies enabled.
To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source /usr/local/go/src/pkg/runtime/runtime-gdb.py | |
| b main.main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [PHP] | |
| ;;;;;;;;;;;;;;;;;;; | |
| ; About php.ini ; | |
| ;;;;;;;;;;;;;;;;;;; | |
| ; PHP's initialization file, generally called php.ini, is responsible for | |
| ; configuring many of the aspects of PHP's behavior. | |
| ; http://php.net/engine | |
| engine = On |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git clone git://github.com/alanxz/rabbitmq-c.git | |
| $ cd rabbitmq-c | |
| $ git submodule init | |
| $ git submodule update | |
| $ yum install libtool | |
| $ yum install autoconf | |
| $ yum install automake | |
| $ yum install php-pear | |
| $ yum install php-devel | |
| $ make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo yum install epel-release | |
| sudo yum install gcc-c++ ncurses-devel ruby ruby-devel lua lua-devel luajit luajit-devel ctags python python-devel python3 python3-devel tcl-devel perl perl-devel perl-ExtUtils-ParseXS perl-ExtUtils-XSpp perl-ExtUtils-CBuilder perl-ExtUtils-Embed cscope gtk3-devel libSM-devel libXt-devel libXpm-devel libappstream-glib libacl-devel gpm-devel | |
| yum list installed | grep -i vim | |
| # sudo yum erase vim-common.x86_64 vim-enhanced.x86_64 vim-filesystem.x86_64 vim-X11 | |
| # sudo depends on vim-minimal | |
| sudo rpm -e --nodeps vim-minimal | |
| sudo ln -s /usr/bin/python3.6 python3 |