php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75718 Hard to explicitly know wheither APCu is enabled when it is running.
Submitted: 2017-12-21 16:23 UTC Modified: 2017-12-21 19:04 UTC
From: anrdaemon at freemail dot ru Assigned: pollita (profile)
Status: Closed Package: APC (PECL)
PHP Version: 7.1.12 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: anrdaemon at freemail dot ru
New email:
PHP Version: OS:

 

 [2017-12-21 16:23 UTC] anrdaemon at freemail dot ru
Description:
------------
When APCu is disabled, phpinfo() explicitly says at the top of APCu block, that

APCu Support => Disabled

But when APCu is enabled, it misses this line entirely and you may only extract this information from various configuration settings.

Comparing to, say, opcache, which has the same auto-disabling functionality, the first line always explicitly states the status of the extension:

Opcode Caching => Disabled

or

Opcode Caching => Up and Running

Expected result:
----------------
I expect the status reported at all times.

Actual result:
--------------
Extension status is missing when extension is enabled.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-21 16:37 UTC] anrdaemon at freemail dot ru
After looking it over and over again, I've found that the data is there but formatted as a table header, which made it completely unreadable.
 [2017-12-21 17:49 UTC] pollita@php.net
Just to clarify; This is only about the HTML formatted phpinfo() output, yes?

In text mode the header should still be easily readable, and within script code, apcu_enabled() should give you a clear answer.

I've tossed a PR at krakjoe@ to change the phpinfo() output from a header to a regular row.  https://github.com/krakjoe/apcu/pull/270
 [2017-12-21 18:37 UTC] anrdaemon at freemail dot ru
Yes, sorry.
As I've said, the information is there, but unreadable in HTML output.
Since it requires some additional effort to enable APCu in CLI, I didn't notice the data unil I carefully walked over it one last time.
But once I spotted it in CGI SAPI, which also has -i switch and output its data in text/plain, I've found it in HTML output as well.
Thank you very much for the PR, I see it is merged already.
 [2017-12-21 19:04 UTC] pollita@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pollita
 [2017-12-21 19:04 UTC] pollita@php.net
Woot! Joe is quick. ?
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Apr 16 03:01:23 2021 UTC