Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [ErrorException] Undefined array key in spark phpini:check #8804

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Apr 18, 2024

Description
Fixes #8803

$ ./spark phpini:check

CodeIgniter v4.5.1 Command Line Tool - Server Time: 2024-04-19 00:01:44 UTC+00:00

+-------------------------+----------+----------+-------------+-----------------------+
| Directive               | Global   | Current  | Recommended | Remark                |
+-------------------------+----------+----------+-------------+-----------------------+
| error_reporting         | 32767    | 32767    | 5111        |                       |
| display_errors          | 1        | 1        | 0           |                       |
| display_startup_errors  | 1        | 1        | 0           |                       |
| log_errors              | 1        | 1        |             |                       |
| error_log               |          |          |             |                       |
| default_charset         | UTF-8    | UTF-8    | UTF-8       |                       |
| memory_limit            | 1G       | 1G       |             | > post_max_size       |
| post_max_size           | 8M       | 8M       |             | > upload_max_filesize |
| upload_max_filesize     | 2M       | 2M       |             | < post_max_size       |
| request_order           | GP       | GP       | GP          |                       |
| variables_order         | GPCS     | GPCS     | GPCS        |                       |
| date.timezone           | UTC      | UTC      | UTC         |                       |
| mbstring.language       | neutral  | neutral  | neutral     |                       |
| opcache.enable          | disabled | disabled | 1           |                       |
| opcache.enable_cli      | disabled | disabled |             |                       |
| opcache.jit             | disabled | disabled |             |                       |
| opcache.jit_buffer_size | disabled | disabled |             |                       |
+-------------------------+----------+----------+-------------+-----------------------+

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

If a setting does not exists, ini_get_all() does not have the key.
@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Apr 18, 2024
@datamweb
Copy link
Contributor

Screenshot 2024-04-19 152847

Colors should not be red for opcache.enable_cli, opcache.jit, opcache.jit_buffer_size ?

@kenjis
Copy link
Member Author

kenjis commented Apr 19, 2024

The PHP ini default for opcache.enable_cli is 0.
https://www.php.net/manual/en/opcache.configuration.php
Also, JIT is disabled by default, becuase opcache.jit_buffer_size is 0.
See https://php.watch/versions/8.4/opcache-jit-ini-default-changes

Since what to do with these settings depends on the situation,
I have not defined recommended values.

If enabling them improves performance, they should be enabled。
If they decrease performance, they should remain disabled.

If we set the recommended values, we need to prove that it improves performance in most use cases.

@kenjis kenjis merged commit 971b0da into codeigniter4:develop Apr 21, 2024
40 checks passed
@kenjis kenjis deleted the fix-phpini-check-Undefined-array-key branch April 21, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [ErrorException] Undefined array key "opcache.enable"
4 participants