Date: 01/29/00
- Next message: Andi Gutmans: "Re: [PHP-DEV] Yet another crash - argc/argv"
- Previous message: xendra <email protected>: "[PHP-DEV] Bug #3349: mysql_num_fields() function has changed - now use mysql_field_count"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] argv/argc"
- Next in thread: rasmus <email protected>: "Re: [PHP-DEV] argv/argc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Well as Rasmus mentioned a few mails ago, it's a good idea to distribute an
additional php.ini with the default distribution which we would recommend.
It would keep a cleaner address space and include the highest performance
ini settings.
Andi
At 04:36 PM 1/29/00 +0200, Zeev Suraski wrote:
>On Sat, 29 Jan 2000 rasmus <email protected> wrote:
>
> > > > On Fri, 28 Jan 2000, Zeev Suraski wrote:
> > > > > It would in this specific case, but I think that if people expect
> > > > > argv/argc, they expect them to exist and be empty in case of an empty
> > > > > query.
> > > > >
> > > > > Any reason not to selectively turn argv/argc off by an INI directive?
> > > >
> > > > What about cgi version where argv/argc are supposed to come from the
> > > > command line arguments?
> > >
> > > It's never been like that. $argc/$argv always reflected the contents of
> > > the QUERY_STRING.
> >
> > I am not sure I understand that statement. Obviously $argc and $argv are
> > set based on the command line args in the cgi version. Using PHP 3, look:
> >
> > #!./php -q
> > <?
> > echo $argv[1];
> > ?>
> >
> > $ ./t abc
> > abc
> >
> > Works the same for PHP 4, so what do you mean it *always* reflects the
> > contents of the QUERY_STRING? I have no QUERY_STRING env variable set in
> > this case.
>
>I didn't dig deep enough - the CGI SAPI module 'fools' SAPI to think that
>the command line arguments are actually the query string. So you would
>indeed get this behavior.
>
> > As for why we need the http://www.php.net/?blah URL. It is very handy to
> > be able to access "blah" directly via $argv[0]. Just having it set in the
> > symbol table to an empty value and needing to look through $GLOBALS or
> > $HTTP_GET_VARS is a hassle. This has worked since PHP 2, so changing this
> > default is going to break some sites, including one of mine. I don't mind
> > an ini option to turn it off to increase performance, but we can't just
> > drop this feature.
>
>I didn't want to change the default and certainly not drop the feature. I
>just wasn't sure why it was commonly necessary (and I still think that
>most scripts don't use it). Basically what I'm saying is that if we were
>designing version 1.0 of PHP, this would have probably not been in by
>default. But since we're up to 4.0, we can only add a user selectable
>option, which isn't that bad.
>
>Zeev
>
>--
>Zeev Suraski <zeev <email protected>>
>http://www.zend.com/
>
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
>For additional commands, e-mail: php-dev-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andi Gutmans: "Re: [PHP-DEV] Yet another crash - argc/argv"
- Previous message: xendra <email protected>: "[PHP-DEV] Bug #3349: mysql_num_fields() function has changed - now use mysql_field_count"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] argv/argc"
- Next in thread: rasmus <email protected>: "Re: [PHP-DEV] argv/argc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

