Httpd php-phm lost SetEnv PHP_ADMIN_VALUE

Hi Rocky Linux team

I have problem on Rocky Linux 9 server with apache and php-fpm. I have set "SetEnv PHP_ADMIN_VALUE : apache lost this when php-fpm reboot. It’s same at startup.

An example of my httpd conf (No VirtualHost) :

Alias /env_etu "/usr/local/www/appli/environ_etudiant/root"
<Directory "/usr/local/www/appli/environ_etudiant/root">
        SSLRequireSSL
        AllowOverride None
        Require all granted
        SetEnv PHP_ADMIN_VALUE="open_basedir=/users/:/users/home:/usr/local/www/appli/environ_etudiant;error_reporting=0"
</Directory>

In folder, I have a php file :

<?php
$openbd = ini_get('open_basedir');
echo "OPEN_BASEDIR = $openbd";

and sometime, the result is OPEN_BASEDIR=. in this case, I’m restart httpd and it’s work. sometime it’s doesn’t work. restart http again.

I want PHP_ADMIN_VALUE to always be active

Thank-you

Why not setting this option in pool conjfiguration file (wwww.conf for the default one) ?

Also check the clear_env settings (also in www.conf)

Hi remi

php_admin_value is not in pool, because I’m another Directiries in httpd conf with different open_basedir value

Thank you

it’s working with a SetEnv PHP_ADMIN_VALUE alone in Directory, like this :

<Directory "/usr/local/www/appli">
	SetEnv PHP_ADMIN_VALUE "open_basedir=/tmp:/users/:/users/home:/usr/local/www/appli;error_reporting=6143"
</Directory>

Alias /env_etu "/usr/local/www/appli/environ_etudiant/root"
<Directory "/usr/local/www/appli/environ_etudiant/root">
        SSLRequireSSL
        AllowOverride None

        Require all granted
</Directory>

Probably a bug in apache ?