please help me sort out this script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ask them to upgrade their php to a newer version, or change the php.ini for you. It can't hurt. :)
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

[php_man]ini_set[/php_man]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

wouldn't using ini_set be kinda pointless by that time? ;)
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

there are many ways, ini_set is one, the user notes list a couple more. Why would it be to late?
php manual user notes ini_set wrote: There is another possibility by changing PHP Settings!
If your Webspace is able to handle ".htaccess" files, you're able to change PHP_INI Settings through this file!
To disable register_globals you have to set:
php_value register_globals 0
If you wanna set other settings, feel free, because there is no problem!
These Settings are set before running the script, e.g. the results of register_globals, when setting a parameter in the URL like 'foo.php?foo=stuff', is not present, $foo is unset.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

because an ini_set would be inside the php script, by that point register_globals has already run its course. I'd say .htaccess would be the best route (if allowed/supported) and the provider doesn't want to change the setting internally.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

you are, quite arguably, though, right :)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

look at the user comments in register globals section
Post Reply