how to memcached session handler php
if (!$memcache = memcache_connect(MEMCACHE_SERVER, 11211)) {
ini_set('session.save_path', '/sessions'); #your path to session directory like /tmp
} else {
ini_set('session.save_handler', 'memcache');
ini_set('session.save_path', 'tcp://'.MEMCACHE_SERVER.':11211?persistent=1&weight=1&timeout=1&retry_interval=15');
how to start memcached?
/usr/local/bin/memcached -l 127.0.0.1 -m 200 -p 11211 -u nobody &
- m 200 = 200MB
- l 127.0.0.1 = memcached server on localhost.
-l xxx.xxx.xxx.xxx = memcached server on xxx.xxx.xxx.xxx ip address, like 192.168.0.100
colored bash prompt
.bash_profile-> export PS1="[[e[31;1m]u[e[0m]@[e[32;1m]h[e[0m]:[e[37;1m]w/[e[0m]]# [e[0m]"
The database cluster was initialized without HAVE_INT64_TIMESTAMP but the server was compiled with HAVE_INT64_TIMESTAMP.
FATAL: database files are incompatible with server
DETAIL: The database cluster was initialized without
HAVE_INT64_TIMESTAMP but the server was compiled with
HAVE_INT64_TIMESTAMP.
HINT: It looks like you need to recompile or initdb.
solution: deinstall postgre, reinstall postgre without
"INTDATE Builds with 64-bit date/time type (server)"

Detect user's browser with php
php.ini = browscap = /pathto/browscap.ini
Call to undefined method MDB2_Error::execute()
Error: Call to undefined method MDB2_Error::execute()
Solution: sql query check (missing table, missing column, missing data?)
Call to undefined method MDB2::prepare()
Call to undefined method MDB2::prepare()
Fixing solution: pear install -a -f MDB2_Driver_pgsql



