Back to top

Autore Topic: Come risolvere "register_globals" & "RG_EMULATION"  (Letto 11160 volte)

Offline kfiasche

  • Nuovo arrivato
  • *
  • Post: 27
    • Mostra profilo
Come risolvere "register_globals" & "RG_EMULATION"
« il: 22 Ott 2006, 20:49:29 »
Allora ri spieghiamo per l'ultima volta come si risolvono i problemi degli avvisi di sicurezza...

Riguardo al RG_EMULATION basta editare il file globals.php, cercare define( 'RG_EMULATION', 1 ); e sostituire con define( 'RG_EMULATION', 0 );


Per il problema del register_globals se non si ha accesso al server basta aprire il file .htaccess e aggiungere alla fine il seguente cod
Codice: [Seleziona]
<IfModule mod_php4.c>
  php_value register_globals 0
</IfModule>

Problemi risolti...  ;D

Offline kfiasche

  • Nuovo arrivato
  • *
  • Post: 27
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #1 il: 22 Ott 2006, 20:51:53 »
riguardo al register_globals,
ovviamente chi ha php5 utilizzerà il seguente
Codice: [Seleziona]
<IfModule mod_php5.c>
  php_value register_globals 0
</IfModule>


Offline sove13

  • Esploratore
  • **
  • Post: 82
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #2 il: 23 Ott 2006, 14:07:53 »
io li ho provati entrambi, ma non mi risolvono il problema di
"register_globals è ON" !!!

ma il mio file htaccess non ha il punto davanti e vedo che viene sempre scritto col punto (.htaccess) devo metterlo?

è sempre stato senza punto!

grazie

Offline giak

  • Team Joomla.it
  • Abituale
  • *******
  • Post: 1259
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #3 il: 23 Ott 2006, 14:41:39 »
il file htacccess ha il punto davanti in quanto in linux i file che iniziano per punto risultano essere non visibili. Detto questo il file .htaccess e' un file delicatissimo che se non configurato bene crea dei problemi. prova a rinominarlo .htaccess senza nessuna estenzione e vedi che succede. Se hai dei problemi rinominalo htaccess.txt e posta i problemi avuti
webmaster
www.egiakweb.net
 Developer pgDesigner - Datamodel designer for PostgreSQL pgdesigner.sourceforge.net  I belive! Free as in Freedom www.gnu.org

Offline sove13

  • Esploratore
  • **
  • Post: 82
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #4 il: 23 Ott 2006, 14:58:57 »
se metto il punto mi da errore 500 Internal Server Error

se lo metto .txt mi da lo stesso errore di register_globals

Offline sove13

  • Esploratore
  • **
  • Post: 82
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #5 il: 23 Ott 2006, 15:00:14 »
questo è il mio file htaccess.txt

Codice: [Seleziona]
##
# @version $Id: htaccess.txt 4756 2006-08-25 16:07:11Z stingrey $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
# Only use one of the two SEF sections that follow.  Lines that can be uncommented
# (and thus used) have only one #.  Lines with two #'s should not be uncommented
# In the section that you don't use, all lines should start with #
#
# For Standard SEF, use the standard SEF section.  You can comment out
# all of the RewriteCond lines and reduce your server's load if you
# don't have directories in your root named 'component' or 'content'
#
# If you are using a 3rd Party SEF or the Core SEF solution
# uncomment all of the lines in the '3rd Party or Core SEF' section
#
#####################################################

#####  SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
# SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
# OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
#
# In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# May need to be uncommented.  If you are running your Joomla/Mambo from
# a subdirectory the name of the subdirectory will need to be inserted into this
# line.  For example, if your Joomla/Mambo is in a subdirectory called '/test/',
# change this:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# to this:
# RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
#
#####################################################


##  Can be commented out if causes errors, see notes above.
Options FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On


#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla/MamboDirectory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section



########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section



########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#                             
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
<IfModule mod_php5.c>
  php_value register_globals 0
</IfModule>

Offline vola

  • Esploratore
  • **
  • Post: 121
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #6 il: 23 Ott 2006, 15:48:57 »
non e' detto che il provider ti lasci settare il registre globals a off attraverso htaccess, su che provider sei?

Offline kfiasche

  • Nuovo arrivato
  • *
  • Post: 27
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #7 il: 23 Ott 2006, 15:57:21 »
se metto il punto mi da errore 500 Internal Server Error

se lo metto .txt mi da lo stesso errore di register_globals

il problema è appunto quello descritto dagli altri...
probabilmente non puoi usare i file .htaccess sul tuo spazio

Offline sove13

  • Esploratore
  • **
  • Post: 82
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #8 il: 23 Ott 2006, 16:22:02 »
sgaragnao aru*ba.
credo di avere un server condiviso.
quindi me lo tengo così?

EDIT: Bauhauhauhauh ma che censura è!? sgaragnao!!  ;D

Offline vola

  • Esploratore
  • **
  • Post: 121
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #9 il: 23 Ott 2006, 16:22:54 »
Piu che non poter usare l'htaccess direi che non puoi usare certe direttive, per le regole di rewrite di solito non ci sono grossi problemi...

Offline vola

  • Esploratore
  • **
  • Post: 121
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #10 il: 23 Ott 2006, 16:24:19 »
sgaragnao aru*ba.
credo di avere un server condiviso.
quindi me lo tengo così?

EDIT: Bauhauhauhauh ma che censura è!? sgaragnao!!  ;D

eheh immaginavo... ti confermo che non ci puoi fare niente allora, te lo devi tenere cosi...

Offline kfiasche

  • Nuovo arrivato
  • *
  • Post: 27
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #11 il: 23 Ott 2006, 21:58:53 »
sgaragnao aru*ba.
credo di avere un server condiviso.
quindi me lo tengo così?

EDIT: Bauhauhauhauh ma che censura è!? sgaragnao!!  ;D

eheh immaginavo... ti confermo che non ci puoi fare niente allora, te lo devi tenere cosi...

aruba .. mitica mitica.. mavaff....
Uno attrova chiddu ca spenni..

Offline giak

  • Team Joomla.it
  • Abituale
  • *******
  • Post: 1259
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #12 il: 23 Ott 2006, 22:17:46 »
il motivo dell'errore molto probabilmente e' la mancanza del mod_rewrite (tipico dell'errore 500) sul server
webmaster
www.egiakweb.net
 Developer pgDesigner - Datamodel designer for PostgreSQL pgdesigner.sourceforge.net  I belive! Free as in Freedom www.gnu.org

Offline vola

  • Esploratore
  • **
  • Post: 121
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #13 il: 24 Ott 2006, 15:27:50 »
Ti assicuro che sgaragnao ha il mod_rewrite (a meno che non si stia su un server winzzoz),
ho qualche sitarello che gira li.
L'errore 500 generamente esce se qualche direttiva nel file .htaccess non viene digerita dal server, ma in questo caso e' dovuto ai php_flag.

Ciao

Offline Overgrafic

  • Esploratore
  • **
  • Post: 90
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #14 il: 27 Ott 2006, 17:06:56 »
Bè...ho provato e non succede nulla, anche impostando a 777 gli attributi di .htaccess
Lillo Leonardo

Offline giak

  • Team Joomla.it
  • Abituale
  • *******
  • Post: 1259
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #15 il: 28 Ott 2006, 16:26:39 »
L'errore 500 generamente esce se qualche direttiva nel file .htaccess non viene digerita dal server, ma in questo caso e' dovuto ai php_flag.

Ciao

interessante la cosa! un php_flag che da un 500!
webmaster
www.egiakweb.net
 Developer pgDesigner - Datamodel designer for PostgreSQL pgdesigner.sourceforge.net  I belive! Free as in Freedom www.gnu.org

Offline kfiasche

  • Nuovo arrivato
  • *
  • Post: 27
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #16 il: 02 Nov 2006, 20:16:49 »
scusate ma un
infophp();
per sapere se può usare .htacces non è la soluzione migliore?

Offline giak

  • Team Joomla.it
  • Abituale
  • *******
  • Post: 1259
  • Sesso: Maschio
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #17 il: 03 Nov 2006, 01:08:12 »
dipende da come e' stato impostato apache e non da come e' impostato php. di solito tramite il file .htaccess si possono modificare delle impostazioni del httpd.conf ma questo non e' sempre possibile farlo, dipende sempre da come e' stato impostato apache e qui ti rimando al sito di apache e alla sua documentazione che spiega tutto
webmaster
www.egiakweb.net
 Developer pgDesigner - Datamodel designer for PostgreSQL pgdesigner.sourceforge.net  I belive! Free as in Freedom www.gnu.org

Offline kapa89

  • Nuovo arrivato
  • *
  • Post: 1
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #18 il: 28 Mar 2007, 12:41:43 »
salve sono nuovo.
è da ieri che ho scoperto joomla. ora sto leggendo che per il register_global OFF in server aruba sotto hosting linux ci sono devi problemi. ma con il php 4.3 > non era off di base??
può portare a qualche errore in particolare questo flag settato in ON?
l'unica soluzione per noi arubesi è passare a hosting che supportano joomla? tipo www.joomlahost.it

grazie

Offline GreenAngel

  • Appassionato
  • ***
  • Post: 330
  • GreenAngel (l'oasi verde nel web)
    • Mostra profilo
Re: Come risolvere "register_globals" & "RG_EMULATION"
« Risposta #19 il: 17 Lug 2007, 15:38:02 »
Ciao grigoa...
ho letto il tuo suggerimento e l'ho provato.

Ha funzionato !

Potevo leggere la soluzione e metterla in pratica e tirare avanti (come fanno in molti qui dentro), ma mi sono sentito in dovere di ringraziarti per il suggerimento.

Ce ne vorrebbero di più utenti come te.

Grazie ancora. ;)

GreenAngel
GreenAngel (l'oasi verde nel web) http://www.greenangel.it

 



Web Design Bolzano Kreatif