Project

General

Profile

Actions

Regression #14488

closed

Extensions directory is not set in ``rc.php_ini_setup``

Added by Marcello Silva Coutinho over 1 year ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
PHP Interpreter
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
24.03
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:

Description

rc.php_ini_setup not checking php version 8.2

--- /root/rc.php_ini_setup 2023-06-19 04:10:57.592644000 0000
++ /etc/rc.php_ini_setup 2023-06-19 04:10:32.037813000 +0000
@ -24,7 +24,9 @
VERSION=$(/bin/cat /etc/version)
MIN_REALMEM_FOR_OPCACHE=512

-if /usr/local/sbin/pkg-static info -e php81; then
if /usr/local/sbin/pkg-static info -e php82; then
EXTENSIONSDIR="/usr/local/lib/php/20220829/"
+elif /usr/local/sbin/pkg-static info -e php81; then
EXTENSIONSDIR="/usr/local/lib/php/20210902/"
elif /usr/local/sbin/pkg-static info -e php74; then
EXTENSIONSDIR="/usr/local/lib/php/20190902/"

Actions #2

Updated by Jim Pingle over 1 year ago

I'm not sure we even need to set this anymore. It is using the correct directory already by default.

: php-config --extension-dir
/usr/local/lib/php/20220829
Actions #3

Updated by Marcos M about 1 year ago

  • Tracker changed from Bug to Regression
  • Subject changed from rc.php_ini_setup not checking php version 8.2 to rc.php_ini_setup extensions directory is not set
  • Status changed from New to Pull Request Review
  • Assignee set to Marcos M
  • Target version set to 2.8.0
  • Plus Target Version set to 24.03

Looks like extension_dir defaults to the correct path when the value is empty. However, EXTENSIONSDIR is used when loading modules which are not "compiled into php statically"; I'm not sure if there's a case where that would happen normally, but the fix is simple enough to include.

Actions #4

Updated by Marcos M about 1 year ago

  • Status changed from Pull Request Review to Feedback

Applied in changeset 132fef021c94f6823af72ff348e061ad5d3bb64c.

Actions #5

Updated by Jim Pingle 11 months ago

  • Subject changed from rc.php_ini_setup extensions directory is not set to Extensions directory is not set in ``rc.php_ini_setup``
Actions #6

Updated by Jim Pingle 10 months ago

  • Status changed from Feedback to New

The change here hardcoded checks for php81 and php82, but we are now on php83. Does this need another adjustment?

I'm not seeing EXTENSIONSDIR in php.ini on a current snapshot.

Actions #7

Updated by Jim Pingle 10 months ago

  • Assignee changed from Marcos M to Jim Pingle

Yes, it does need a change for PHP 8.3. Commit pushed and should show up momentarily.

Actions #8

Updated by Jim Pingle 10 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #9

Updated by Jim Pingle 10 months ago

  • Status changed from Feedback to Resolved

It's present and working on the current snapshot.

Actions

Also available in: Atom PDF