Bug 261488 - www/php81-opcache Incorrect .ini file causes PHP Warning: PHP Startup: Invalid library
Summary: www/php81-opcache Incorrect .ini file causes PHP Warning: PHP Startup: Inval...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-26 07:04 UTC by mark burdett
Modified: 2022-01-26 17:12 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mark burdett 2022-01-26 07:04:00 UTC
Installed www/php81-opcache with the cli lang/php81 and got this error when running 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

Looks like the installed /usr/local/etc/php/ext-10-opcache.ini file is incorrect, it contains extension=opcache.so rather than zend_extension=opcache.so

Looking at the Makefile, www/php80-opcache has this line:

USES=   php:zend,noflavors

but this line is missing for www/php81-opcache
Comment 1 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-01-26 10:29:25 UTC
The line is not missing the line has been moved to lang/php81/Makefile only problem is why it's not behaving properly. Give me some times to check this.
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-01-26 17:11:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=786872ee08c04b245a37d9dba50a4e484d462c36

commit 786872ee08c04b245a37d9dba50a4e484d462c36
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-01-26 17:09:59 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-01-26 17:11:34 +0000

    www/php81-opcache: Fix zend extension

    - Somehow the php:zend in lang/php81 Makefile is not properly read and
      using the default php:ext. For now fix it by adding it to the slave
      ports.

    PR:             261488
    Reported by:    mfburdett@gmail.com

 lang/php81/Makefile        | 1 -
 www/php81-opcache/Makefile | 7 +++++--
 2 files changed, 5 insertions(+), 3 deletions(-)