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
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.
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(-)