Change from mod_ruid2 to multi-php? Is this correct?

Richard G

Verified User
Joined
Jul 6, 2008
Messages
14,156
Location
Maastricht
At this moment we are using mod_php with mod_ruid2 and php 7.2 on the servers.
The idea is to start changing this to php-fpm with multiple php versions. And the question is if this is the correct way to do it, or if I am forgetting something or made an error somewhere.

I thought like this:
]code]cd /usr/local/directadmin/custombuild
./build set mod_ruid2 no
./build set php_ini yes
./build set php1_mode php-fpm
./build set php2_release 7.3
./build set php2_mode php-fpm
./build update
./build php n
./build rewrite_confs[/code]

I put the php_ini to yes, to be sure that php 7.3 also gets a php.ini, I presume this is necessary?

Is al the above correct, or do I need to do more or did I miss something or made an error?
 
Thank you, I'm just wondering if this is set to no, if maybe no php.ini is created for the newer php version.
I might still enable this, just to be sure. Most important is of the rest is correct to do this change.
 
I don't think ./build php_ini is relevant for what you're trying to do.

Code:
php_ini - update PHP configuration file using "./build php-ini" or "./build all". Possible values: yes/no (default: no).

We've added a second PHP version multiple times and never used this command. The rest of your commands look fine.
 
Thank you.
I have converted yesterday, without using the php_ini command and all worked fine and php 7.3 still had it's own php.ini.
So it's indeed not necessary to activate it.
 
Thank you.
I have converted yesterday, without using the php_ini command and all worked fine and php 7.3 still had it's own php.ini.
So it's indeed not necessary to activate it.
compare server load before and after switching to php-fpm, inmy case load increased till I comment out mod_ruid2 in apache config. In my case mod_ruid2 was still enabled after rebuild.
 
Right after converting I checked the httpd-phpmodules.conf for the presence of mod_ruid2.so which is normally loaded in there.
It wasn't present anymore so not loaded anymore.

But for others who read this, it's a good tip to doublecheck mod_ruid2 is indeed not loaded anymore.
 
Back
Top