Welcome to Fogfighters Hungary!
 
  Login or Register
.week  
Time
 
 
 
Languages
Select Interface Language:

 
Google Translation
Translation
 
Traffic Report
 
Where are you from?
 
Map Random
Objective
ET_Ice
View ET_Ice
The Allies have set up a position close to an Axis Outpost. Steal their secret War Documents. The Allies have set up a position close to an Axis Outpost. Don't let the Axis steal the secret War Documents!
Hits: 6
Total Maps: 85
 
Modules
· Home
· About Easter
· Büntetés kalkulátor
· Bible
· Biorythm
· Birds
· Black Gallery
· Cats
· Coppermine
· Dogs
· eCards
· ET Game manual
· ET Handbuch
· ET játékleírás
· ET Maps
· Fórumok
· FIFA World Cup 2006
· Fish
· Google Guide
· Googlemaps
· Hírküldés
· Help Desk
· Internet_TV
· Keresés
· Letöltések
· Members List
· Member_Map
· News
· Online Radios
· PHP-Nuke_HOWTO
· PHP-Nuke_Tools
· Private Messages
· Punkbuster
· Saját beállításaid
· Shout Box
· Statisztikák
· Szavazások
· Szerencsejáték
· Tagfelvétel
· Viccek
· Videó kollekció
· Web címek
· Web Development
 
MS-Analysis
Top-Ten Countries visiting Fogfighters Hungary

1 United States United States
2 China China
3 Viet nam Viet nam
4 Russian Federation Russian Federation
5 France France
6 Hungary Hungary
7 Canada Canada
8 Ukraine Ukraine
9 United Kingdom United Kingdom
10 Netherlands Netherlands
11 Germany Germany
12 Poland Poland
13 Italy Italy
14 Taiwan, Province of China Taiwan, Province of China
15 Seychelles Seychelles
16 Romania Romania
17 Indonesia Indonesia
18 Sweden Sweden
19 Thailand Thailand
20 Brazil Brazil
21 Japan Japan
22 South Africa South Africa
23 Lithuania Lithuania
24 India India
25 Spain Spain
26 Luxembourg Luxembourg
27 Chile Chile
28 Turkey Turkey
29 Moldova, Republic of Moldova, Republic of
30 Korea, Republic of Korea, Republic of
31 Venezuela Venezuela
32 Malaysia Malaysia
33 unknown unknown
34 Australia Australia
35 Switzerland Switzerland
36 Singapore Singapore
37 Colombia Colombia
38 Hong Kong Hong Kong
39 Mexico Mexico
40 Argentina Argentina
41 Belize Belize
42 Greece Greece
43 Honduras Honduras
44 Estonia Estonia
45 Czech Republic Czech Republic
46 Latvia Latvia
47 Bangladesh Bangladesh
48 Bulgaria Bulgaria
49 Pakistan Pakistan
50 Albania Albania

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




August


 
Képes Naptár
There is a problem right now with this block.
 
CPG Random Picture

lol_1

 
Latest Videos


Last added videos

Orvosnál

Orvosnál

Last added videos

Funny

Funny Mortar

Last added videos

Shy

Shy Rose - I Cry For You
 
jpcache

24.1.1. jpcache

Figure 24-3. Powered by jpcache.

Powered by jpcache.



Enter jpcache: jpcache is a lightweight, full page caching system for PHP, thus reducing server load, as pages are generated less often. It dramatically speeds up serving of your pages, by caching page ouput and returning the chached page instead of compiling the PHP one. In the following we will describe jpcache installation, configuration and use (see also How to accelerate PHP-Nuke):

24.1.1.1. Installation of jpcache

Installation is very simple:

  • Download it from the jpcache download page at sourceforge.net.

  • Extract the files in the includes directory of your PHP-Nuke. A folder "jpcache" will be created containing all the necessary files. Change to that folder.

  • Read the readme file.

24.1.1.2. Configuration of jpcache

  • Edit the $includedir variable in the jpcache.php file to reflect the *full* path to the jpcache files:

    // Set the includedir to the jpcache-directory
    $includedir = "/usr/local/httpd/htdocs/nuke6/html/includes/jpcache";
    
  • Edit the jpcache-config.php file. You basically only need to set the $JPCACHE_TYPE to "file" (remember, we want to avoid database connections):

    $JPCACHE_TYPE = "file";
    //$JPCACHE_TYPE = "mysql";
    //$JPCACHE_TYPE = "dbm"; -- Not yet
    

    then coment the next block (you don't need it, since you *did* specified the $JPCACHE_TYPE above):

    // DOH! Strip out this check for performance if you are sure you did set it.
    // if (!isset($JPCACHE_TYPE))
    // {
    // exit("[jpcache-config.php] No JPCACHE_TYPE has been set!");
    // }
    

    Just check the configuration options to see what they do, the defaults are O.K. for me:

    /**
    * General configuration options. 
    */
    $JPCACHE_TIME = 900; // Default number of seconds to cache a page
    $JPCACHE_DEBUG = 0; // Turn debugging on/off
    $JPCACHE_IGNORE_DOMAIN= 1; // Ignore domain name in request(single site)
    $JPCACHE_ON = 1; // Turn caching on/off
    $JPCACHE_USE_GZIP = 1; // Whether or not to use GZIP
    $JPCACHE_POST = 0; // Should POST's be cached (default OFF)
    $JPCACHE_GC = 1; // Probability % of garbage collection
    $JPCACHE_GZIP_LEVEL = 9; // GZIPcompressionlevel to use (1=low,9=high)
    $JPCACHE_CLEANKEYS = 0; // Set to 1 to avoid hashing storage-key:
    // you can easily see cachefile-origin.
    
  • Finally, set the directory for the cached files, preferably outside your web server root, say /tmp/jpcache. Create it, set the owner and group equal to the owner and group of your web server and change the permissions to 755 (rwx-r-x-r-x), or even 750 (rwx-r-x----). Then, enter in jpcache-config.php the absolute path to that cache directory:

    /**
    * File based caching setting.
    */
    $JPCACHE_DIR = "/tmp/jpcache"; // Directory where jpcache must store 
    // generated files. Please use a dedicated
    // directory, and make it writable
    

That's all! jpcache is now configured correctly.

24.1.1.3. How to use jpcache

To use it, just open the index.php file of your PHP-Nuke and enter the following lines, after the line "require_once("mainfile.php");" (that's important!):

require_once("mainfile.php");
if (!isset($user)) {
  $cachetimeout=900; 
} else {
  $cachetimeout=300;
}
require_once "includes/jpcache/jpcache.php";

(I have included the 'require_once("mainfile.php");' line in the code above for your orientation).

That's it! You can now tweak the two caching intervalls, 900 and 300 seconds, which apply to non-logged-in and logged-in users respectively. Rethink the questions I asked you in Section 24.1 above.

A caching intervall of x seconds means that your server will serve you a cached copy of the page, if the cache copy is not older than x seconds. Since non-logged-in users don't get private messages or similar "events", a longer caching intervall is just right for them. Feel free to experiment with these two values, trading actuality of content against serving speed.

Enjoy your new, lightning fast PHP-Nuke!

Oops...I forgot a crucial detail:

You must edit the mainfile.php file too! There, you *must* comment the line

ob_start("ob_gzhandler");

as follows:

# ob_start("ob_gzhandler");

Otherwise, you will be compressing twofold, once from PHP-Nuke with the above line and once with jpcache through the configuration line

$JPCACHE_USE_GZIP = 1; // Whether or not to use GZIP

of jpcache-config.php.

The other way round, turning off gzip in jpcache and leaving the ob_start("ob_gzhandler") line uncommented in PHP-Nuke, works too. It may even be better to choose this way, if you use Apache and mod_gzip (a common configuration).

Tip How to test if caching is working
 

You can check if you are doing it right, by trying to cache a block that just echoes the current time. If the cached block displays the same time again and again after reloading (for some time interval equal to the "cache interval"), then caching is working!

If it displays the current time (which is changing after every reloading), then caching is NOT working! In this case, most probably no files are being written into the cache directory you specified. Most of the time, this will be a permissions problem: check that the web server has write and execute permissions on the cache directory! See How to accelerate PHP-Nuke.

Send all questions and comments to:
Webmaster
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest Fogfighters Hungary © 2007 - 2022

You can syndicate our news using the file backend.php or ultramode.txt

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.26 Seconds

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::