Re: CLI and php.ini
| From: | brad lafountain | Date: | Wed, 20 Feb 2002 00:47:05 +0000 |
| Subject: | Re: CLI and php.ini | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-80190@lists.php.net to get a copy of this message | ||
The magic
#!/usr/local/bin/php -c local.ini
already works....
- brad
--- J Smith <dark_panda@hushmail.com> wrote:
>
> From what I understand, starting with PHP 4.2.x, PHP is going to
> automatically build with a CLI executable by default. This means that even
> when you install as, say, an Apache SAPI module, you're still going to get
> the CLI, correct?
>
> That being the case, a few months ago a thread popped up about seperating
> the php.ini files that web server modules and the CLI executable run on.
> Has there been any more thought on this?
>
> The differences between the CLI executable and web server modules can be
> drastic enough to warrant this sort of thing, imho. I regularly build both
> the executable and web server modules all the time on the same machine, and
> having them both point to the same php.ini can sometimes cause havoc, as
> usually they're not configured anything alike. (For instance, I usually use
> output buffering for the web server configuration, but not for the CLI.)
>
> I've also run into problems with a few extensions that don't run with
> things like the Zend optimizer. (PCNTL comes to mind -- obviously it's only
> useful in the CLI executable, but the Zend optimizer refuses to work with
> it at all, yet I still want to use it on the web server -- thus requiring
> seperate php.ini configurations.)
>
> I know that you can set PHPRC to another path before starting PHP up,
> either as CLI or from a web server, but it's quite a pain. There are also a
> few other work arounds, like the magic "#!" token at the beginning of shell
> scripts (which isn't at all portable), but I'm still thinking the best
> solution would be to split the php.ini files in two -- one for the web
> server SAPI and one for the CLI. Call them php.ini and php-cli.ini or
> something.
>
> Or am I just crazy?
>
> J
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com