admin/environment/custom check/php check register globals

Saltar a: navegación, buscar
Nota: ACTUALIZACIÓN: Register_globals ha sido DEPRECADo a partir de PHP 5.3.0 y REMOVIDO a partir de PHP 5.4.0


Para deshabilitar register_globals en un Ubuntu/Debian que corre Apache (el 7.0 variará dependiendo de cual versión de PHP esté Usted corriendo, también si Usted está corriendo Nginx la ruta será /etc/php/7.0/nginx/php,ini):

sudo nano /etc/php/7.0/apache/php.ini

Añada lo siguiente al final:

register_globals = Off

Guarde y cierre el archivo, después reinicie PHP:

systemctl restart php7.0-fpm.service

Si Usted está corriendo FastCGI Usted necesitará hacer la misma adición a /etc/php/7.0/fpm/php.ini


Lo que sigue es documentación anterior que estaba en esta página, probablemente obsoleta

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)

If register_globals is ON there are certain security risks so it should be turned off.

You can check the setting under the administration interface for server for your site.

Moodle will often give a very short description about how to change this if it is set to ON.

Here is an example from a hosted site:

I found a forum post on the Siteground site about this problem. They said that if one had php 5.1 that register_globals was ON by default and that under 5.1 a php.ini could NOT effect it. But that one can easily change the used php version with a suitable .htaccess file (for changing to php5.2):

AddHandler application/x-httpd-php52 .php .php5 .php4 .php3

in the public_html root that would influence other directories recursively. (One can also do it differently in different directories if one needs that.)

After doing that the register_globals was off.