We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it soon. Read more about it: https://vestacp.com/docs/vesta-2-development
Problems with php after update to 7x
Problems with php after update to 7x
Hello,
I was install php selector on my Centos 7 VestaCp and was fine until i make an update of php on centos.
From default (php5.6) to php 7.After that my phpmyadmin doesn't work (Forbidden-You don't have permission to access /phpmyadmin/ on this server.) and on Roundcube can't connect from any email adress.
Anybody can help me please?
Centos 7.4
VestaCP 0.98-19
I was install php selector on my Centos 7 VestaCp and was fine until i make an update of php on centos.
From default (php5.6) to php 7.After that my phpmyadmin doesn't work (Forbidden-You don't have permission to access /phpmyadmin/ on this server.) and on Roundcube can't connect from any email adress.
Anybody can help me please?
Centos 7.4
VestaCP 0.98-19
Re: Problems with php after update to 7x
You upgrade your main php version, this is not selector script error.
So when you update main php version you also update roundcube / phpmyadmin
So maybe /etc/httpd/conf.d/phpmyadmin.conf and roundcube.conf get broken, also maybe you lost some conf in /etc/roundcubemail
You need check it manually
This happen always with or without phpselector
So when you update main php version you also update roundcube / phpmyadmin
So maybe /etc/httpd/conf.d/phpmyadmin.conf and roundcube.conf get broken, also maybe you lost some conf in /etc/roundcubemail
You need check it manually
This happen always with or without phpselector
Re: Problems with php after update to 7x
Can you help me please because i am not so good on thatskamasle wrote: ↑Mon Feb 19, 2018 9:19 pmYou upgrade your main php version, this is not selector script error.
So when you update main php version you also update roundcube / phpmyadmin
So maybe /etc/httpd/conf.d/phpmyadmin.conf and roundcube.conf get broken, also maybe you lost some conf in /etc/roundcubemail
You need check it manually
This happen always with or without phpselector
Re: Problems with php after update to 7x
Try to reinstall roundcube package
Code: Select all
yum install roundcubemail
Re: Problems with php after update to 7x
This also can break roundcube because it also reset some permission /etc/roundcubemail/defaults.inc.phpimperio wrote: ↑Tue Feb 20, 2018 6:03 pmTry to reinstall roundcube packageCode: Select all
yum install roundcubemail
Chan your check in /etc/httpd/conf.d/
Check files roundcube.conf and roundcube.conf.rpmsave
If you have a roundcube.conf.rpmsave rename move out roundcube.conf
mv rouncube.conf /root
and rename rounducbe.conf.rpmsave to roundcube.conf
Then restart apache
Do the same if phpmyadmin.conf.rpmsave is there
Re: Problems with php after update to 7x
I move roundcubemail.conf(because i don't have roundcube.conf) and phpMyAdmin.conf to /root and rename conf.rpmsave.skamasle wrote: ↑Tue Feb 20, 2018 9:27 pmThis also can break roundcube because it also reset some permission /etc/roundcubemail/defaults.inc.phpimperio wrote: ↑Tue Feb 20, 2018 6:03 pmTry to reinstall roundcube packageCode: Select all
yum install roundcubemail
Chan your check in /etc/httpd/conf.d/
Check files roundcube.conf and roundcube.conf.rpmsave
If you have a roundcube.conf.rpmsave rename move out roundcube.conf
mv rouncube.conf /root
and rename rounducbe.conf.rpmsave to roundcube.conf
Then restart apache
Do the same if phpmyadmin.conf.rpmsave is there
Result is:
For Roundcube i have Roundcube login page but when i insert credential (user and pass) result is : This page isn’t working (HTTP ERROR 500)
For phpMyAdmin isn't working at all : ip-address/phpmyadmin - This page isn’t working (HTTP ERROR 500)
Re: Problems with php after update to 7x
You should using default php version or php selector by skamasle
We don't provide support if you updating the main php by yourself.
Try to run this commands
We don't provide support if you updating the main php by yourself.
Try to run this commands
SpoilerShow
Code: Select all
wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/roundcubemail.conf -O /etc/httpd/conf.d/roundcubemail.conf
wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/main.inc.php -O /etc/roundcubemail/config.inc.php
cd /usr/share/roundcubemail/plugins/password
wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/vesta.php -O drivers/vesta.php
wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/config.inc.php -O config.inc.php
sed -i "s/localhost/$servername/g" /usr/share/roundcubemail/plugins/password/config.inc.php
chmod a+r /etc/roundcubemail/*
chmod -f 777 /var/log/roundcubemail
chmod 640 /etc/roundcubemail/config.inc.php
chown root:apache /etc/roundcubemail/config.inc.php
service httpd restart
Re: Problems with php after update to 7x
Yes, the big issue is thatimperio wrote: ↑Wed Feb 21, 2018 5:52 pmYou should using default php version or php selector by skamasle
We don't provide support if you updating the main php yourself.
Try to run this commandsSpoilerShowCode: Select all
wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/roundcubemail.conf -O /etc/httpd/conf.d/roundcubemail.conf wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/main.inc.php -O /etc/roundcubemail/config.inc.php cd /usr/share/roundcubemail/plugins/password wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/vesta.php -O drivers/vesta.php wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/config.inc.php -O config.inc.php sed -i "s/localhost/$servername/g" /usr/share/roundcubemail/plugins/password/config.inc.php chmod a+r /etc/roundcubemail/* chmod -f 777 /var/log/roundcubemail chmod 640 /etc/roundcubemail/config.inc.php chown root:apache /etc/roundcubemail/config.inc.php service httpd restart
If upgrade PHP roundcube and phpmyadmin get updated, and here can be happen something bad
1- conf file get removed and updated by default provied by repository
2- mod_php module maybe get broken, or uninstalled, or just changed
3- if you have php selector and update default php maybe mod_php configuration fail get "mixed" with order version
4- As I known with php 7 and php 7.1 in default all works fine, but can say the same with php 7.2 not tested
So why use php selector and update main version php ?
If you first run php selector you will install php 7, 7.1, 72 and if you get update main php version you maybe get some conflicts with that versions
What repos you use to update ? if your update with remi maybe mod_php get broken
Re: Problems with php after update to 7x
I try reproduce this
THIS NOT IS A TUTORIAL; NOT RUN COMMANDS PROVIDED IF YOU NOT KNOW WHAT YOU DO
Centos 7.2
Install php selector
Then update php to 7
Roundcube works fine, phpmyadmin fail,
I just remove php7 again ( just main version )
Install PHP again, easyes way install phpmyadmin an roundcube then add extra modules
Just leave php.conf
Put default phpmyadmin.conf provided by vestacp , restart apache and all works fine
This is not a tutorial, I only show you than you can brake something in your server if update, so some times you need uninstall all and start again but you need know what you do
THIS NOT IS A TUTORIAL; NOT RUN COMMANDS PROVIDED IF YOU NOT KNOW WHAT YOU DO
Centos 7.2
Install php selector
SpoilerShow
Actually you runing php 5.6, so I will skip it
Instaling PHP 5.4
........
PHP Ready!
Instaling PHP 5.5
.......
PHP Ready!
Skip php 5.6 actually installed
Installing PHP 7.0
.......
PHP Ready!
Installing PHP 7.1
.......
PHP Ready!
Installing PHP 7.2
.......
PHP Ready!
Instaling PHP 5.4
........
PHP Ready!
Instaling PHP 5.5
.......
PHP Ready!
Skip php 5.6 actually installed
Installing PHP 7.0
.......
PHP Ready!
Installing PHP 7.1
.......
PHP Ready!
Installing PHP 7.2
.......
PHP Ready!
Then update php to 7
SpoilerShow
# yum update php --enablerepo=remi,remi-php70
Complementos cargados:fastestmirror
remi-php70 | 2.9 kB 00:00
remi-safe | 2.9 kB 00:00
(1/2): remi-php70/primary_db | 206 kB 00:01
(2/2): remi-safe/primary_db | 1.1 MB 00:02
Loading mirror speeds from cached hostfile
................................
Actualizado:
php.x86_64 0:7.0.27-1.el7.remi
Dependencia(s) actualizada(s):
php-bcmath.x86_64 0:7.0.27-1.el7.remi
php-cli.x86_64 0:7.0.27-1.el7.remi
php-common.x86_64 0:7.0.27-1.el7.remi
php-gd.x86_64 0:7.0.27-1.el7.remi
php-gmp.x86_64 0:7.0.27-1.el7.remi
php-imap.x86_64 0:7.0.27-1.el7.remi
php-intl.x86_64 0:7.0.27-1.el7.remi
php-ldap.x86_64 0:7.0.27-1.el7.remi
php-mbstring.x86_64 0:7.0.27-1.el7.remi
php-mcrypt.x86_64 0:7.0.27-1.el7.remi
php-mysqlnd.x86_64 0:7.0.27-1.el7.remi
php-pdo.x86_64 0:7.0.27-1.el7.remi
php-pecl-zip.x86_64 0:1.15.2-1.el7.remi.7.0
php-process.x86_64 0:7.0.27-1.el7.remi
php-pspell.x86_64 0:7.0.27-1.el7.remi
php-recode.x86_64 0:7.0.27-1.el7.remi
php-soap.x86_64 0:7.0.27-1.el7.remi
php-tidy.x86_64 0:7.0.27-1.el7.remi
php-xml.x86_64 0:7.0.27-1.el7.remi
php-xmlrpc.x86_64 0:7.0.27-1.el7.remi
Complementos cargados:fastestmirror
remi-php70 | 2.9 kB 00:00
remi-safe | 2.9 kB 00:00
(1/2): remi-php70/primary_db | 206 kB 00:01
(2/2): remi-safe/primary_db | 1.1 MB 00:02
Loading mirror speeds from cached hostfile
................................
Actualizado:
php.x86_64 0:7.0.27-1.el7.remi
Dependencia(s) actualizada(s):
php-bcmath.x86_64 0:7.0.27-1.el7.remi
php-cli.x86_64 0:7.0.27-1.el7.remi
php-common.x86_64 0:7.0.27-1.el7.remi
php-gd.x86_64 0:7.0.27-1.el7.remi
php-gmp.x86_64 0:7.0.27-1.el7.remi
php-imap.x86_64 0:7.0.27-1.el7.remi
php-intl.x86_64 0:7.0.27-1.el7.remi
php-ldap.x86_64 0:7.0.27-1.el7.remi
php-mbstring.x86_64 0:7.0.27-1.el7.remi
php-mcrypt.x86_64 0:7.0.27-1.el7.remi
php-mysqlnd.x86_64 0:7.0.27-1.el7.remi
php-pdo.x86_64 0:7.0.27-1.el7.remi
php-pecl-zip.x86_64 0:1.15.2-1.el7.remi.7.0
php-process.x86_64 0:7.0.27-1.el7.remi
php-pspell.x86_64 0:7.0.27-1.el7.remi
php-recode.x86_64 0:7.0.27-1.el7.remi
php-soap.x86_64 0:7.0.27-1.el7.remi
php-tidy.x86_64 0:7.0.27-1.el7.remi
php-xml.x86_64 0:7.0.27-1.el7.remi
php-xmlrpc.x86_64 0:7.0.27-1.el7.remi
I just remove php7 again ( just main version )
SpoilerShow
# yum remove php-*
Complementos cargados:fastestmirror
Resolviendo dependencias
--> Ejecutando prueba de transacción
---> Paquete php.x86_64 0:7.0.27-1.el7.remi debe ser eliminado
--> Procesando dependencias: mod_php para el paquete: roundcubemail-1.3.4-1.el7.remi.noarch
---> Paquete php-PsrLog.noarch 0:1.0.2-2.el7.remi debe ser eliminado
--> Procesando dependencias: php-PsrLog >= 1.0.0-8 para el paquete: composer-1.6.3-3.el7.remi.noarch
--> Procesando dependencias: php-composer(psr/log) >= 1.0 para el paquete: composer-1.6.3-3.el7.remi.noarch
...........
..........
..........
php.x86_64 0:7.0.27-1.el7.remi
php-PsrLog.noarch 0:1.0.2-2.el7.remi
php-bcmath.x86_64 0:7.0.27-1.el7.remi
php-cli.x86_64 0:7.0.27-1.el7.remi
Complementos cargados:fastestmirror
Resolviendo dependencias
--> Ejecutando prueba de transacción
---> Paquete php.x86_64 0:7.0.27-1.el7.remi debe ser eliminado
--> Procesando dependencias: mod_php para el paquete: roundcubemail-1.3.4-1.el7.remi.noarch
---> Paquete php-PsrLog.noarch 0:1.0.2-2.el7.remi debe ser eliminado
--> Procesando dependencias: php-PsrLog >= 1.0.0-8 para el paquete: composer-1.6.3-3.el7.remi.noarch
--> Procesando dependencias: php-composer(psr/log) >= 1.0 para el paquete: composer-1.6.3-3.el7.remi.noarch
...........
..........
..........
php.x86_64 0:7.0.27-1.el7.remi
php-PsrLog.noarch 0:1.0.2-2.el7.remi
php-bcmath.x86_64 0:7.0.27-1.el7.remi
php-cli.x86_64 0:7.0.27-1.el7.remi
Install PHP again, easyes way install phpmyadmin an roundcube then add extra modules
Code: Select all
# php -v
-bash: /usr/bin/php: No existe el fichero o el directorio
SpoilerShow
]# yum install roundcubemail phpmyadmin --enablerepo=remi,remi-php56
Complementos cargados:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.airenetworks.es
* epel: fr.mirror.babylon.network
* extras: mirror.airenetworks.es
* remi: fr.mirror.babylon.network
* remi-php56: fr.mirror.babylon.network
* remi-safe: fr.mirror.babylon.network
* updates: mirror.airenetworks.es
Resolviendo dependencias
--> Ejecutando prueba de transacción
---> Paquete phpMyAdmin.noarch 0:4.7.8-1.el7.remi debe ser instalado
--> Procesando dependencias: php-composer(tecnickcom/tcpdf) < 7 para el paquete: phpMyAdmin-4.7.8-1.el7.remi.noarch
--> Procesando dependencias: php-composer(phpseclib/phpseclib) < 3 para el paquete: phpMyAdmin-4.7.8-1.el7.remi.noarch
--> Procesando dependencias: php-composer(phpmyadmin/sql-parser) < 5 para el paquete: phpMyAdmin-4.7.8-1.el7.remi.noarch
--> Procesando dependencias: php-composer(p
....
....
Downloading packages:
(1/76): composer-1.6.3-3.el7.remi.noarch.rpm | 380 kB 00:00:02
(2/76): php-PsrLog-1.0.2-2.el7.remi.noarch.rpm | 11 kB 00:00:05
(3/76): php-composer-ca-bundle-1.1.0-1.el7.remi.noarch.rpm | 12 kB 00:00:00
(4/76): php-composer-semver-1.4.2-2.el7.remi.noarch.rpm | 16 kB 00:00:00
(5/76): php-composer-spdx-licenses-1.3.0-1.el7.remi.noarch.rpm | 16 kB 00:00:00
(6/76): php-5.6.33-1.el7.remi.x86_64.rpm | 2.6 MB 00:00:08
(7/76): php-fedora-autoloader-1.0.0-1.el7.remi.noarch.rpm | 8.9 kB 00:00:00
(8/76): php-gd-5.6.33-1.el7.remi.x86_64.rpm | 85 kB 00:00:06
(9/76): php-gmp-5.6.33-1.el7.remi.x86_64.rpm | 66 kB 00:00:03
(10/76): php-google-recaptcha-1.1.3-1.el7.re
Complementos cargados:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.airenetworks.es
* epel: fr.mirror.babylon.network
* extras: mirror.airenetworks.es
* remi: fr.mirror.babylon.network
* remi-php56: fr.mirror.babylon.network
* remi-safe: fr.mirror.babylon.network
* updates: mirror.airenetworks.es
Resolviendo dependencias
--> Ejecutando prueba de transacción
---> Paquete phpMyAdmin.noarch 0:4.7.8-1.el7.remi debe ser instalado
--> Procesando dependencias: php-composer(tecnickcom/tcpdf) < 7 para el paquete: phpMyAdmin-4.7.8-1.el7.remi.noarch
--> Procesando dependencias: php-composer(phpseclib/phpseclib) < 3 para el paquete: phpMyAdmin-4.7.8-1.el7.remi.noarch
--> Procesando dependencias: php-composer(phpmyadmin/sql-parser) < 5 para el paquete: phpMyAdmin-4.7.8-1.el7.remi.noarch
--> Procesando dependencias: php-composer(p
....
....
Downloading packages:
(1/76): composer-1.6.3-3.el7.remi.noarch.rpm | 380 kB 00:00:02
(2/76): php-PsrLog-1.0.2-2.el7.remi.noarch.rpm | 11 kB 00:00:05
(3/76): php-composer-ca-bundle-1.1.0-1.el7.remi.noarch.rpm | 12 kB 00:00:00
(4/76): php-composer-semver-1.4.2-2.el7.remi.noarch.rpm | 16 kB 00:00:00
(5/76): php-composer-spdx-licenses-1.3.0-1.el7.remi.noarch.rpm | 16 kB 00:00:00
(6/76): php-5.6.33-1.el7.remi.x86_64.rpm | 2.6 MB 00:00:08
(7/76): php-fedora-autoloader-1.0.0-1.el7.remi.noarch.rpm | 8.9 kB 00:00:00
(8/76): php-gd-5.6.33-1.el7.remi.x86_64.rpm | 85 kB 00:00:06
(9/76): php-gmp-5.6.33-1.el7.remi.x86_64.rpm | 66 kB 00:00:03
(10/76): php-google-recaptcha-1.1.3-1.el7.re
Code: Select all
# php -v
PHP 5.6.33 (cli) (built: Jan 3 2018 13:02:21)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
Code: Select all
cd /etc/httpd/conf.d
# ls -lha |grep php
-rw-r--r-- 1 root root 1,2K feb 18 2017 php54-php.conf
-rw-r--r-- 1 root root 1,2K feb 18 2017 php55-php.conf
-rw-r--r-- 1 root root 1,3K ene 2 11:10 php70-php.conf
-rw-r--r-- 1 root root 1,3K ene 31 07:18 php71-php.conf
-rw-r--r-- 1 root root 1,2K ene 3 13:06 php.conf
Code: Select all
# rm php7* php5* # that not needed because script use fastcgi
Put default phpmyadmin.conf provided by vestacp , restart apache and all works fine
This is not a tutorial, I only show you than you can brake something in your server if update, so some times you need uninstall all and start again but you need know what you do
Re: Problems with php after update to 7x
I run this command and now for domain.com/webmail have - DATABASE ERROR: CONNECTION FAILED! -Unable to connect to the database!skamasle wrote: ↑Wed Feb 21, 2018 10:12 pmYes, the big issue is thatimperio wrote: ↑Wed Feb 21, 2018 5:52 pmYou should using default php version or php selector by skamasle
We don't provide support if you updating the main php yourself.
Try to run this commandsSpoilerShowCode: Select all
wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/roundcubemail.conf -O /etc/httpd/conf.d/roundcubemail.conf wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/main.inc.php -O /etc/roundcubemail/config.inc.php cd /usr/share/roundcubemail/plugins/password wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/vesta.php -O drivers/vesta.php wget https://raw.githubusercontent.com/serghey-rodin/vesta/master/install/rhel/7/roundcube/config.inc.php -O config.inc.php sed -i "s/localhost/$servername/g" /usr/share/roundcubemail/plugins/password/config.inc.php chmod a+r /etc/roundcubemail/* chmod -f 777 /var/log/roundcubemail chmod 640 /etc/roundcubemail/config.inc.php chown root:apache /etc/roundcubemail/config.inc.php service httpd restart
If upgrade PHP roundcube and phpmyadmin get updated, and here can be happen something bad
1- conf file get removed and updated by default provied by repository
2- mod_php module maybe get broken, or uninstalled, or just changed
3- if you have php selector and update default php maybe mod_php configuration fail get "mixed" with order version
4- As I known with php 7 and php 7.1 in default all works fine, but can say the same with php 7.2 not tested
So why use php selector and update main version php ?
If you first run php selector you will install php 7, 7.1, 72 and if you get update main php version you maybe get some conflicts with that versions
What repos you use to update ? if your update with remi maybe mod_php get broken
My mistake to upgrade main php after i install php selector - i was very stupid.
Now i don't now to revert php to default php -php5.6 and correct my mistake
And yes i use remi for update