We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Remove PHP by accident
-
- Posts: 25
- Joined: Fri Nov 18, 2016 3:36 pm
- Os: CentOS 6x
- Web: apache + nginx
Remove PHP by accident
I tried upgrade my server to PHP 7.x and I tried follow an article from sever mom. In their step, it mentioned to remove php and now I'm unable to install or re-activate php again.
1. I tried use:
But no luck
2. I got this problem when I tried restart httpd
I hope get some hints to resolve it, thank you for all your help!
1. I tried use:
Code: Select all
yum --enablerepo=remi-php70 install php70-php php70-php-pear php70-php-bcmath php70-php-pecl-jsond-devel php70-php-mysqlnd php70-php-gd php70-php-common php70-php-fpm php70-php-intl php70-php-cli php70-php php70-php-xml php70-php-opcache php70-php-pecl-apcu php70-php-pecl-jsond php70-php-pdo php70-php-gmp php70-php-process php70-php-pecl-imagick php70-php-devel php70-php-mbstring
2. I got this problem when I tried restart httpd
Code: Select all
[warn] module ruid2_module is already loaded, skipping
Syntax error on line 17 of /home/admin/conf/web/httpd.conf:
Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
-
- Posts: 25
- Joined: Fri Nov 18, 2016 3:36 pm
- Os: CentOS 6x
- Web: apache + nginx
Re: Remove PHP by accident
I think I know what is problem now, but I'm not sure how to resolve it.
My server work with centos 6 and seem I've installed package for centos 7, so it not work well. How I can remove all php package for centos 7 and install 6 instead?
I tried use this commanded below:
But I think the correct for centos 6 must be:
When I tried install commanded for centos 6, I got this result:
My server work with centos 6 and seem I've installed package for centos 7, so it not work well. How I can remove all php package for centos 7 and install 6 instead?
I tried use this commanded below:
Code: Select all
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
Code: Select all
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
Code: Select all
[root@server ~]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
--2020-01-15 21:18:23-- https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Resolving dl.fedoraproject.org... 209.132.181.24, 209.132.181.25, 209.132.181.23
Connecting to dl.fedoraproject.org|209.132.181.24|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14540 (14K) [application/x-rpm]
Saving to: “epel-release-latest-6.noarch.rpm.3”
100%[==========================================================>] 14,540 --.-K/s in 0.01s
2020-01-15 21:18:23 (1.30 MB/s) - “epel-release-latest-6.noarch.rpm.3” saved [14540/14540]
[root@server ~]# wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm
--2020-01-15 21:18:23-- http://rpms.remirepo.net/enterprise/remi-release-6.rpm
Resolving rpms.remirepo.net... 195.154.241.117, 2001:bc8:33a1:100::1
Connecting to rpms.remirepo.net|195.154.241.117|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15704 (15K) [application/x-rpm]
Saving to: “remi-release-6.rpm.3”
100%[==========================================================>] 15,704 96.2K/s in 0.2s
2020-01-15 21:18:24 (96.2 KB/s) - “remi-release-6.rpm.3” saved [15704/15704]
[root@server ~]# rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm
Preparing... ########################################### [100%]
package epel-release-7-9.noarch (which is newer than epel-release-6-8.noarch) is already installed
package remi-release-7.7-1.el7.remi.noarch (which is newer than remi-release-6.10-1.el6.remi.noarch) is already installed
[root@server ~]#
Re: Remove PHP by accident
Is not posible install php from remi repos for centos 7 in centos 6
So maybe you have duplicate repos and you install all from centos 6
The issue maybe is that you install php70 and not PHP this generate a aditional php version for you and apache cant find correct version
Firt php version always need be php and not PHP-##
So you may need remove all php start from 0
yum remove php* and then yum search php and see there are some php versions some with php and some php##
So maybe you have duplicate repos and you install all from centos 6
The issue maybe is that you install php70 and not PHP this generate a aditional php version for you and apache cant find correct version
Firt php version always need be php and not PHP-##
So you may need remove all php start from 0
yum remove php* and then yum search php and see there are some php versions some with php and some php##
-
- Posts: 25
- Joined: Fri Nov 18, 2016 3:36 pm
- Os: CentOS 6x
- Web: apache + nginx
Re: Remove PHP by accident
I'm follow your step by: yum remove php* then yum search php and I have php from 5.4 up to 7.4. I'm not sure what do to do now, could you help me with all steps to install php and phpmyadmin so I can get my site up again? Thanks you so much for your help.skamasle wrote: ↑Wed Jan 22, 2020 8:24 pmIs not posible install php from remi repos for centos 7 in centos 6
So maybe you have duplicate repos and you install all from centos 6
The issue maybe is that you install php70 and not PHP this generate a aditional php version for you and apache cant find correct version
Firt php version always need be php and not PHP-##
So you may need remove all php start from 0
yum remove php* and then yum search php and see there are some php versions some with php and some php##
Re: Remove PHP by accident
HiLoc_rabbirt wrote: ↑Thu Jan 23, 2020 2:54 pmI'm follow your step by: yum remove php* then yum search php and I have php from 5.4 up to 7.4. I'm not sure what do to do now, could you help me with all steps to install php and phpmyadmin so I can get my site up again? Thanks you so much for your help.skamasle wrote: ↑Wed Jan 22, 2020 8:24 pmIs not posible install php from remi repos for centos 7 in centos 6
So maybe you have duplicate repos and you install all from centos 6
The issue maybe is that you install php70 and not PHP this generate a aditional php version for you and apache cant find correct version
Firt php version always need be php and not PHP-##
So you may need remove all php start from 0
yum remove php* and then yum search php and see there are some php versions some with php and some php##
Just install php version you need
Or try install phpmyadmin
Code: Select all
yum install phpmyadmin
If not, install php
Code: Select all
yum install php php-bcmath php-cli php-common php-fpm php-gd php-imap php-mbstring php-mcrypt phpMyAdmin php-mysql php-pdo php-pgsql php-soap php-tidy php-xml php-xmlrpc
-
- Posts: 25
- Joined: Fri Nov 18, 2016 3:36 pm
- Os: CentOS 6x
- Web: apache + nginx
Re: Remove PHP by accident
Hi,skamasle wrote: ↑Tue Jan 28, 2020 7:31 pmHiLoc_rabbirt wrote: ↑Thu Jan 23, 2020 2:54 pmI'm follow your step by: yum remove php* then yum search php and I have php from 5.4 up to 7.4. I'm not sure what do to do now, could you help me with all steps to install php and phpmyadmin so I can get my site up again? Thanks you so much for your help.skamasle wrote: ↑Wed Jan 22, 2020 8:24 pmIs not posible install php from remi repos for centos 7 in centos 6
So maybe you have duplicate repos and you install all from centos 6
The issue maybe is that you install php70 and not PHP this generate a aditional php version for you and apache cant find correct version
Firt php version always need be php and not PHP-##
So you may need remove all php start from 0
yum remove php* and then yum search php and see there are some php versions some with php and some php##
Just install php version you need
Or try install phpmyadmin
This will install phpmyadmin dependencies ( so php-* )Code: Select all
yum install phpmyadmin
If not, install php
Code: Select all
yum install php php-bcmath php-cli php-common php-fpm php-gd php-imap php-mbstring php-mcrypt phpMyAdmin php-mysql php-pdo php-pgsql php-soap php-tidy php-xml php-xmlrpc
Thank you so much for your advice :), I've removed all repo for centos 7 then install repo for centos 6 and it's work well for me again now.