Installing mcache, previously known as msession, on CentOS 32 bit system.
If you are on 64 bit system, you will get errors, lots of them.Â I went through and fixed “some” errors by modifying code but it was just taking too much time so I decided not to go 64 bit route. Â But below are the efforts I made.Â Maybe somebody can help with rest of the steps.Â Â Â Following instructions work fine with 32 bit systems. For more help look at the MCache Handbook.
Thank you Mohawk Software for all your efforts developing this!
yum install ncurses-devel #otherwise you might see errors about no such file curses.h
tar zxf mcache*.gz
tar zxf phoenix*.gz
ln -s Linux.mak config/config.mak
vi sqldrv/Makefile # about line 24, comment out POSTGRES=1 and ODBC=1
vi tools/Makefile # after line which says: CARGS+=-DBINDIR=\"$(BINDIR)\"
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â # add:Â CARGS+=-DSBINDIR=\"$(SBINDIR)\"
ln -s /opt/mohawk/lib/libphoenix.so.2.2.2 /lib/
In your php.ini, add:Â Â
; Use mcache as the save handler
session.save_handler = mcache
; Set the host which runs the mcache daemon
session.save_path = localhost
Let us testÂ ifÂ mcache server is running:
You should see:
Usage: /opt/mohawk/bin/mping host
Pings a session daemon
localhost:8086 is alive
Great! You mcache server is now up and running and listening for connections.
You can add above command to your start up scripts so server will run next time you reboot.Â Easiest way to achieve this is to add that command to end of /etc/rc.local
32 bit installation is now complete!Â
I could not get 64 bit install to go but here are my notes for whoever wants to try it.Â If you get it working, please come back and comment on how you got it installed.
64 bit install notes:First error: Â CPU you selected does not support x86-64 instruction set
to fix this, edit config/unixgcc.mak and remove all instances of -mtune=pentium3
Following are code changes to fix some other errors:
line 83 in phmalloc.h
virtual void *memdup(void *mem, unsigned int cb);
virtual void *memdup(void *mem, size_t cb);
line 446 in mexpat.cpp
static void *xmlalloc(void *context, unsigned int cb)
static void *xmlalloc(void *context, size_t cb)
static void *xmlrealloc(void *context, void *p, unsigned int cb)
static void *xmlrealloc(void *context, void *p, size_t cb)