Req #74818 [Com]: opcache.file_cache should not require drive letter paths

From: Date: Mon, 26 Jun 2017 22:23:12 +0000
Subject: Req #74818 [Com]: opcache.file_cache should not require drive letter paths
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209694@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74818&edit=1

 ID:                 74818
 Comment by:         jerry at jmweb dot net
 Reported by:        jerry at jmweb dot net
 Summary:            opcache.file_cache should not require drive letter
                     paths
 Status:             Open
 Type:               Feature/Change Request
 Package:            opcache
 Operating System:   Windows 7 64bit
 PHP Version:        7.1.6
 Block user comment: N
 Private report:     N

 New Comment:

Thanks for your response!

In my Linux builds, I do use '--with-config-file-scan-dir=' and, in Windows, I 'set
PHP_INI_SCAN_DIR'. The point I was attempting to make is that opcache.file_cache should behave
the same as the other ini path options when drive letterless paths are supplied.

I have no knowledge of PHP's internal workings so 'defaulting to the drive PHP is
running' was merely an assumption aimed at illustrating how those options behave when such
values are given. The benefit of my request would mean one less option in environment specific ini
files as they all could share the value in my global (included by all) php.ini file.


Previous Comments:
------------------------------------------------------------------------
[2017-06-26 17:44:25] spam2 at rhsoft dot net

"default to the drive which the PHP binary is running" is a adventurous conclusion just
because *normally* relative paths are not defaulting to drives *but* to the current working
directory and that is a dangerous thing for systemdwide paths

"managing identical PHP installs across Windows and Linux" should be done with don#t put
anything system specific at all in php.ini - that's what
"--with-config-file-scan-dir=" is all about and that options belong in a include file
there

what you are asking is a dirty workaround for bad systems management - see the paragraph above

------------------------------------------------------------------------
[2017-06-26 17:02:26] jerry at jmweb dot net

Description:
------------
opcache.file_cache should not require drive lettered paths.

There are several ini path options that do not require drive letter prefixes in their values. The
few that I am aware of include:

error_log
extension_dir
sys_temp_dir
upload_tmp_dir
session.save_path

The impementation of each of the settings above are 'smart' enough to default to the drive
which the PHP binary is running. This flexibility is appreciated when managing identical PHP
installs across Windows and Linux as it minimizes the number of exclusive ini options (in separate
files) required to maintain both.

Test script:
---------------
opcache.file_cache=/WAMP/php/ini

Expected result:
----------------
Opcache should not fail and default to C:/WAMP/php/ini in Windows or /WAMP/php/ini in Linux. The
drive letter (in Windows) should default to the drive the PHP binary is currently running in.

Actual result:
--------------
Fatal Error opcache.file_cache_only is set without a proper setting of opcache.file_cache


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=74818&edit=1


Thread (4 messages)

« previous php.bugs (#209694) next »