I was maybe a little to fast setting the default php to 8.1 When I installed ispc last week. The problem is that Roundcube 1.6 support php8.1, but the Roundcube in ispc 3.2.9 from a fresh install is version 1.5 which only supports php8.0 And I think that could be the reasons for my problems with Roundcube not showing content when logged into the webinterface. So I need to know if it is possible to either change the default php version in ispc controlpanel, or if it is better to upgrade Roundcube to version 1.6. I can't remember when I chose the default php version, but is beginning to think it was during installation (auto install with git script). Does anybody know if either is possible?
roundcube should already use the system default php. you can't change the system default without breaking all sorts of things. you should be fine to just upgrade to roundcube 1.6 i'm assuming you're installing on ubuntu 22.04, in which case the system default php is 8.1 it's not chosen by the user (unless they're breaking things) one thing that may be worth making sure of, is to check the default php versions are manually configured rather than auto. you can see what versions they're currently set to with: ls -l /etc/alternatives | grep php and set/change them with update-alternatives --config php (or php-cgi, php-fpm.sock etc etc) choosing the relevant number for the php version manual mode. if left on auto, the default version might be changed automatically when adding php 8.2, php 8.3 etc. without warning you, and will break things.
I think I have mixed up in my head (a so called brain short circuit ) which version is the system php version and which is set up as default for ispc generated sites. Running ls -l /etc/alternatives | grep php: Code: root@freja:/home/neumann# ls -l /etc/alternatives | grep php lrwxrwxrwx 1 root root 15 Jan 7 08:37 php -> /usr/bin/php8.1 lrwxrwxrwx 1 root root 31 Jan 7 08:37 php.1.gz -> /usr/share/man/man1/php8.1.1.gz lrwxrwxrwx 1 root root 19 Dec 27 10:57 php-cgi -> /usr/bin/php-cgi8.1 lrwxrwxrwx 1 root root 35 Dec 27 10:57 php-cgi.1.gz -> /usr/share/man/man1/php-cgi8.1.1.gz lrwxrwxrwx 1 root root 23 Dec 27 10:57 php-cgi-bin -> /usr/lib/cgi-bin/php8.1 lrwxrwxrwx 1 root root 24 Jan 7 06:31 php-fpm.sock -> /run/php/php8.1-fpm.sock Changing to php 8.0 gives this output: Code: root@freja:/home/neumann# ls -l /etc/alternatives | grep php lrwxrwxrwx 1 root root 15 Jan 7 08:44 php -> /usr/bin/php8.0 lrwxrwxrwx 1 root root 31 Jan 7 08:44 php.1.gz -> /usr/share/man/man1/php8.0.1.gz lrwxrwxrwx 1 root root 19 Dec 27 10:57 php-cgi -> /usr/bin/php-cgi8.1 lrwxrwxrwx 1 root root 35 Dec 27 10:57 php-cgi.1.gz -> /usr/share/man/man1/php-cgi8.1.1.gz lrwxrwxrwx 1 root root 23 Dec 27 10:57 php-cgi-bin -> /usr/lib/cgi-bin/php8.1 lrwxrwxrwx 1 root root 24 Jan 7 06:31 php-fpm.sock -> /run/php/php8.1-fpm.sock When changed new choises are: Code: root@freja:/home/neumann# update-alternatives --config php There are 10 choices for the alternative php (providing /usr/bin/php). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/php.default 100 auto mode 1 /usr/bin/php.default 100 manual mode 2 /usr/bin/php5.6 56 manual mode 3 /usr/bin/php7.0 70 manual mode 4 /usr/bin/php7.1 71 manual mode 5 /usr/bin/php7.2 72 manual mode 6 /usr/bin/php7.3 73 manual mode 7 /usr/bin/php7.4 74 manual mode * 8 /usr/bin/php8.0 80 manual mode 9 /usr/bin/php8.1 81 manual mode 10 /usr/bin/php8.2 82 manual mode Press <enter> to keep the current choice[*], or type selection number: So some is changed and some are not. Does that affect roundcube? It does not change the behaviour. I can still log in to the email accounts I have on the server via roundcube, but they are empty in the inboxes, which they are not in reality. When changing php version, it should not be necessary to reload any services right?
you said in another thread your using ubuntu 22.04 so you need to change php and php.1.gz back to 8.1
Yes it is ubuntu 22 04LTS. But the roundcube installed with ispc 3.2.9 is version 1.5.13, which is written for php8.0. So I wonder if I have to upgrade roundcube to version 1.6 or if I can set the php version used especially for roundcube to php8 0. Is it even possible to do so?
roundcube will use the system default php version. i don't think your issue with the empty inbox is due to the php version. the default apt installed version of roundcube should work fine with the system default installed php, but you should be fine to upgrade roundcube to 1.6 you cannot change the php version for the apt installed version of roundcube without changing the system default php. but that will break things. you can create a website in the ispconfig interface and download the roundcube source and manually install it in that sites doc root. or possibly symlink from the docroot to the apt installed version, reverse proxy to it, or change to docroot in the website options. i can't remember which of those last 3 options works, i know it's been discussed on here before so you should be able to find it in a search. once running in it's own ispconfig created website you can change it's php version just like any other site, but as i said, i'm not sure that's actually the cause of your problem.
I can use the local ip of the server 192.168.0.200/webmail - no problems I can log-in. The inbox and other folders show up with content as if I used outlook as client. I can use the global ip of the server xxx.xxx.xxx.xxx/webmail - no problems I can log-in. As with the local ip, my folders show and content as well. But it is not secured, so it is not safe obviously. I can use the servers domain: bnjprio.dk/webmail - here I can log-in, and folders are present, but no content is shown in any folders. So Roundcube is working. And the php version must be allright. Why is it not showing content when reached via domain name rather than ip? What am I missing? Is it a matter of opening ports? (port 53 is open)
well if it works using the ip then it's definitely not the php version causing the problem. possibly the apache config x-frame-options / CORS. i know this is for an old version, but it could be worth checking it anyway.. https://www.roundcubeforum.net/index.php?topic=28678.0
Found out that if I have this snippet active for the apache directive snippets (option tab for site) it will not load. But if I remove it, it works. Code: <IfModule mod_headers.c> Header set Content-Security-Policy "default-src 'self' bnjpro.dk *.bnjpro.dk" </IfModule> How do I use these right then? I thought having the *.bnjpro.dk would cover my subdomain (that I have mase in ispc pointing at bnjpro.dk/webmail). I doesn't work either if I write this: Code: <IfModule mod_headers.c> Header set Content-Security-Policy "default-src 'self' bnjpro.dk bnjpro.dk/webmail" </IfModule> Is there another way to make CSP work right?
I have tested a little more. And the warning I got on my old server I had regarding CSP (warning when testing with internet.nl), I don't get anymore. So maybe I don't really need CSP? Anyway Thank you all very much for your contributions. I am as happy as can be right now. Moving on to the next challenge.