Joomla: PHP register_globals setting is `ON` instead of `OFF`

This item was filled under [ Joomla ]

This is tutorial for joomla problem, cause usually when you just installed joomla, some of you may get this notice:
PHP register_globals setting is `ON` instead of `OFF`

What to do? this is an easy step by step to fix that problem:

- make .htaccess file in your Joomla site’s root and add this lines:

# Offers protection during hack attacks by NOT disclosing error
# messages, server paths, et cetera, and turns off your globals.
php_flag display_errors off
php_flag register_globals off

- make “php.ini” in your Joomla site’s root and add this lines:

register_globals = Off
magic_quotes_gpc = On

- open your globals.php file, and change the line:

define( 'RG_EMULATION', 1 )

to

define( 'RG_EMULATION', 0 )

now, your register globals is OFF!

Share and Enjoy:
  • del.icio.us
  • Fark
  • Reddit
  • Blogosphere News
  • Digg
  • Facebook
  • Google Bookmarks
  • Live
  • MSN Reporter
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • Tumblr
  • Twitter
  • No Related Post
  • No Related Post
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

30 Comments on “Joomla: PHP register_globals setting is `ON` instead of `OFF`”

  • swebbo
    22 February, 2008, 3:50

    I dont know how to

    - open your globals.php file

    I have made the other files

  • toso
    29 March, 2008, 14:08

    you must in globals.php atributes the numeric value set tu 644

  • Thanh Su
    1 April, 2008, 1:36

    I tried to do your resolutions but … unsuccessful!
    huhu…

  • gigglemedia
    7 April, 2008, 21:41

    worked great. thanks!!

  • 26 April, 2008, 7:08

    I’m new to Joomla and am having trouble getting this to work. Could someone post an example of what the files look like after inserted.

  • 5 May, 2008, 11:40

    This worked for me as well! Thanks!

  • Iannis
    10 May, 2008, 8:51

    There is already an .htaccess in my root file. When I try to change or create another, there comes a big error in my site. What can I do?

  • richard
    23 May, 2008, 22:51

    I’m having the same problem.. Any suggestion. I did email my web hosting service to see if they can shut if off from the Apache root level.

  • chooser
    15 July, 2008, 2:44

    Thats was straight and to the point, it worked great. Thanks a million!!

  • asel
    16 July, 2008, 0:28

    It work well

    Thank you too much

  • kapoing
    19 July, 2008, 15:34

    works

  • 24 July, 2008, 22:48

    this broke the website, I dont know how to fix, extremely stressful, ive back tracked and i just cant fix it now what the hell just happend

  • 24 July, 2008, 23:03

    fuck please help me here i broke my fucking clients website this is fucking rediculous what the fuck do i do

  • 24 July, 2008, 23:22

    lol ok, i fixed it but dayyum i was freaking out there, the solution was to download a new joomla and upload the new globals.php

  • namazu
    25 July, 2008, 23:37

    I use joomla 1.0.15 and follow your instruction but no successfully. Pls help. Many thanks

  • skillzy
    14 August, 2008, 18:35

    Thanks for this tip, it worked!

  • 16 August, 2008, 14:48

    Man! Thanks! Work well! Thanks for support!

  • Steve
    18 August, 2008, 1:17

    PERFECT! THANX!!

  • 31 August, 2008, 13:51

    Bravo :)

    Worked a treat,

  • ts
    1 September, 2008, 19:52

    That worked! Thanks for the tip.

  • 3 September, 2008, 13:45

    This completely wrecked my site. I will look elsewhere. Luckily I undid everything to get it back

  • Liro
    5 September, 2008, 13:52

    You Brilliany Guy !!

    Had a bit of challenge to get the .htaccess sorted, i tried to upload it to my pc and save it. It refused because Windows needs an extension to the file. So I added the lines in a text file eg – happy.txt , i then uploaded to the site, i then used ftp software ( eg. Smart Ftp) to rename it to .htaccess ( without anny extension , this is important else it does not work). The php.ini is just a normal text file and can be created on the pc and named – php.ini , upload it to the folder. Finally, I used my Dreamweaver Cs3 to open the global.php, inserted the code you advised, and what do you know – GLOBAL IS OFF.

    You a star, thanks, my clients will all be safer from today onward.

  • moonshooter
    28 October, 2008, 11:39

    Followed the instructions and…Voila!

  • sidlo
    30 October, 2008, 11:25

    thanks

  • Christian
    13 November, 2008, 7:13

    This works, thanx :)

  • Matt
    28 December, 2008, 14:16

    Yay! Worked like a charm. You rock. Thanks!

  • 30 March, 2009, 11:34

    u r a champ!!….thanks a million…that shit just gone…!!

  • 13 May, 2009, 5:34

    Hey, i get trouble when i follow your tutorial. My Error is :

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@gemilangku.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

  • joao
    3 June, 2010, 5:16

    I will do a Backup first. I only have file acess tru extplorer componente (I have no ftp access). So if the site gets broken, i have to destroy it and rebuild it on the Hosting Services Backend site. (Limited Joomla Pack Hosting)… thinks about risking it or not… First will speak with client :)

  • 30 August, 2010, 5:07

    can anybody tell where is this global.php is located.
    i have tried to find.

Leave a Comment