 |
 |
Please help meganewbie with php 'register_globals'
|
 |
|
 |
|
Mac Enthusiast
Join Date: May 2001
Status:
Offline
|
|
Hi,
I'm wanting to install phpgroupware on my box, to run on our internat network.
I have almost no idea what I am doing but I have managed to stumble through installing php, mySQL and phpMyAdmin as well as phpcollab.
I didn't find that phpcollab did what I wanted and so need to turn to phpgroupware.
I installed php and mySQL using Marc Liyanage's packages at http://www.entropy.ch/home/welcome.html.
The install instructions which come with phpgroupware require php register_globals to be 'On'
It says to set this in the 'php.ini' file. Marc Liyanage's packages come without this file. Following *his* instructions I created the file
(sudo mkdir -p /usr/local/lib
sudo touch /usr/local/lib/php.ini)
The file now exists but is of course blank.
What exactly to I put in that file to set register_globals to be 'On'?
Also: I'm still petrified of the terminal. Does it come to the same thing to use bbEdit to change my files?
Sorry about the lengthy posting
Thanks for your help!
Simon
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by simonmartin:
Hi,
I'm wanting to install phpgroupware on my box, to run on our internat network.
I have almost no idea what I am doing but I have managed to stumble through installing php, mySQL and phpMyAdmin as well as phpcollab.
I didn't find that phpcollab did what I wanted and so need to turn to phpgroupware.
I installed php and mySQL using Marc Liyanage's packages at http://www.entropy.ch/home/welcome.html.
The install instructions which come with phpgroupware require php register_globals to be 'On'
It says to set this in the 'php.ini' file. Marc Liyanage's packages come without this file. Following *his* instructions I created the file
(sudo mkdir -p /usr/local/lib
sudo touch /usr/local/lib/php.ini)
The file now exists but is of course blank.
What exactly to I put in that file to set register_globals to be 'On'?
Also: I'm still petrified of the terminal. Does it come to the same thing to use bbEdit to change my files?
Sorry about the lengthy posting 
Thanks for your help!
Simon
I always found those instructions to be a bit mystifying...
You can find the php.ini-dist file if you download the source files from php.net. Do a search for that file and it should show up. Just copy the contents of that into the new php.ini file you've created. You can do that using BBEdit if you like, but you'll probably need to do it as root.
From inside that file, you can easily find the instructions to turn register_globals_on, although there has been a good reason to turn it off by default (see php.net for more details).
I'd petition phpgroupware to update to a more modern way of writing php!
|
|
Computer thez nohhh...
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: May 2001
Status:
Offline
|
|
Originally posted by Simon Mundy:
I always found those instructions to be a bit mystifying...
You can find the php.ini-dist file if you download the source files from php.net. Do a search for that file and it should show up. Just copy the contents of that into the new php.ini file you've created. You can do that using BBEdit if you like, but you'll probably need to do it as root.
From inside that file, you can easily find the instructions to turn register_globals_on, although there has been a good reason to turn it off by default (see php.net for more details).
I'd petition phpgroupware to update to a more modern way of writing php!
Simon,
Thanks for that, just downloading now.
It looks as if phpgroupware is moving toward a version which uses register_globals off.
Question: If one php program needs register_globals on and another needs them off, does it mean that you simply can't run those two together?
Thanks!
Simon
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: May 2001
Status:
Offline
|
|
Originally posted by Simon Mundy:
I always found those instructions to be a bit mystifying...
You can find the php.ini-dist file if you download the source files from php.net. Do a search for that file and it should show up. Just copy the contents of that into the new php.ini file you've created. You can do that using BBEdit if you like, but you'll probably need to do it as root.
From inside that file, you can easily find the instructions to turn register_globals_on, although there has been a good reason to turn it off by default (see php.net for more details).
I'd petition phpgroupware to update to a more modern way of writing php!
Simon,
Sorry...
I searched the file for any reference to 'global' and the only sections I found are:
; Whether or not to register the EGPCS variables as global variables. You may
; want to turn this off if you don't want to clutter your scripts' global scope
; with user data. This makes most sense when coupled with track_vars - in which
; case you can access all of the GPC variables through the $HTTP_*_VARS[],
; variables.
;
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = Off
; PHP 4.2 and less have an undocumented feature/bug that allows you to
; to initialize a session variable in the global scope, albeit register_globals
; is disabled. PHP 4.3 and later will warn you, if this feature is used.
; You can disable the feature and the warning seperately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.
That's it.
Did you mean a different file?
Hope you can get me a bit further...
Thanks
Simon
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status:
Offline
|
|
Question: If one php program needs register_globals on and another needs them off, does it mean that you simply can't run those two together?
The register_globals on setting will be compatible with all code, even that written for the register_globals off setting. However running with register_globals on represents a security risk and should be avoided if possible. Tis far better to bring one's code up to compatibility with the register_globals off setting.
The difference is that register_globals off setting requires a shroud around variables, whereas in the more permissive register_globals on setting the shroud is optional. It is the requirement of the shroud which adds security.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: May 2001
Status:
Offline
|
|
Originally posted by Rainy Day:
The register_globals on setting will be compatible with all code, even that written for the register_globals off setting. However running with register_globals on represents a security risk and should be avoided if possible. Tis far better to bring one's code up to compatibility with the register_globals off setting.
The difference is that register_globals off setting requires a shroud around variables, whereas in the more permissive register_globals on setting the shroud is optional. It is the requirement of the shroud which adds security.
Rainy Day,
Thanks for that.
I still don't know how to set this in the php.ini file though.
Can you give me any pointers?
Thanks
Simon
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by simonmartin:
Simon,
Sorry...
I searched the file for any reference to 'global' and the only sections I found are:
register_globals = Off
Simon
That's it right there. Change that to 'On' and you're away.
Don't bother with all that "bug_compat_42" malarky - either you have it on or you don't. And I still recommend you don't 
|
|
Computer thez nohhh...
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: May 2001
Status:
Offline
|
|
Originally posted by Simon Mundy:
That's it right there. Change that to 'On' and you're away.
Don't bother with all that "bug_compat_42" malarky - either you have it on or you don't. And I still recommend you don't
Simon,
Sorry, don't know what's the matter with me... It looked like part of the instructions as opposed to a part of the code.
Right... plow on.
Thanks again. More questions to come I'm sure...
Simon
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|