voxpupuli / voxpupuli/puppet-php

opcache is a zend_extension

Open
#624 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Puppet
Stars
86
Forks
264
Avg merge
29m
Merged PRs (30d)
1

Description

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.10
  • Ruby: 2.5.5p157
  • Distribution: Debian 10.9
  • Module version: v7.1.0

How to reproduce (e.g Puppet code you use)

  class { 'php':
    ensure       => present,
  }

What are you seeing

Debian appears to install php7.3-opcache by default, with a correct 10-opcache.ini containing a "zend_extension" line.

This module appears to notice an opcache extension and adds an "extension" line to that ini file.

This causes an error on every PHP startup.

What behaviour did you expect instead

To understand that it's a zend extension (or to not touch that file at all)

Output log

# php
PHP Warning:  PHP Startup: Invalid library (appears to be a Zend Extension, try loading using zend_extension=opcache.so from php.ini) in Unknown on line 0
^C
# cat /etc/php/7.3/cli/conf.d/10-opcache.ini
; configuration for php opcache module
; priority=10
zend_extension=opcache.so
extension = opcache.so

Any additional information you'd like to impart

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

Reproduce with the shown Puppet class on Debian 10.9 and inspect how the module handles the existing /etc/php/7.3/cli/conf.d/10-opcache.ini file. The fix is complete when the configuration retains the zend_extension=opcache.so line without adding extension = opcache.so, and PHP starts without the warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.