# error_log issue in php.ini

- Thread: https://externals.io/message/1111
- Original archive: https://news-web.php.net/php.internals/1111
- Started by Walt Boring on 2003-04-29T20:56:56+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1111 — Walt Boring — 2003-04-29T20:56:56+00:00

URL: https://externals.io/message/1111#1111

Howdy,
  I have found something that I find a bug in php.  If I have log_errors
= on in the php.ini and don't set the error_log entry, I can never set
it in a php script.
 I have the error_log commented out in the php.ini, because I have it
set in my httpd.conf file for all of my virtual hosts.  But when I run
php from the command line, I want to set the error_log to a file, and
 `ini_set()` always returns false, simply because error_log is commented
out in the php.ini.  I should be able to set this at runtime.

Walt

---

## #1112 — Michael Mauch — 2003-04-29T21:31:25+00:00

URL: https://externals.io/message/1111#1112 · In reply to: #1111

Walt Boring <waboring@3gstech.com> wrote:

>  I have found something that I find a bug in php.  If I have log_errors
> = on in the php.ini and don't set the error_log entry, I can never set
> it in a php script.
> I have the error_log commented out in the php.ini, because I have it
> set in my httpd.conf file for all of my virtual hosts.  But when I run
> php from the command line, I want to set the error_log to a file, and
> `ini_set()` always returns false, simply because error_log is commented
> out in the php.ini.  I should be able to set this at runtime.

You can use a separate php-cli.ini for your command line php.

Regards...
		Michael

---

## #1152 — Marshall A. Greenblatt — 2003-05-02T07:07:54+00:00

URL: https://externals.io/message/1111#1152 · In reply to: #1112

[Please CC me if you are responding from the phpdoc list, as I am not
currently subscribed]

Hi guys,

----- Original Message ----- 
From: "Michael Mauch" <michael.mauch@gmx.de>
To: <internals@lists.php.net>
Sent: Tuesday, April 29, 2003 5:31 PM
Subject: [PHP-DEV] Re: error_log issue in php.ini


<snip>
>
> You can use a separate php-cli.ini for your command line php.
>

What are the semantics for the automatic loading of `php-cli.ini' and
`php-cgi.ini' files?  For instance, will only `php-cli.ini' be loaded by a
command-line instance of PHP, similar to using the `-c' command-line switch,
or will `php.ini' be loaded and then modified by the `php-cli.ini' settings?
The scanty details that I've been able to locate, and the application of a
liberal dose of common sense, seem to indicate the former.

Also, any chance that we could see a mention of the additional PHP ini files
on the "configuration" manual page?  I've cc'd the phpdoc list for that
purpose, maybe unnecessarily, as it was mentioned briefly in bug report
#21783 filed back in January :-). Other than a short user comment on the
"features.commandline" page, however, it doesn't seem to be mentioned
anywhere "official" (i.e., generally accessible to the average PHP user).

> Regards...
> Michael
>

Thanks,
  Marshall
