MDN

Go Back   Mambo - Forums Closed for posting > Mambo 4.5.5 - Stable > Installation Questions

Reply
 
Thread Tools Search this Thread Display Modes
Old October 20th, 2004, 11:21   #1
bobstennett
 
bobstennett's Avatar
 
Join Date: Sep 2004
Location: Oregon
Posts: 21
bobstennett is on a distinguished road
Default Turning Register Globals off

I have read some posts on this board about people being hosted on a sever with Register globals turned on and Mambo works better with register globals off.
I had the same problem and my ISP said he could not turn them off with out changing the whole sever set up and it would mess up his c-panels.
I did some reasearch and found out you can turn Register Globals off in your local directory with the .htaccess file, below is the .htaccess file code to turn off Register globals in mambo.


RewriteEngine On

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

# RewriteBase /YourMamboDirectory

#
# Rules
#

RewriteRule ^content(.*) index.php
RewriteRule ^component/(.*) index.php

php_flag register_globals off
Order allow,deny
Allow from all


If you are not using SEF URLs just create a .htaccess file with the below code and put it in your main mambo directory

php_flag register_globals off
Order allow,deny
Allow from all
bobstennett is offline   Reply With Quote
Old November 22nd, 2004, 20:17   #2
Erehwon
 
Join Date: Nov 2004
Location: Montpelier, VT
Posts: 1
Erehwon is on a distinguished road
Default

Worked great thanks!!!
Erehwon is offline   Reply With Quote
Old December 19th, 2004, 12:31   #3
lthouse
 
Join Date: Jul 2004
Posts: 129
lthouse is on a distinguished road
Default Suggestion Produced Error 500

I added the lines to my .htaccess as suggested and it didn't work. I was getting an error 500 Internal Service Error. Here is a copy of my file. The lines I added are in bold at the bottom.

Code:
# $Id: htaccess.txt,v 1.10 2003/12/22 10:37:29 rcastley Exp $ 
# 
# htaccess file for SEF 
# @package Mambo Open Source 
# @Copyright (C) 2000 - 2003 Miro International Pty Ltd 
# @ All rights reserved 
# @ Mambo Open Source is Free Software 
# @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html 
# @version $Revision: 1.10 $ 

# 
#  mod_rewrite in use 
# 

RewriteEngine On 

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

RewriteBase /mos 

# 
#  Rules 
# 

RewriteRule ^content(.*) index.php 
RewriteRule ^component/(.*) index.php 


#  Added this section for SEF Advance
#  mod_rewrite in use
#

RewriteEngine On

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

# RewriteBase /YourMamboDirectory

#
#  Rules
#

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

php_flag register_globals off
Order allow,deny
Allow from all
lthouse is offline   Reply With Quote
Old December 22nd, 2004, 14:21   #4
brookie
 
Join Date: Jan 2004
Posts: 8
brookie is on a distinguished road
Default

Try adding each line one at a time and see which one is breaking it.
brookie is offline   Reply With Quote
Old December 23rd, 2004, 21:26   #5
crees
 
Join Date: Nov 2004
Posts: 59
crees is on a distinguished road
Default

Quote:
Originally Posted by lthouse
I added the lines to my .htaccess as suggested and it didn't work. I was getting an error 500 Internal Service Error. Here is a copy of my file. The lines I added are in bold at the bottom.
The same happened with my installaton. I went to the directory where I uploaded all the files and the only thing set incorrect was register globals. I updated the htaccess file that came with mambo and got the 500 Internal Service Error. I then uploaded another htaccess file that had just the 3 lines as lthouse has in bold and received the same error. The only way to get rid of the 500 error was to upload an empty htaccess file. Then I was able to proceed to the 1st install page but still have register globals turned on.

Any advice would be appreciated.

\m/
crees is offline   Reply With Quote
Old December 24th, 2004, 04:06   #6
walb
 
walb's Avatar
 
Join Date: Aug 2004
Location: Hack City, Earth.
Posts: 1,062
walb is on a distinguished road
Default

It is possible that your hoster will not allow you to change options on Apache level in the httpd.conf.
You will need "AllowOverride Options" or "AllowOverride All" privileges to do so.
It can also be restricted in the php.ini settings. The latter is not likely the problem. I think the first. Ask your hoster.
__________________
These forum moderators keep removing my sig!
Freedom of mind and speech is not appreciated over here.
walb is offline   Reply With Quote
Old December 24th, 2004, 12:27   #7
crees
 
Join Date: Nov 2004
Posts: 59
crees is on a distinguished road
Default

Quote:
Originally Posted by walb
It is possible that your hoster will not allow you to change options on Apache level in the httpd.conf.
You will need "AllowOverride Options" or "AllowOverride All" privileges to do so.
It can also be restricted in the php.ini settings. The latter is not likely the problem. I think the first. Ask your hoster.
So instead of Allow from all use AllowOverride Options?
crees is offline   Reply With Quote
Old December 24th, 2004, 15:53   #8
lthouse
 
Join Date: Jul 2004
Posts: 129
lthouse is on a distinguished road
Default

Well, I got my issue resolved after contacting my web host. Since they use suPHP, I needed to control this aspect using php.ini.

In my case, they had me create a file called php.ini with the following line:
register_globals = 0

I then added a line to my .htaccess which pointed to the php.ini file.
suPHP_ConfigPath /home/YourcPanelName/public_html

Hope that helps.
lthouse is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -7. The time now is 09:19.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.