session_set_save_handler(“open”, “close”, “read”, “write”, “destroy”, “gc”); function read($id) { //if we can’t find the data for this session, we must return ” (empty string) , can’t return false return ”; }Read More →

This is mostly because the script is hang at some point , the server still keeps the connection, this will end up where server can’t accept new connection. This is a dirty approach – it will kill all process having waiting time > 30s #/bin/bash #Delete all apache having process with waiting time >30s GetAllWorkers() { AllWorkers=$(apache2ctl fullstatus | grep ” W ” | awk ‘$6>30 {print $2}’) for PID in $AllWorkers; do echo stopping $PID with SIGTERM kill -9 $PID done } GetAllWorkersRead More →

mcrypt extension is an interface to the mcrypt cryptography library. mcrypt is included in php5 to  php7.1 , but it’s removed from php7.2 . The instructions below help you install mcrypt for php7.2 on  Ubuntu. when you are shown the prompt: hit Enter once installed , you need to create a configuration file for itRead More →

rrdcached is a daemon that receives updates to existing RRD files, accumulates them and, if enough have been received or a defined time has passed, writes the updates to the RRD file. A flush command may be used to force writing of values to disk, so that graphing facilities and similar can work with up-to-date data. rrdcached uses the line protocol to communicate with client. When we start rrdcached , it will listen on port 42217 and create a socket file.  We can telnet to port 42217  or use ncat to create a connection to socket file. telnet localhost 42217     or nc -U /var/run/rrdcached/rrdcached.sock AfterRead More →