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
Radar Summer
View Radar Summer
axis "We are currently perfecting the new Würzburg 62A radar at your installation. Protect the prototypes from any Allied attempts at sabotage or theft." allied "We need to examine the new Würzburg r
Hits: 2
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




Reggae Music Day


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

Az ajtó mögötti rész

 
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
 
How to use PHP-Nuke under SSL

27.2. How to use PHP-Nuke under SSL

SSL encrypts data at layer 6 of the OSI model (FIXME: image!). SSL doesn't necessarily keep hackers out, but rather encrypts the data so that IF a hacker is listening, it renders the data useless to the hacker. SSL is mainly used for e-commerce but is not limited to it, so you can certainly use it with PHP-Nuke.

To install SSL on your system, you need the openSSL package and the Apache modSSL module.

SSL will, by default, slow a site down. However not considerably, it does slow a site down due to encryption algorythms (don't worry, it's not a slowdown analogous to broadband vs. dialup).

SSL will NOT protect you from a user that knows the PHP-Nuke password of a user or is determined to apply the latest exploit to your site. It will only protect the traffic from eavesdroppers on the line. Nothing can totally protect you from this kind of attack - unless you probably sit the whole day in front of your computer, reading security advisories and taking action the very minute you read something about a new PHP-Nuke vulnerability. Of course you can take security measures for your site (and you should take them, see Section 23.4.2), but you should not conclude that your site is now secure just because you are using SSL!

After installing Apache with openSSL and modSSL to make your site more secure, you will be connecting to it with the HTTPS protocol and, accordingly, your site will be accessible as https://www.yoursite.com (notice the extra "s" after "http"). But now every page of your site popps up with a Seuciryt Information Alert like this:

This Page contains both secure and nonsecure items.
Do you want to display the nonsecure items?
Yes - No - More Info

Of course, this is normal after installation of SSL. The reason is that many PHP-Nuke blocks get their images from other sites (e.g. weather blocks (Section 8.2.2), comics blocks (Section 8.2.3, Section 8.3.1), daily babe blocks ...). You will find out that the browser will nerve you with questions like the above and will NOT display images, showing rather a broken key in their place, if the images come from outside the SSL domain.

The only solution to this annoyance is to write "SSL versions" of the relevant blocks that will store the image in a local directory and then display the image from that directory, instead from the remote one.

To save the image locally, you can use for example:

  require_once "includes/SSL.php";
  $myurl = "http://www.someremotesite.com/somedir/someimage.jpg";
  $myfile = "localtmpdir/mylocalimage.jpg";
  $content = "";
  saveimage($myurl, $myfile, $content);

in the block code, where includes/SSL.php is

<?php
function saveimage($imagefileurl, $tempfile, &$content) {
if (time() - filemtime($tempfile) > 3600); {
    if (!($imagefile = fopen( "$imagefileurl",  "rb"))) {
        $content .= "$imagefileurl<br> could not be opened<br>";
        die();
    }
    $imagecontent .= fread($imagefile, 300000);
    fclose($imagefile);
    if (!($localimagefile = fopen($tempfile ,  "wb"))) {
        $content .= "$tempfile<br> could not be opened<br>";
        die();
    }
    fwrite($localimagefile, $imagecontent);
    fclose($localimagefile);
}
return 1;
}
?>

the idea being that we only download the remote file to the local one if the remote file's modification time is older that one hour (3600 sec.).

There are probably better ways to do this - you could for example use Cache-Lite (Section 24.1.2) to cache the image file in a local cache directory, see Section 24.1 and How to accelerate PHP-Nuke. A discussion thread is in SSL on a phpnuke site.

If you want to restrict SSL only on certain directories for the above reasons, you wil have to find a way to enforce the HTTPS protocol in some directories and enforce HTTP on others. Note that will have to enforce HTTP on the directories that don's need encryption, otherwise a secure (and slow) connection will still be possible and your users might not notice that they are still using encryption in pages that don't matter (if they come to those pages from an encrypted page through a relative link, for example).

You can try mod_rewrite Section 25.2) to force HTTPS on some URLs and force HTTP on others: using SERVER_PORT, you can check the current port is not 443 (the standard HTTPS port), and thus to force HTTPS when entering the /dir/ directory, use:

# /dir/.htaccess
RewriteEngine On
RewriteCond %{SERVER_PORT}!443
RewriteRule ^(.*)$ https://www.x.com/dir/$1 [R,L]

And because HTTPS is slower than HTTP, take the users out of HTTPS mode when they leave the /dir/ directory by:

# /.htaccess
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ https://www.x.com/$1 [R,L]

The above code should be in a .htaccess file (Section 25.4) in the respective directory, but you can achieve the same result much faster if you have access to the web server configuration file and use the <Directory> directive, as described in Section 25.4. See also Using mod_rewrite to force SSL and More on rewrites.


Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO

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 ::