Re: [PHP] ini_set() broken?

2002-07-08 Thread Rasmus Lerdorf
master is the top-level default value set in either your php.ini if you have that file and have a specific value set, or ir not it is the PHP default for the config value. The local is the per-request setting set either in httpd.conf, .htaccess or locally in the script. On Mon, 8 Jul 2002, Phil

Re: [PHP] ini_set() broken?

2002-07-08 Thread Philip Olson
Hello Rasmus- How do you suggest ini_set() document these differences? Maybe the table at ini_set() could use another column, for descriptions and notes. Also, could you give a concise description for the differences between local and master values? Regards, Philip Olson On Mon, 8 Jul 2

Re: [PHP] ini_set() broken?

2002-07-08 Thread Rasmus Lerdorf
Well, you can set it at runtime, it just won't do what you might expect. That doesn't mean that it may not be useful to be able to set it at runtime. If, for example, you have register_globals off and you write an auto-prepend script, or even just a normal snippet of code that you insert into som

Re: [PHP] ini_set() broken?

2002-07-07 Thread Philip Olson
You cannot set register_globals at runtime via ini_set(). The documentation goes off the PHP4 source which is, to put it simply, a little wrong. The PHP4 source says register_globals is PHP_INI_ALL when in the real world it isn't. .htaccess is as close as you'll get. The ini_set() docs a

Re: [PHP] ini_set() broken?

2002-07-07 Thread Tom Rogers
Hi Even with the correct spelling it returns null (php-4.2.1) $x = ini_get('register_globals'); echo "current settings = ".$x.""; Tom At 12:43 PM 8/07/2002 +0800, Jason Wong wrote: >Tom Rogers said: > > Hi > > If you check with phpinfo() you will see that it is getting set to 1 or > > 0 but by

Re: [PHP] ini_set() broken?

2002-07-07 Thread Jason Wong
Tom Rogers said: > Hi > If you check with phpinfo() you will see that it is getting set to 1 or > 0 but by the time your script is run it is too late for it to have any > effect. I just checked with an old PHP manual (probably 4.1.X) and register_globals can only be set in PHP_INI_PERDIR & PHP_I

Re: [PHP] ini_set() broken?

2002-07-07 Thread Tom Rogers
Hi If you check with phpinfo() you will see that it is getting set to 1 or 0 but by the time your script is run it is too late for it to have any effect. Also ini_get('registar_globals') will not return the current state. I have no idea why, it looks like one of those undocumented safety features

Re: [PHP] ini_set() broken?

2002-07-07 Thread Greg Donald
On Mon, 8 Jul 2002, Jason Wong wrote: > if (ini_set("register_globals", "0") !== FALSE) > echo "ini_set success"; > else > echo "ini_set failed"; >?> Finally someone interested in helping find my error. Thanks alot! -- -

Re: [PHP] ini_set() broken?

2002-07-07 Thread Chris Shiflett
Greg Donald wrote: >On Sun, 7 Jul 2002, Chris Shiflett wrote: > >>I refer you to this URL: >> >>http://www.tuxedo.org/~esr/faqs/smart-questions.html >> >> > >I refer you to this URL: http://php.net/ini_set and ask why does this >function not work as per the manual? > >Again, here is my code

Re: [PHP] ini_set() broken?

2002-07-07 Thread Miguel Cruz
On Sun, 7 Jul 2002, Greg Donald wrote: > On Sun, 7 Jul 2002, Miguel Cruz wrote: >>> >> if(ini_set("register_globals", "0")) >>> echo "ini_set success"; >>> else >>> echo "ini_set failed"; >>> ?> >> >> Please don't say "this code doesn't work." Say why you think it didn't >> work, whether that

Re: [PHP] ini_set() broken?

2002-07-07 Thread Jason Wong
Greg Donald said: > On Sun, 7 Jul 2002, Miguel Cruz wrote: > >>> >> if(ini_set("register_globals", "0")) >>> echo "ini_set success"; >>> else >>> echo "ini_set failed"; >>> ?> >> >>Please don't say "this code doesn't work." Say why you think it didn't >> work, whether that's because you receiv

Re: [PHP] ini_set() broken?

2002-07-07 Thread Greg Donald
On Sun, 7 Jul 2002, Chris Shiflett wrote: >I refer you to this URL: > >http://www.tuxedo.org/~esr/faqs/smart-questions.html I refer you to this URL: http://php.net/ini_set and ask why does this function not work as per the manual? Again, here is my code: -- --

RE: [PHP] ini_set() broken?

2002-07-07 Thread Greg Donald
On Mon, 8 Jul 2002, Martin Towell wrote: >>> >> if(ini_set("register_globals", "0")) >>> echo "ini_set success"; >>> else >>> echo "ini_set failed"; >>> ?> > >I haven't tried this code Then why comment on it? >but I assume you're trying to say that "ini_set >failed" is displayed, but you're

Re: [PHP] ini_set() broken?

2002-07-07 Thread Chris Shiflett
Greg Donald wrote: >If you can't be helpful then feel free to shutup.. > Please don't attack people who freely give their time to try and help you. Mr. Cruz did not ridicule you in any way but merely asked that you be more specific than, "it doesn't work," which is very good advice and a sinc

RE: [PHP] ini_set() broken?

2002-07-07 Thread Martin Towell
On Sun, 7 Jul 2002, Miguel Cruz wrote: >> > if(ini_set("register_globals", "0")) >> echo "ini_set success"; >> else >> echo "ini_set failed"; >> ?> [snip] I haven't tried this code, but I assume you're trying to say that "ini_set failed" is displayed, but you're expecting the other output

Re: [PHP] ini_set() broken?

2002-07-07 Thread Greg Donald
On Sun, 7 Jul 2002, Miguel Cruz wrote: >> > if(ini_set("register_globals", "0")) >> echo "ini_set success"; >> else >> echo "ini_set failed"; >> ?> > >Please don't say "this code doesn't work." Say why you think it didn't >work, whether that's because you received an error message, or a spec

Re: [PHP] ini_set() broken?

2002-07-07 Thread Miguel Cruz
On Sun, 7 Jul 2002, Greg Donald wrote: > This code doesn't work: > > if(ini_set("register_globals", "0")) > echo "ini_set success"; > else > echo "ini_set failed"; > ?> Please don't say "this code doesn't work." Say why you think it didn't work, whether that's because you received an error