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
Axislab_final
View Axislab_final
A szövetségesek parancsnoksága a közelmúltban szerzett tudomást egy szupertitkos náci atomfegyver fejlesztõ laboratóriumról, ami egy kis farm alatt
Hits: 16
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 unknown unknown
8 Ukraine Ukraine
9 Canada Canada
10 United Kingdom United Kingdom
11 Germany Germany
12 Netherlands Netherlands
13 Poland Poland
14 Italy Italy
15 Taiwan, Province of China Taiwan, Province of China
16 Seychelles Seychelles
17 Australia Australia
18 Romania Romania
19 Indonesia Indonesia
20 India India
21 Thailand Thailand
22 Sweden Sweden
23 Brazil Brazil
24 Japan Japan
25 South Africa South Africa
26 Lithuania Lithuania
27 Argentina Argentina
28 Spain Spain
29 Iran, Islamic Republic of Iran, Islamic Republic of
30 Chile Chile
31 Luxembourg Luxembourg
32 Turkey Turkey
33 Moldova, Republic of Moldova, Republic of
34 Korea, Republic of Korea, Republic of
35 Belarus Belarus
36 Malaysia Malaysia
37 Venezuela Venezuela
38 Switzerland Switzerland
39 Singapore Singapore
40 Colombia Colombia
41 Hong Kong Hong Kong
42 Mexico Mexico
43 Mongolia Mongolia
44 Czech Republic Czech Republic
45 Belize Belize
46 Greece Greece
47 Honduras Honduras
48 Estonia Estonia
49 Latvia Latvia
50 Bulgaria Bulgaria

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




International Plastic Bag Free Day


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

Kilátás az erkélyről 2.

 
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.23 Seconds

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