|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesOpcache-password.patch (last revision 2014-01-10 23:38 UTC by Terry at ellisons dot org dot uk)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-01-11 06:29 UTC] krakjoe@php.net
[2014-01-11 12:50 UTC] Terry at ellisons dot org dot uk
[2014-01-13 10:20 UTC] dmitry@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: dmitry
[2015-04-06 20:47 UTC] dmitry@php.net
-Status: Assigned
+Status: Wont fix
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 00:00:02 2025 UTC |
Description: ------------ As per README addition: opcache.api_password (default "") calling OPcache API functions only from PHP scripts which first the API by calling opcache_enable_api("password"). This parameter is set to the MD5 of the required password. Note that if the opcache.restrict_api is also set then both tests are applied. The patch is attached Test script: --------------- This PHPT validates the functionality: --TEST-- Validate use of the directive --INI-- opcache.enable=1 opcache.enable_cli=1 opcache.api_password="e946adb45d4299def2071880d30136d4" --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php var_dump(opcache_get_status()); var_dump(opcache_enable_api("fred")); var_dump(opcache_get_status()); var_dump(opcache_enable_api("Mary had a little lamb")); $status = opcache_get_status(); echo "Get status ", (is_array($status) && isset($status['scripts'][__FILE__])) ? "works":"fails", "\n"; ?> --EXPECTF-- Warning: Zend OPcache API is restricted by "api_password" configuration directive in %s on line 2 bool(false) Warning: Zend OPcache Invalid API enable password in %s line 3 bool(false) Warning: Zend OPcache API is restricted by "api_password" configuration directive in %s on line 4 bool(false) bool(true) Get status works