Mcache: Install and configure mcache (msession) to be used for session caching in PHP.

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!

Web site:
PHP reference:

yum install ncurses-devel #otherwise you might see errors about no such file curses.h

tar zxf mcache*.gz
tar zxf phoenix*.gz
cd phoenix
ln -s Linux.mak config/config.mak
make dirs
make links
make butils
export PATH=$PATH:/opt/mohawk/bin
make libs
vi sqldrv/Makefile # about line 24, comment out POSTGRES=1 and ODBC=1
cd ../mcac*
make server
vi tools/Makefile # after line which says: CARGS+=-DBINDIR=\"$(BINDIR)\"
                  # add:  CARGS+=-DSBINDIR=\"$(SBINDIR)\"
make utils
ln -s /opt/mohawk/lib/ /lib/
/opt/mohawk/sbin/mcache &

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
Using localhost
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)

94 thoughts on “Mcache: Install and configure mcache (msession) to be used for session caching in PHP.

  1. Opus

    Thanks! This worked in Ubuntu as well. I posted a link to your instructions on

  2. Sachin

    Installation was ok, but sessions are not being created..

    Warning: session_start() [function.session-start]: Cannot find save handler mcache in filename.php

    I’m into administartion rather in coding coding side of php so can you please tell me what’s wrong with my settings ???

  3. dormael

    Thank you for your instructions.

    Everyting works fine.
    But the plugin such as filecache is not installed.
    And sqlite3 plugin seems is not working..

    Did you succeed in activating any cache plugin?

  4. Pingback: ways to build session server (cluster) » Xrigher

  5. Pingback: ways to build session server (cluster) » Xrigher

  6. Sports News

    I loved as muc as you’ll receive carried out
    right here. The sketch is tasteful, your authored subject maatter
    stylish. nonetheless, you command get got an impatience oger that
    you wish be delivering the following. unwell unquestilnably come further formerly again as exxactly the same nearly a lot often inside case you shield this increase.

  7. moncler jacket

    I simply wanted to post a word to be able to thank you for all the superb techniques you are writing here. My extensive internet investigation has now been recognized with really good insight to write about with my friends. I would express that many of us readers are unquestionably blessed to exist in a good community with so many outstanding individuals with very helpful points. I feel really lucky to have discovered your site and look forward to many more pleasurable times reading here. Thanks a lot once again for everything.

  8. nmd uk

    My wife and i ended up being now lucky Chris managed to deal with his studies with the ideas he gained from your web page. It is now and again perplexing to just happen to be giving freely methods which often a number of people may have been trying to sell. So we consider we have got the blog owner to appreciate because of that. Those explanations you’ve made, the straightforward website navigation, the relationships you can give support to engender – it is all spectacular, and it is facilitating our son in addition to the family imagine that this theme is excellent, which is pretty vital. Thank you for all!

  9. pandora charms

    I wanted to write down a quick remark in order to say thanks to you for some of the lovely tactics you are writing on this website. My particularly long internet investigation has finally been compensated with reputable information to exchange with my great friends. I ‘d claim that many of us readers actually are really lucky to live in a decent place with very many lovely professionals with useful plans. I feel really grateful to have come across your site and look forward to some more brilliant times reading here. Thanks once again for everything.

  10. dior sunglasses

    I wanted to type a brief note so as to say thanks to you for some of the marvelous suggestions you are writing here. My rather long internet look up has at the end of the day been rewarded with excellent information to share with my great friends. I would assume that most of us site visitors actually are really endowed to live in a fabulous place with very many outstanding professionals with helpful techniques. I feel really blessed to have come across the weblog and look forward to some more awesome moments reading here. Thanks again for all the details.

  11. curry 5

    I have to point out my respect for your kindness giving support to folks that absolutely need help with in this concern. Your special commitment to passing the solution all through was certainly practical and has without exception allowed employees like me to realize their aims. The useful guidelines implies a lot a person like me and far more to my colleagues. Best wishes; from everyone of us.

  12. supreme clothing

    I would like to show appreciation to the writer for bailing me out of this particular dilemma. Because of exploring throughout the world wide web and obtaining things which are not powerful, I figured my entire life was gone. Living devoid of the strategies to the difficulties you’ve resolved by way of your guide is a serious case, and the kind which could have in a wrong way damaged my career if I hadn’t noticed your web site. That talents and kindness in touching all the details was priceless. I don’t know what I would’ve done if I had not discovered such a solution like this. I’m able to at this time look ahead to my future. Thanks for your time so much for your high quality and amazing help. I will not hesitate to endorse your blog post to anybody who requires care about this topic.

  13. pandora jewelry

    I have to show my appreciation to this writer for bailing me out of this particular circumstance. After searching through the online world and obtaining opinions which are not helpful, I believed my life was gone. Existing minus the solutions to the difficulties you’ve solved through your entire review is a crucial case, and those that could have negatively affected my entire career if I hadn’t discovered your web page. The training and kindness in controlling a lot of stuff was valuable. I am not sure what I would have done if I had not encountered such a thing like this. I am able to at this point look forward to my future. Thank you very much for this expert and results-oriented help. I will not think twice to recommend the blog to any person who ought to have counselling about this topic.

  14. ymovies

    I have read so many posts on the topic of the blogger lovers except this piece of writing is in fact a pleasant
    article, keep it up.

  15. ?????????

    ????????? ?????????? ??????????????
    ????????????? ???????? ?????????????????????????????? ?????????? ???????? ???????????? ???????? ????????????????? ??????????? ??????? ????? ?????????
    ??????????????? ?????? ??????
    ??????????? ?????????? ???????? ??????? ?????????????
    ???????? ????????????

  16. ????????????????

    Nice blog right here! Additionally your website so much up fast!
    What web host are you using? Can I get your affiliate hyperlink in your host?
    I desire my website loaded up as fast as yours lol

  17. ????

    Thanks for finally talking about > Mcache: Install and configure mcache (msession) to be used for session caching in PHP.

    | Technology: Learn and Share < Loved it!

  18. Unblocked

    I read this piece of writing completely on the topic of the resemblance of most up-to-date and earlier technologies, it’s amazing article.

  19. ????

    Hi there everyone, it’s my first pay a quick visit at this web
    page, and paragraph is in fact fruitful designed for me,
    keep up posting these types of articles or reviews.

  20. Purple Kush Online

    Purple Kush is a pure indica strain that emerged from the Oakland area of California as the
    result of crossing Hindu Kush and Purple Afghani. Its aroma
    is subtle and earthy with sweet overtones typical of
    Kush varieties. Blissful, long-lasting euphoriablankets the mind while physical relaxation rids
    the body of pain, sleeplessness, and stress.

    Contact Us
    Phone: +1(209) 264-8438
    Email: [email protected]

  21. Fortnite hack V1.5


    ??Pass: 2022


    1)Download the hack from link above
    2)Unzip the file to any folder
    3)Run the setup
    4)Wait till installation is over
    5)Open .exe file (Hack)
    6)Run Fortnite
    7)Press INS

    1) Player ESP
    2) ?hest ESP
    3) Aimbot
    4) Smooth
    5) Fast Reload
    6) Custom FOV

  22. slot

    Hello to every body, it’s my first visit of this weblog;
    this webpage includes remarkable and really good material in favor of readers.

  23. spaceman sloth

    Link exchange is nothing else however it is just placing
    the other person’s blog link on your page at suitable place and other person will also do same for you.

  24. Bohlool

    Thank you a bunch for sharing this with all people you really realize what you are speaking about!
    Bookmarked. Kindly additionally visit my web site =).
    We may have a hyperlink trade contract between us

  25. ????

    Please let me know if you’re looking for a
    writer for your blog. You have some really good posts and I think
    I would be a good asset. If you ever want to take some of the load off, I’d love
    to write some material for your blog in exchange for
    a link back to mine. Please shoot me an email if interested.


  26. ???

    obviously like your website but you have to
    check the spelling on quite a few of your posts. Several of them are
    rife with spelling problems and I in finding it very troublesome to inform the truth then again I’ll surely come back again.

  27. ???

    If some one desires expert view about running a blog after that
    i propose him/her to pay a quick visit this web site,
    Keep up the pleasant job.

  28. ??

    Because the admin of this site is working, no question very rapidly it will
    be renowned, due to its quality contents.

  29. in parking

    naturally like your web site however you have to take
    a look at the spelling on several of your posts.
    Many of them are rife with spelling problems and I to find
    it very troublesome to tell the reality then again I’ll definitely come again again.

  30. judi13 aplikasi

    whoah this weblog is magnificent i love studying your posts.
    Stay up the good work! You know, a lot of individuals are looking around for this info, you could aid them greatly.

  31. Ico

    My relatives always say that I am killing my time here at
    web, but I know I am getting knowledge every day by reading thes pleasant content.


    I have learn several good stuff here. Certainly worth bookmarking for revisiting.
    I wonder how much attempt you place to create such a wonderful informative web site.

Leave a Reply

Your email address will not be published. Required fields are marked *