php / php/php-src

ini setting zend.assertions should changeable PHP_INI_PERDIR without restriction

Open
#11,568 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

Currently, if the ini setting zend.assertions is set to -1 in php.ini, it cannot be set to a different value in per-directory configuration file (PHP_INI_PERDIR) .user.ini or .htaccess (and vice versa).

I want to be able to change zend.assertions PHP_INI_PERDIR without restriction, for the following reasons:

  1. I have not always write access to php.ini;
  2. I don’t know the PHP_INI_PERDIR equivalent of
    <?php if (ini_get('zend.assertions) !== '-1') ini_set('zend.assertions', '1'); ?>
    in order to avoid an E_WARNING.

(Note that there is at least one other ini setting, namely short_open_tag, that also modify the result of compilation, but that is nevertheless changeable PHP_INI_PERDIR; from which I infer that my request is not unreasonable.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue concerns zend.assertions in php.ini and per-directory .user.ini or .htaccess configuration; begin by tracing how these contexts handle that setting. Done means a value set in one context can be changed to another without the current restriction or resulting E_WARNING.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.