1

I have installed PHP 7.4 (from remi) on CentOS 8 since I need that version on CLI.

The issue is with extensions, when I check modules (php -m) as root user I for example have redis enabled there, but if I check the same thing with any other user it's missing.

I noticed that root user getting PHP stuff from /etc, but all other users are getting them from /usr/local/php.

I'm using some git hooks on that server, and all stuff I'm running there (composer, drush...) are run from cli as exact user (no root user).

How I can enable extensions for other users that don't have root privileges?

UPDATE

php -v with root user:

PHP 7.4.15 (cli) (built: Feb  2 2021 14:19:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.15, Copyright (c), by Zend Technologies

php -v with any other user:

PHP 7.4.15 (cli) (built: Feb 28 2021 20:54:08) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
8
  • 2
    Clean /usr/local of a previous installation from sources. Mar 2, 2021 at 13:09
  • Are you sure that when executing php as a regular user you're actually executing the exact same php version the root user executes? Mar 2, 2021 at 13:09
  • @RemiCollet how I can do that and how it will help?
    – mixerowsky
    Mar 2, 2021 at 13:13
  • 2
    check "which php", and delete found executable in /usr/local Mar 2, 2021 at 13:18
  • 1
    Cache issue, logout / logon again Mar 2, 2021 at 13:22

0

You must log in to answer this question.

Browse other questions tagged .