The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Register_Globals Off
PostPosted: Mon Sep 04, 2006 4:41 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Jun 05, 2006 8:12 pm
Posts: 13
I tried to put the line: "php_flag register_globals off" in my .htaccess file so I could turn Register_Globals off, but when I did, this came up on my web site.

Quote:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@website.com 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.


Does anyone know what's wrong?


Top
 Profile  
 
 Post subject: Re: Register_Globals Off
PostPosted: Mon Sep 04, 2006 5:44 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1367
Location: New Orleans, LA, USA
Talk to your hosting company and tell them what you are trying to do.  They should be able to tell you want you need to do to turn RG off.

_________________
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions


Top
 Profile  
 
 Post subject: Re: Register_Globals Off
PostPosted: Mon Sep 04, 2006 10:49 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Tue Jan 10, 2006 2:18 pm
Posts: 1183
Location: Lake Garda - Italy
Hi..

Searching about the same problem i found a little tool to set the register_global in "Off" without rootaccess to my server.

The original post is in the forum of the joomla.de community.
http://www.joomlaportal.de/sicherheit/53461-register_globals-bei-1-1-a.html

I try to explain me in english.

What is this tool doing:
To setup register_global you have to place an php.ini file with the code "register_globals = off" in every directory that contains .php files in your website. If you do it manualy it will be a lot of work because Joomla! has so many directories inside.
Placing only one php.ini file in the Joomla! root the tool scan for folders with .php files in your site and adds syslinks pointing to the php.ini file in your root. Thats all... After this the register_global function is "OFF" and the security message isn't there anymore.
If you want to get back to your initial configuration you can remove all syslinks with the tool in the same way that you added the links.
After setting up the syslinks its higly recommendet to remove the tool for security reasons. Also this you can do with press a button inside the tool...
If you need to add new syslinks because you install new components or other you have to upload the tool again and rescan the folders. The tool adds the syslinks where needed. And remember to remove the tool after...

The two files attached has to be placed in the Joomla! root over FTP after point your Browser to your Joomla! root like this:
http://www.yourdomain.xx/configPHP.php and run the tool.

I tried this on two different providers with success. But i do not realy know what the tool is doing...(I'm not a coder)  Maybe some Server Guru can have a look to see if this tool is clean like it's seams and if this way is the right way to do it. The tecnical support from puretec.de (one of my hosters) told me that this is ok...

Regards


You do not have the required permissions to view the files attached to this post.

_________________
Martin Bergmann
----------------------
Soluzioni web e supporto professionale - http://www.bergmannn.net
Lake Garda Hotelguide - http://www.gardalink.com


Top
 Profile  
 
 Post subject: Re: Register_Globals Off
PostPosted: Mon Sep 04, 2006 11:40 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Feb 12, 2006 8:59 am
Posts: 5
Bergmannn,

Here is what I have found out after searching through allot of forums and i hope this helps you and anyone else using 1and1.com

By default 1and1.com uses php 4.44 for backwards compatability. While this does allow many of their clients to continue using older php scripts it also leaves allot of security holes open that were fixed in php 5.

To solve this problem you can do 4 things, first copy a php.ini file into ever folder one at a time, second use a script to copy the php.ini file or create a link to that file like your script does. third you can change each and ever php file to use the .php5 extention.

The forth and best way  is to create a file at the root of your site called .htaccess. and put this one line in that file.

Code:
AddType x-mapp-php5 .php



What this does is tells the apache server that 1and1 uses to the php 5 engine on all php files in the same directory and all sub directories that the .htaccess file resides in. This greatly inceases the security of your site because php 5 turns off the register globals option by default and fixes several other security holes that were in php 4.

For your convince I will also attach a htaccess file for you to download. just ftp the file to the root of your webspace and rename to .htaccess and your done.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Register_Globals Off
PostPosted: Mon Sep 04, 2006 11:47 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Tue Jan 10, 2006 2:18 pm
Posts: 1183
Location: Lake Garda - Italy
askjosh wrote:
Here is what I have found out after searching through allot of forums and i hope this helps you and anyone else using 1and1.com


Did you read my post ? I already solve the problem... ;)

_________________
Martin Bergmann
----------------------
Soluzioni web e supporto professionale - http://www.bergmannn.net
Lake Garda Hotelguide - http://www.gardalink.com


Top
 Profile  
 
 Post subject: Re: Register_Globals Off
PostPosted: Tue Sep 05, 2006 12:56 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Feb 12, 2006 8:59 am
Posts: 5
Poste removed by author


Top
 Profile  
 
 Post subject: Re: Register_Globals Off
PostPosted: Tue Sep 05, 2006 11:19 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Wed Jan 25, 2006 10:56 pm
Posts: 55
Location: Busto Arsizio (VA) - Italy
Hi, I followed the instructions, but I still have the message saying register_globals is on.
Any idea?

Php is runned as cgi

_________________
Paolo De Dionigi
Moderator of Zen Cart Italy

http://www.atfriends.net


Top
 Profile  
 
 Post subject: Re: Register_Globals Off
PostPosted: Sun Oct 08, 2006 7:00 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sat Dec 31, 2005 1:37 am
Posts: 1
I used the script and that took care off my security flag.

Thank you...

Now to apply it to my other sites...


Top
 Profile  
 
 Post subject: Re: Register_Globals Off
PostPosted: Wed Oct 25, 2006 11:09 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 05, 2005 6:40 pm
Posts: 8
Location: K.K, Sabah / Btu, Swk ~ Now in Penang
I've tried this with my hostgator hosting....all seems fine now. thks..for the solution  :laugh:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 



Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group