MMCache on per-vhost basis?

Help
2003-07-28
2003-07-29
  • Garvin Hicking

    Garvin Hicking - 2003-07-28

    I'm fairly new to any PHP-acclerating optimizer/encoded and wanted to test MMCache.

    I'm hosted on a server where I have root-access to but should not influence any running projects. I compiled MMCache and put it into the extensions directory. I configured my php.ini to utilize the extension but set mmcache.optimizer, .compress and .enable all to FALSE.

    Then I put a .htaccess file in my own webspace and used:
    php_value 'mmcache.enable' '1'
    php_value 'mmcache.optimizer' '1'
    php_value 'mmcache.compress' 1'

    Output of phpinfo() shows MMCache as loaded, but inactive. My .htaccess settings do work and show up in the 'directives' panel of my phpinfo() output.

    If I use the mmcache() php function on a page I can click on the Buttons 'Enable' and 'Enable Opt.' and then both seem to get activated as shown in the box. When I now call a different virtual host on the machine I can see that they are still de-activated (as wanted).

    But I can't spot any performance improvements. Do I have to use something else as well?

    And the sad thing is, if the apache webserver is gracefully restarted (every 2 hours...) the enabled settings of the mmcache() output show 'Disabled' once again.

    I guess I'm doing something terribly wrong? Any help appreciated. :-)

    Kind regards,
    Garvin.

     
    • Dmitry Stogov

      Dmitry Stogov - 2003-07-29

      You made all right. Put mmcache.php on your virtual host and enable caching in it. You should see cached scripts. Every reload of mmcache.php should increment the "hits" filed. Is it correct?

      I have changed the MMCache, so you will have not to use Enable/Disable button on your virtual host.
      Chacnges will be available in release 2.3.21.

       
      • Garvin Hicking

        Garvin Hicking - 2003-07-29

        Dmitry,

        thanks for your quick help. I downloaded the latest CVS today and tried it. It works pretty well - I can enable it via .htaccess and the mmcache() function shows my scripts working. All other vhosts are unaffected, even though you can see my scripts in their mmcache() function output.

        Regards,
        Garvin.

         

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks