Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18355

Re: where does the output of error_log(... ,4)?

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php
Subject Re: where does the output of error_log(... ,4)?
Date Wed, 2 Sep 2020 10:18:38 +0200
Lines 46
Message-ID <hr92qtFa6rbU1@mid.individual.net> (permalink)
References <ri642s$1f2a$1@gioia.aioe.org> <hr1jtpFne7iU1@mid.individual.net> <ril877$1dit$1@gioia.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-15
Content-Transfer-Encoding 7bit
X-Trace individual.net Px8zkAxRSXYUu+aQLT8aZAc9Xr1fmXCHmlaHXW3/zA7H1LbGMI
Cancel-Lock sha1:6/PTtbQ3t/EASB8QxURpXyRGGbA=
In-Reply-To <ril877$1dit$1@gioia.aioe.org>
Xref csiph.com comp.lang.php:18355

Show key headers only | View raw


Hostel:

> Il 30/08/20 14:21, Arno Welzel ha scritto:
>> Hostel:
>>
>>> <?php // index.php (http://localhost)
>>> error_log(
>>>       'abc123',
>>>       4 // message is sent directly to the SAPI logging handler
>>> );
>>>
>>> What does it mean message is sent directly to the SAPI logging handler?
>>> Where does the output?
>>
>> You should find the messages in the error log of your webserver.
>>
>> Also see: <https://www.php.net/manual/en/function.error-log.php>
>>
>>
> 
> mmmhhhhhhh...
> 
> var_dump(
> 	ini_set('error_log', 'err.log'),
> 	$file = ini_get('error_log'),
> 	error_log('abc', 4),
> 	file_exists($file)
> );
> 
> string(0) ""
> string(50) "err.log"
> bool(true)
> bool(false)

Setting the error_log to the name 'err.log' is not enough. This must be
a full path and it must be writable by the user which executes the PHP
script (usually www-data, but that depends on your setup). Otherwise PHP
does not know where to put this file.

Also see
<https://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log>


-- 
Arno Welzel
https://arnowelzel.de

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

where does the output of error_log(... ,4)? Hostel <f@f.f> - 2020-08-26 18:53 +0200
  Re: where does the output of error_log(... ,4)? "J.O. Aho" <user@example.net> - 2020-08-27 11:06 +0200
  Re: where does the output of error_log(... ,4)? Arno Welzel <usenet@arnowelzel.de> - 2020-08-30 14:21 +0200
    Re: where does the output of error_log(... ,4)? Hostel <f@f.f> - 2020-09-01 12:36 +0200
      Re: where does the output of error_log(... ,4)? Arno Welzel <usenet@arnowelzel.de> - 2020-09-02 10:18 +0200
        Re: where does the output of error_log(... ,4)? Hostel <f@f.f> - 2020-09-03 16:50 +0200
          Re: where does the output of error_log(... ,4)? Arno Welzel <usenet@arnowelzel.de> - 2020-09-04 12:41 +0200
            Re: where does the output of error_log(... ,4)? Hostel <f@f.f> - 2020-09-05 08:57 +0200
              Re: where does the output of error_log(... ,4)? "J.O. Aho" <user@example.net> - 2020-09-05 12:26 +0200
                Re: where does the output of error_log(... ,4)? Hostel <f@f.f> - 2020-09-05 15:46 +0200
              Re: where does the output of error_log(... ,4)? Arno Welzel <usenet@arnowelzel.de> - 2020-09-05 15:47 +0200
  Re: where does the output of error_log(... ,4)? Ace of diamonds <he12091983@gmail.com> - 2022-07-06 09:21 -0700

csiph-web