switch to CB2 from CB1, problems with webmail and php-fpm55

ilan

Verified User
Joined
Feb 5, 2004
Messages
48
Location
Mexico City
Hi,

There are a lot of threads about this but I'm still stock.

I'm using mod_php with php 5.3 as the main version and php-fpm with php 5.5 as my secondary version (at the end of the post is my options.conf) and I only have problems with webmail (squirrelmail and roundcube) with php-fpm.

1- First I had to turn off open_basedir for the domains using php-fpm because /var/www/html/ is not included in the path, and I prefer not to create (and maintain) a custom VirtualHost template.

Maybe DirectAdmin could add /var/www/html/ to the default php path?

2- Then once able to open the roundcube page I receive the following error:
CONFIGURATION ERROR

config.inc.php was not found.
Please read the INSTALL instructions!

The one thread that helped me the most with roundcube is: http://forum.directadmin.com/showthread.php?t=49438&page=6

I changing permissions to 644 on /var/www/html/roundcube/config.inc.php and that does "fix" the problem but as mentioned by smtalk that's not safe, and that's why smtalk created a patch for apache v. 2.4.10 but since I'm using v 2.4.16 I don't know if I should apply it (I'm on a production server).

Any suggestions?

3- Finally squirrelmail gives the following error message when trying to login:
Error opening ../data/default_pref
Default preference file not found or not readable!
Please contact your system administrator and report this error.

I played with the permissions of /var/www/html/squirrelmail/data/default_pref but no luck. The error message is always the same.

Any suggestions?

Here is a copy of my options.conf file:
Code:
#PHP Settings
php1_release=5.3
php1_mode=mod_php
php2_release=5.5
php2_mode=php-fpm
opcache=yes
htscanner=no
php_ini=yes
php_timezone=America/Mexico_City
php_ini_type=production
ioncube=no
zend=no
suhosin=no
x_mail_header=yes

#MySQL Settings
mysql=5.5
mysql_inst=mysql
mysql_backup=yes
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

#WEB Server Settings
webserver=apache
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=comodo
apache_ver=2.4
apache_mpm=auto
mod_ruid2=no
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=obfuscateddomain.com
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=4
squirrelmail=yes
roundcube=yes
webapps_inbox_prefix=yes

#ClamAV-related Settings
clamav=no
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

#Mail Settings
exim=yes
eximconf=yes
eximconf_release=4.3
blockcracking=yes
easy_spam_fighter=yes
spamassassin=yes
dovecot=yes
dovecot_conf=yes
pigeonhole=yes

#FTP Settings
ftpd=pureftpd

#Statistics Settings
awstats=no
webalizer=yes

#CustomBuild Settings
custombuild=2.0
autover=no
bold=yes
clean=yes
cleanapache=yes
clean_old_tarballs=yes
clean_old_webapps=yes
downloadserver=files.directadmin.com

#Cronjob Settings
cron=yes
cron_frequency=weekly
[email protected]
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#CloudLinux Settings
cloudlinux=no
cagefs=no

#Advanced Settings
autoconf=yes
automake=yes
libtool=yes
curl=yes
new_pcre=no

mariadb=10.0

Thanks in advance
Ilan
 
Hello,

For mod_php you need to use mod_ruid2, which is disabled on your server I assume because of the second PHP version which is in mode PHP-FPM. So you should either get rid of PHP-FPM and use mod_php+mod_ruid2 or use both versions in php-fpm/php-fastcgi/suphp.
 
Thanks for the reply,

At the CB2 FAQ there is a bullet that says:
  • Do not set both php1_mode and php2_mode to mod_php, if php2_release is set.
That's why I chose php-fpm for my second php.

I would rather use mod_php for both versions of php on my server but I don't think it's possible, do you (or anyone) know a working configuration of two php versions that would allow me to have at least one php version on mod_php and that both versions would have working webmail?

Ilan
 
Back
Top