Goldenweb.it homepage

ANNUNCI | DIRECTORY | FONTS | ICONE | NEWSGROUPS | TOP25 | WALLPAPERS

English version  

Fotografo matrimonio
Un team di fotografi professionisti specializzati nei servizi fotografici per matrimoni, operante in tutta Italia.
Hotel sul lago di Garda - wellness e turismo sul Garda
hotel sul lago di garda è il blog dedicato a tutti gli hotel presenti lungo le coste del lago di Garda, un blog ideato per le tue vacanze sul lago di Garda presso semplici hotel ed hotel benessere. Il blog presenta anche gli eventi del lago.

GoldenWeb.it Directory "Premium" Links - Il tuo link qui...



Hiding PHP

In general, security by obscurity is one of the weakest forms of security. But in some cases, every little bit of extra security is desirable.

A few simple techniques can help to hide PHP, possibly slowing down an attacker who is attempting to discover weaknesses in your system. By setting expose_php = off in your php.ini file, you reduce the amount of information available to them.

Another tactic is to configure web servers such as apache to parse different filetypes through PHP, either with an .htaccess directive, or in the apache configuration file itself. You can then use misleading file extensions:

Esempio 15-18. Hiding PHP as another language

# Make PHP code look like other code types AddType application/x-httpd-php .asp .py .pl

Or obscure it completely:

Esempio 15-19. Using unknown types for PHP extensions

# Make PHP code look like unknown types AddType application/x-httpd-php .bop .foo .133t

Or hide it as HTML code, which has a slight performance hit because all HTML will be parsed through the PHP engine:

Esempio 15-20. Using HTML types for PHP extensions

# Make all PHP code look like HTML AddType application/x-httpd-php .htm .html

For this to work effectively, you must rename your PHP files with the above extensions. While it is a form of security through obscurity, it's a minor preventative measure with few drawbacks.