** Reply to note from Jon Parise <jon@php.net> Thu, 3 Jan 2002 16:39:20 -0500
>
> I agree that it's sometimes necessary to have different configuration
> files, but I don't consider it a necessity.
I do.
> It should still be possible to build a separate CGI executable with a
> different php.ini path for those sites that require it.
>
Don't get too stuck on the idea that PHP at the command line is only
for CGI. In fact I don't do CGI any more. I am phasing out ALL perl
CGI scripts because after seeing PHP as a module I can't stand the
extra time it takes to execute the external program. PHP CGI has the
same problem. I just say NO to all CGI.
I've also quit using PERL for system programming, and moved most of the
existing perl scripts I have written over to PHP. I haven't written a
new PERL script since php 4 came out, and may never do it again. There
isn't much I've done in PERL that I can't do in PHP, and it is quite
annoying to try to remember all the syntax differences. There is
substantial truth to the statement that PERL is a "write only"
language. I can still understand my PHP code six months later, unlike
a lot of PERL code.
> Your suggestion of a separate php-cli.ini has merit, but who will the
> php binary know when it's being used for CLI purposes and not as a
> CGI?
None of the apache related environment variables will be set? You
could pick one and switch based on its existance.
I still think that there are three distinct ways to use PHP:
Apache Module
CGI executable
Command line
and the differences justify separate ./configure options. Maybe Module
and CGI are close enough to share a configuration, I don't do CGI so I
can't say. Certainly there are drastic differences between module and
command line.
Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com