Re: [PHP-DEV] CLI and -f

2002-04-01 Thread Andrei Zmievski

I agree.

On Fri, 29 Mar 2002, Markus Fischer wrote:
 On Fri, Mar 29, 2002 at 01:00:47AM +0100, Marcus Börger wrote : 
  The difference to many other programs is that we
  came from CGI.
 
 This is a (rather) bad excuse. It doesn't matter where we
 came from. What we all want is a full-fledged CLI version
 which kickz perl azz. So we adjust it to what makes common
 sense in the shell environment and do not excuse ourselves
 that we once came from an CGI environemtn because this
 another world now.
 
 - Markus
 
 -- 
 Please always Cc to me when replying to me on the lists.
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc



-Andrei

Then again, E=mc^2 may only be a local phenomenon.
  -- Einstein

--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] CLI and -f

2002-03-29 Thread Markus Fischer

On Fri, Mar 29, 2002 at 02:10:45AM +0100, Marcus Börger wrote : 
 At 01:57 29.03.2002, Markus Fischer wrote:
 On Fri, Mar 29, 2002 at 01:39:52AM +0100, Marcus Börger wrote :
  At 01:33 29.03.2002, you wrote:
  On Fri, Mar 29, 2002 at 01:00:47AM +0100, Marcus Börger wrote :
   The difference to many other programs is that we
   came from CGI.
  
  This is a (rather) bad excuse. It doesn't matter where we
  came from. What we all want is a full-fledged CLI version
  which kickz perl azz. So we adjust it to what makes common
  sense in the shell environment and do not excuse ourselves
  that we once came from an CGI environemtn because this
  another world now.
  
  - Markus
 
  The question is do we want full stdio support for CLI or -- as awk and so
  forth.
  Maybe we should go for a RFC but i'm happy as it is for now. And hey it 
 only
  affects files that start with a minus character.
 
 An RFC might be a good idea. There is still a minor issue
 open the way the CLI dependent ini entries are registered in
 php_cli.c (they're registered after php.ini has been read,
 effectively overriding the user's configuration, but some
 values (e.g. max_execution_time) can still be set during
 runtime).
 
 - Markus
 
 I agree on that but we should think about the various possibilities
 mentioned already in the last days.
 
 - read /home/*/php.inior .php.ini or what ever
 - have a special section in default php.ini
 
 I would like having both: first look for .php.ini in homedir and then
 take global one.

Do not forget to honour the PHPRC environment variable too:

1) Read php.ini from either FILE or DIRECTORY specified by
the PHPRC environment variable. If it's a directory, assume
to find php.ini in that directory, else read the file. If
this file can't be found or read, do not attempt to read any
another php.ini file (this is to keep low the WTF factor so
we don't suddenly have our app running under a configuration
which it is not intended to have)

2) If no PHPRC is set, try to read ~/.php.ini

3) If ~/.php.ini fails, try to read /etc/(php4)/php.ini

We should not forget to implement a proper and satisfying
solution too for win32. I think php_init_config() already has
hooks for it though.

 Moving the default inis in front of ini reading should be no problem.

Currently it is a problem. Every default INI setting like
max_execution_time is set for all SAPIs in php4/main/main.c.
Some kind of facility has to be first introduced which also
sets them by SAPI.

- Markus
-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
Mind if I MFH ? What QA did you do on it? the usual? ah... none :)

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] CLI and -f

2002-03-28 Thread Andrei Zmievski

Why does CLI force you to use -f to specify file? What is wrong with
simply using:

php file.php

?

-Andrei

Beware of bugs in the above code; I have only proved it correct,
 not tried it. -- Donald Knuth

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] CLI and -f

2002-03-28 Thread Marcus Börger

We cannot allow ./php -- -i for calling a script named -i because
then we cannot use ./php -- args while parsing from stdin. We can
implement -- only for one thing and that is currently real end of
parameters. The difference to many other programs is that we
came from CGI.

marcus

[marcus@zaphod src]$ php4/sapi/cli/php -h
Usage: php [options] [-f] file [args...]
php [options] -r code [args...]
php [options] [-- args...]

At 22:54 28.03.2002, you wrote:
On Thu, 28 Mar 2002, Marcus Börger wrote:
  Nothing is wrong with that. I think your request goes to the dicussion of
  the last days. There -f had to be used because the execution file should
  be able to be named -i.
 
  ./php -f -i - ./-i will be executed
 
  ./php -i - this is different :-)

Why not:

./php -- -i

This is the standard, as far as I know, for many programs.

-Andrei
* It said 'Winmodem' on the box, but I still feel like I lost. *


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] CLI and -f

2002-03-28 Thread Markus Fischer

On Fri, Mar 29, 2002 at 01:00:47AM +0100, Marcus Börger wrote : 
 The difference to many other programs is that we
 came from CGI.

This is a (rather) bad excuse. It doesn't matter where we
came from. What we all want is a full-fledged CLI version
which kickz perl azz. So we adjust it to what makes common
sense in the shell environment and do not excuse ourselves
that we once came from an CGI environemtn because this
another world now.

- Markus

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] CLI and -f

2002-03-28 Thread Markus Fischer

On Fri, Mar 29, 2002 at 01:39:52AM +0100, Marcus Börger wrote : 
 At 01:33 29.03.2002, you wrote:
 On Fri, Mar 29, 2002 at 01:00:47AM +0100, Marcus Börger wrote :
  The difference to many other programs is that we
  came from CGI.
 
 This is a (rather) bad excuse. It doesn't matter where we
 came from. What we all want is a full-fledged CLI version
 which kickz perl azz. So we adjust it to what makes common
 sense in the shell environment and do not excuse ourselves
 that we once came from an CGI environemtn because this
 another world now.
 
 - Markus
 
 The question is do we want full stdio support for CLI or -- as awk and so 
 forth.
 Maybe we should go for a RFC but i'm happy as it is for now. And hey it only
 affects files that start with a minus character.

An RFC might be a good idea. There is still a minor issue
open the way the CLI dependent ini entries are registered in
php_cli.c (they're registered after php.ini has been read,
effectively overriding the user's configuration, but some
values (e.g. max_execution_time) can still be set during
runtime).

- Markus

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] CLI and -f

2002-03-28 Thread Marcus Börger

At 01:57 29.03.2002, Markus Fischer wrote:
On Fri, Mar 29, 2002 at 01:39:52AM +0100, Marcus Börger wrote :
  At 01:33 29.03.2002, you wrote:
  On Fri, Mar 29, 2002 at 01:00:47AM +0100, Marcus Börger wrote :
   The difference to many other programs is that we
   came from CGI.
  
  This is a (rather) bad excuse. It doesn't matter where we
  came from. What we all want is a full-fledged CLI version
  which kickz perl azz. So we adjust it to what makes common
  sense in the shell environment and do not excuse ourselves
  that we once came from an CGI environemtn because this
  another world now.
  
  - Markus
 
  The question is do we want full stdio support for CLI or -- as awk and so
  forth.
  Maybe we should go for a RFC but i'm happy as it is for now. And hey it 
 only
  affects files that start with a minus character.

 An RFC might be a good idea. There is still a minor issue
 open the way the CLI dependent ini entries are registered in
 php_cli.c (they're registered after php.ini has been read,
 effectively overriding the user's configuration, but some
 values (e.g. max_execution_time) can still be set during
 runtime).

 - Markus

I agree on that but we should think about the various possibilities
mentioned already in the last days.

- read /home/*/php.inior .php.ini or what ever
- have a special section in default php.ini

I would like having both: first look for .php.ini in homedir and then
take global one.
Moving the default inis in front of ini reading should be no problem.

marcus


--
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php