Re: [PHP-DEV] [PATCH] CLI and CGI defaults

2002-12-25 Thread Philip Olson
 Andrei already decided, that --enable-cli should not change it's
 behavior for 4.3, allthough I think it's intuitive for --enable-cli to
 disable CGI if --enable-cgi was not given, I don't have a problem with
 it, as long as the NEWS entry is correct and Philip documents it
 correctly :)

I also feel an explicit --enable-cli should do that but 
regardless the current method has been documented.  The 
distinction can be seen in this unxmled excerpt:

 If a module SAPI is chosen during configure, such as apxs, 
 or the --disable-cgi option is used, the CLI is copied to
 {PREFIX}/bin/php during make install otherwise the CGI 
 is placed there. 

Because CLI is a SAPI so I guess only module (web servers) 
count.  Anyway please have a look at:

http://cvs.php.net/diff.php/phpdoc/en/features/commandline.xml?r1=1.12r2=1.13

And make sure this is written correctly.  If so, information
from it will also live in install.commandline.  Btw, it sure
is weird writing examples when cgi and cli have the same 
name and get installed at the location.  I didn't change 
those much.  I also didn't add the history of what these 
files were called in 4.2.x as I'm not fully sure how it all 
worked back then *hint* *hint*.

Regards,
Philip Olson


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




Re: [PHP-DEV] [PATCH] CLI and CGI defaults

2002-12-24 Thread Andrei Zmievski
On Mon, 23 Dec 2002, Melvyn Sopacua wrote:
 Hi,
 
 the current behavior of cli/cgi defaults, is not really intuitive, allthough 
correctly mentioned in the NEWS entry.
 
 Attached is a very simple patch, that will resolve that issue.
 
 Specifically:
 if you specify --enable-cli and don't specify --enable-cgi, then CLI will be 
installed and built. The current behavior, is that CGI will be installed and built, 
which will (and already has) lead to confusion.

Isn't the current behavior to always build CLI unless --disable-cli is
specified but not install it unless install-cli target is used?

-Andrei   http://www.gravitonic.com/
* Programming is an art form that fights back. *

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




Re: [PHP-DEV] [PATCH] CLI and CGI defaults

2002-12-24 Thread Melvyn Sopacua
On Tue, 24 Dec 2002, Andrei Zmievski wrote:

AZ On Mon, 23 Dec 2002, Melvyn Sopacua wrote:
AZ  Hi,
AZ  
AZ  the current behavior of cli/cgi defaults, is not really intuitive, allthough 
correctly mentioned in the NEWS entry.
AZ  
AZ  Attached is a very simple patch, that will resolve that issue.
AZ  
AZ  Specifically:
AZ  if you specify --enable-cli and don't specify --enable-cgi, then CLI will be 
installed and built. The current behavior, is that CGI will be installed and built, 
which will (and already has) lead to confusion.
AZ 
AZ Isn't the current behavior to always build CLI unless --disable-cli is
AZ specified but not install it unless install-cli target is used?

Yes, unless --disable-cgi is given, then make install will install CLI.

Quoting from NEWS:
If you don't specify building any other SAPI make install will install the
  CGI SAPI binary in {PREFIX}/bin/php.

so, reading that *only* you'd think --enable-cli will install CLI. It's corrected in 
the next line:

If you want to install CLI SAPI in that
  location use make install-cli after make install or add --disable-cgi
  to your configure options.

But --enable-cli is now a useless switch, because:
* if you don't specify it, cli is built
* if you specify it, cli is built
* if you don't specify it, cli is not installed
* if you specify it, cli is not installed

Only --disable-cgi (--enable-cli still makes no difference) will install cli on make 
install.

See:
http://bugs.php.net/bug.php?id=21145

for an example of the confusion.

-- 
With kind regards,

Melvyn Sopacua
?php include(not_reflecting_employers_views.txt); ?


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




Re: [PHP-DEV] [PATCH] CLI and CGI defaults

2002-12-24 Thread Shane Caraveo



But --enable-cli is now a useless switch, because:
* if you don't specify it, cli is built
* if you specify it, cli is built
* if you don't specify it, cli is not installed
* if you specify it, cli is not installed

Only --disable-cgi (--enable-cli still makes no difference) will install cli on make install.


That is the correct behaviour.  --enable-cli is a default, thus you do 
not have to define it to build cli.  'make install-cli' is used to 
install cli rather than cgi.  I don't see the confusion in that.

Shane


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



Re: [PHP-DEV] [PATCH] CLI and CGI defaults

2002-12-24 Thread Melvyn Sopacua
On Tue, 24 Dec 2002, Shane Caraveo wrote:

SC  But --enable-cli is now a useless switch, because:
SC  * if you don't specify it, cli is built
SC  * if you specify it, cli is built
SC  * if you don't specify it, cli is not installed
SC  * if you specify it, cli is not installed
SC  
SC  Only --disable-cgi (--enable-cli still makes no difference) will install cli 
on make install.
SC 
SC That is the correct behaviour.  --enable-cli is a default, thus you do 
SC not have to define it to build cli.  'make install-cli' is used to 
SC install cli rather than cgi.  I don't see the confusion in that.

Andrei already decided, that --enable-cli should not change it's behavior for 4.3, 
allthough I think it's intuitive for --enable-cli to disable CGI if --enable-cgi was 
not given, I don't have a problem with it, as long as the NEWS entry is correct and 
Philip documents it correctly :)

-- 
With kind regards,

Melvyn Sopacua
?php include(not_reflecting_employers_views.txt); ?


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




[PHP-DEV] [PATCH] CLI and CGI defaults

2002-12-23 Thread Melvyn Sopacua
Hi,

the current behavior of cli/cgi defaults, is not really intuitive, allthough correctly 
mentioned in the NEWS entry.

Attached is a very simple patch, that will resolve that issue.

Specifically:
if you specify --enable-cli and don't specify --enable-cgi, then CLI will be installed 
and built. The current behavior, is that CGI will be installed and built, which will 
(and already has) lead to confusion.

-- 
With kind regards,

Melvyn Sopacua
?php include(not_reflecting_employers_views.txt); ?

Index: sapi/cli/config.m4
===
RCS file: /repository/php4/sapi/cli/config.m4,v
retrieving revision 1.11.2.2
diff -u -r1.11.2.2 config.m4
--- sapi/cli/config.m4  20 Dec 2002 10:04:55 -  1.11.2.2
+++ sapi/cli/config.m4  23 Dec 2002 21:07:21 -
@@ -10,7 +10,7 @@
 [
   PHP_SAPI_CLI=$enableval
 ],[
-  PHP_SAPI_CLI=yes
+  PHP_SAPI_CLI=default
 ])
 
 if test $PHP_SAPI_CLI != no; then
Index: sapi/cgi/config9.m4
===
RCS file: /repository/php4/sapi/cgi/config9.m4,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 config9.m4
--- sapi/cgi/config9.m4 19 Dec 2002 16:55:57 -  1.1.2.3
+++ sapi/cgi/config9.m4 23 Dec 2002 21:07:21 -
@@ -7,7 +7,11 @@
 [
   PHP_SAPI_CGI=$enableval
 ],[
-  PHP_SAPI_CGI=yes
+  if test x$PHP_SAPI_CLI = xdefault; then
+PHP_SAPI_CGI=yes
+  else
+PHP_SAPI_CGI=no
+  fi
 ])
 
 AC_ARG_ENABLE(force-cgi-redirect,

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