Bug #76573 [Opn->Fbk]: Log file is created with wrong permissions if deprecated configuration found

From: Date: Wed, 04 Jul 2018 14:15:33 +0000
Subject: Bug #76573 [Opn->Fbk]: Log file is created with wrong permissions if deprecated configuration found
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216136@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76573&edit=1 ID: 76573 Updated by: ab@php.net Reported by: mbiebl at messageconcept dot com Summary: Log file is created with wrong permissions if deprecated configuration found -Status: Open +Status: Feedback Type: Bug Package: IIS related Operating System: Windows Server 2016 PHP Version: 7.2.7 Block user comment: N Private report: N New Comment: Thanks for the report. Does your INI have fastcgi.impersonate=1? The deprecation warnings are thrown at startup, so any relevant operation at that stage happens under a user configured in IIS. Thanks. Previous Comments: ------------------------------------------------------------------------ [2018-07-03 15:49:37] mbiebl at messageconcept dot com Description: ------------ We run PHP 7.2.7 under IIS/Windows Server 2016. php.ini is setup to log to error_log = "C:\Windows\temp\PHP72_errors.log" We also use PHP Manager for IIS. If you use PHP Manager to switch into Development mode, it will add the following to php.ini: track_errors = On With 7.2.7 this will trigger a deprecation warning. A side effect of this is, that if the log file C:\Windows\temp\PHP72_errors.log does not exist, it will be created containing this line [03-Jul-2018 17:37:22 Europe/Berlin] PHP Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0 but more importantly the file permissions will be wrong. The IUSR (which is used by IIS) will have no read/write/access permissions at all. So subsequent calls to error_log() will fail. If I remove "track_errors = On" from php.ini and trigger the file creation via error_log() the file permissions are correct. It seems when the php.ini is parsed and the deprecation notice logged, a different code path is used to create the log file which does not setup proper file permissions. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76573&edit=1

« previous php.bugs (#216136) next »