HHVM 4.3 modified ext_session for HHVM without ext_session.
This software source files are licensed under PHP 3.01 and MIT licenses.
SPDX-License-Identifier: PHP-3.01 AND MIT
Port ext_session from HHVM 4.3. Only "memcache" and "files" saving handler left.
Install dependences
apt-get install hhvm-dev libjemalloc-dev libgoogle-glog-dev libboost-all-dev libtbb-dev zlib1g-dev
try:
hphpize
In case of "-bash: hphpize: command not found" try following actions (Replace YOUR_HHVM_VERSION):
Move content from /__ PGKROOT__/lib/ to /opt/hhvm/YOUR_HHVM_VERSION/
export hphpizepatch=/opt/hhvm/_YOUR_HHVM_VERSION_/bin/
make
In case of "low-ptr-def.h" error try to generate file
cd /opt/hhvm/_YOUR_HHVM_VERSION_/include/hphp/util
wget raw.githubusercontent.com/facebook/hhvm/HHVM-4.8/hphp/tools/generate-low-ptr.sh
chmod 777 generate-low-ptr.sh
export INSTALL_DIR=/opt/hhvm/_YOUR_HHVM_VERSION_/include/hphp/util
./generate-low-ptr.sh --low
Dependency cases: Manually download from github.com/facebook/hhvm/third-party/REQUIRED_DEPENDENCY/SRC/ to /opt/hhvm/YOUR_HHVM_VERSION/include/
For example folly for HHVM 4.8: https://github.com/facebook/hhvm/ -> select Branch HHVM-4.8
-> go to: "third-party/folly/src"
-> clone or download (copy link "Download ZIP")
-> cd /opt/hhvm/4.8.8/include/
-> wget https://github.com/facebook/folly/archive/8f6d3b107d07324f2876e021948f2c36186ae369.zip (Your link)
-> Open downloaded ZIP
-> Go to folly-8f6d3b107d07324f2876e021948f2c36186ae369
-> extract folly dir to /opt/hhvm/4.8.8/include/
hphp/util/hphp-config.h: -> https://github.com/facebook/hhvm/ -> select Branch HHVM-4.8 -> go to: "hphp/util/" -> open file "hphp-config.h.in" and copy content -> cd /opt/hhvm/4.8.8/include/hphp/util/ -> nano hphp-config.h -> right mouse click -> Ctrl + O -> Enter -> Ctrl + X
Additional dependency problems. Try to download hhvm -> hphp folder content into /usr/include/hphp (Use your branch!)
-> cd /usr/include/ -> apt-get install unzip -> wget wget https://github.com/facebook/hhvm/archive/refs/heads/HHVM-4.8.zip -> unzip HHVM-4.8.zip -> rm HHVM-4.8.zip -> move hphp folder form /usr/include/hhvm-HHVM-4-8 to /usr/include/ -> copy hphp folder form /usr/include/ to /opt/hhvm/4.8.8/include/
make
ext_session.so will be saved to /etc/hhvm/
add "hhvm.extensions[ext_session] = ext_session.so" -> /etc/hhvm/php.ini and /etc/hhvm/server.ini
Service HHVM restart
session_cache_expire
session_cache_limiter
session_commit
session_decode
session_destroy
session_encode
session_get_cookie_params
session_id - limited to only get session id (for Crypto support)
session_name - limited to only get session name (for Crypto support)
session_register_shutdown
session_set_cookie_params
session_start
session_status
session_unset
session_write_close
session_set(string $key, mixed $value) : void
session_get(mixed $key = null) : mixed
session_isset(string $key) : bool
session_remove(string $key) : void
SessionHandlerInterface
MemcacheSessionModule -> session.save_handler = memcache
FileSessionModule -> session.save_handler = file
class Crypto(string $crypto_secret)
public function decrypt(string $id, string $data) : string
public function encrypt(string $id, string $data) : string
https://www.php.net/manual/en/book.session.php
session.memcache_persistent (Default = "0")
session.memcache_host (Default = "localhost")
session.memcache_port (Default = "11211")
session.crypto_cookie_time_user_key (Default = "2592000") (time() + sec.)
session.use_crypto_storage_user_key (Default = "0")
session.use_crypto_storage (Default = "0")
session.crypto_secret (Default = "X") !should be changed if session.use_crypto_storage == 1!
session.digest_algo (Default = "sha256")
session.cipher_algo (Default = "aes-256-ctr")
session.cipher_keylen (Default = "32")
session.crypto_expire (Default = "2592000")