PHP5.5, PHP5.4, apache & mod_ruid2 = impossible?

futurevision

Verified User
Hi!

I would like to have 2 PHP versions (PHP5.5 & PHP5.4 or PHP5.4 and PHP5.3) with apache 2.4 and mod_ruid2 but this doesn't seem to be possible. I've tried this config:

php1_release=5.5
php2_release=5.4
php1_mode=mod_php
php2_mode=php-fpm
apache_ver=2.4
mod_ruid2=yes

but this doesn't work because it starts complaining about the php2_mode being "php-fpm". The FAQ states that both can't be mod_php. So how should I config to have 2 PHP versions (including the selector for the user) with mod_ruid2 enabled?
 

smtalk

Verified User
Staff member
Hello,

I am happy to hear that you're testing the new features of CustomBuild 2.0. It is possible to have the configuration you would like to, however, due to the problems noticed with mod_ruid2 + php-fpm, we've set a limitation for it. In your case I would suggest setting php1/php2_mode to fastcgi and this way PHP scripts would be executed with the ownership of the running user.

Thank you.
 

futurevision

Verified User
When I try I get: "apache webserver is not compatible with php-fpm or php-fastcgi PHP mode with mod_ruid2 enabled." Does that mean I have to disable mod_ruid2 completely because I really like mod_ruid2.

Also, can I disable mod_ruid2 without screwing up my current permissions because currently mod_ruid2 is running?
 

smtalk

Verified User
Staff member
Yes, you have to disable it completely if you would like to install php-fpm or php-fastcgi. However, permissions won't be screwed up, because your PHP scripts would still run under the ownership of the user.
 

futurevision

Verified User
I've just recompiled php after updating the options.conf but this resulted in php not parsing anymore so my php sourcecode was visible for everyone :( Will revert back and hopefully this will fix it :(
 

smtalk

Verified User
Staff member
Make sure you have no custom templates in /usr/local/directadmin/data/templates/custom. If you have any, please remove them and run "./build rewrite_confs".
 

futurevision

Verified User
Thanks! I had some custom templates in that directory, I've moved the old ones and now its working.

Damn...now my webmail stopped working, its showing source code :( How to fix this? -> fixed by: ./build rewrite_confs

And next to above problem another question: how do I use pecl to build extensions for both seperate versions?
 
Last edited:
Top