|
#1
|
|||
|
|||
|
I have one question that I could not find a existing anwser to. Does HostGator run their servers with PHP Register_Globals on or off? One of the sites that I would like to move to a new host has a PHP MySQL backend script which needs the setting on to run.
|
|
#2
|
||||
|
||||
|
Hi,
register_globals is ON. In case you ever want it to be off, you can add this line to your .htaccess file: php_value register_globals 0 Stef. |
|
#3
|
|||
|
|||
|
Thank you for the reply. With past hosts I always considered a forum reply within 24 hours a minor miracle. I will at the very least give HostGator a try.
Staren |
|
#4
|
|||
|
|||
|
Forums are also more community based help, if you ever need something that is an emergency be sure to email us (usually answered within the hour) or use livechat instead.
|
|
#5
|
|||
|
|||
|
Quote:
Staren |
|
#6
|
|||
|
|||
|
Yes, just meant for future of course.
|
|
#7
|
|||
|
|||
|
Has this changed? Adding this to .htaccess produces an internal page error for me. Joomla 1.12.
Without it everything works. But for Security reasons I want it disabled. Suggestions? |
|
#8
|
||||
|
||||
|
Quote:
Look here: http://forums.hostgator.com/showthread.php?t=8822
__________________
quietFinn - netFinn Finland "Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss |
|
#9
|
|||
|
|||
|
Quote:
Following PHP Server Settings are not optimal for Security and it is recommended to change them:
Unfortunately my lovely Hostgator space wont do the same. Please post the clues or directions to the missing link..* We would rooly like to resolve this long standing issue Many thanks, ![]() Love live hostgator |
|
#10
|
|||
|
|||
|
Your server will likely be using PHPSuExec so a .htaccess override will not work you will need to use php.ini and as quietFinn said.. go to http://forums.hostgator.com/showthread.php?t=8822
|
|
#11
|
||||
|
||||
|
Quote:
You can verify if your server is using PHPSuExec by looking at the line with "Server API" in the phpinfo() ouput. If it says "CGI" then your server is using PHPSuExec. Stef. |
|
#12
|
|||
|
|||
|
Quote:
and i need to turn off register global , as i read my server is using PHPSuExec so i can't change register global at the htacces file so how can i change it in php.ini?? |
|
#13
|
||||
|
||||
|
yup.. you can have the register global, .htaccess overwrite, and redirection.
for php.ini.... look at the folder where you run the php from. if not have it, you need to copy the php.ini from your account public_html/. and in the php.ini, find the line "register_globals".. set the setting to ON.
__________________
Charles Gan Hostgatorreview.org
|
|
#14
|
|||
|
|||
|
Quote:
Quote:
|
|
#15
|
||||
|
||||
|
When you php.ini override like that, the php.ini file must be in EVERY directory where php code is present. (Or a symlink to the php.ini)
Search the forum, there are at least 50 solutions listed. |
|
#16
|
|||
|
|||
|
FWIW, being a co-author of popular PHP books... I really wish register_globals could be turned off by default on hosts... I know this isn't feasible as it'd cripple most scripts, but it is a huge vulnerability and should be handled accordingly... It is disabled by default in PHP versions from 4.XX on...
Obviously, if you have access to PHP.ini, you can turn this off, and this is the best solution as reading .htaccess files isn't always the best solution overall. It isn't a huge performance hit, but the more "hoops to jump" always creates slowdown.
__________________
http://www.codesight.net |
|
#17
|
|||
|
|||
|
i created a .htaccess file and included php_value register_globals 0
and i get the following error when i want to install one of my script: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, xxxxxsh.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. Can you advice me what to do next? thank you, -cristian |
|
#18
|
||||
|
||||
|
which server are you on?
|
|
#19
|
||||
|
||||
|
This is an old thread and was written before the upgrade to PHP5. You will need to remove the command from .htaccess and use the methods described here to add it to php.ini instead. You will need to put the php.ini file in each folder that you want to have register_globals turned off.
|
|
#20
|
|||
|
|||
|
|
|
#21
|
|||
|
|||
|
thank you GvilleRick,
i will try that and let you know, -cristian |
|
#22
|
|||
|
|||
|
i dont have a php.ini in /home/myusername/public_html/
maybe i deleted from mistake long time ago, what shall i do now please ? thank you, -cristian |
|
#23
|
|||
|
|||
|
i managed to resolve this through hostgator live chat, somebody helped me and copyed a new php.ini in public_html
thanks gator, ![]() -cristian |
|
#24
|
|||
|
|||
|
Quote:
Where should I look? TIA< t |
|
#25
|
||||
|
||||
|
If you do not have any php.ini file and need to have the "register_globals" at On then just create a text file using windows notepad or any simple text editor and write in it
PHP Code:
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
All times are GMT -6. The time now is 10:51 PM.












