Page 3 of 4

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Wed Sep 25, 2019 12:18 pm
by sysadminn
I tried with grayfolk the methods and they are working but issues can be happen always, no one from VestaCP still not replies

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Wed Sep 25, 2019 12:39 pm
by sufiyanshaikh
sysadminn wrote:
Wed Sep 25, 2019 12:18 pm
I tried with grayfolk the methods and they are working but issues can be happen always, no one from VestaCP still not replies
Which of his solution worked for you?

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Wed Sep 25, 2019 12:44 pm
by sysadminn
sufiyanshaikh wrote:
Wed Sep 25, 2019 12:39 pm
sysadminn wrote:
Wed Sep 25, 2019 12:18 pm
I tried with grayfolk the methods and they are working but issues can be happen always, no one from VestaCP still not replies
Which of his solution worked for you?
if you do a clean install follow this solution here :

Code: Select all

yum install yum-utils -y
yum-config-manager --disable remi-php5*
yum-config-manager --disable remi-php74
yum-config-manager --disable remi-test
yum-config-manager --enable remi-php73
yum remove php php-*
yum install roundcube phpmyadmin -y
service httpd restart or service php-fpm restart

Try it and should work, if it not works you can put the php selector then

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Wed Sep 25, 2019 12:52 pm
by sysadminn
i found same topic here also

https://e-worldhosting.com/index.php?/t ... ntry238314

follow it maybe they will give better answer

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Wed Sep 25, 2019 2:21 pm
by sufiyanshaikh
sysadminn wrote:
Wed Sep 25, 2019 12:44 pm
sufiyanshaikh wrote:
Wed Sep 25, 2019 12:39 pm
sysadminn wrote:
Wed Sep 25, 2019 12:18 pm
I tried with grayfolk the methods and they are working but issues can be happen always, no one from VestaCP still not replies
Which of his solution worked for you?
if you do a clean install follow this solution here :

Code: Select all

yum install yum-utils -y
yum-config-manager --disable remi-php5*
yum-config-manager --disable remi-php74
yum-config-manager --disable remi-test
yum-config-manager --enable remi-php73
yum remove php php-*
yum install roundcube phpmyadmin -y
service httpd restart or service php-fpm restart

Try it and should work, if it not works you can put the php selector then
Not working.


● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/httpd.service.d
└─limits.conf
Active: failed (Result: exit-code) since Wed 2019-09-25 14:17:43 UTC; 5s ago
Process: 2853 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 2850 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 2850 (code=exited, status=1/FAILURE)

Sep 25 14:17:43 demo systemd[1]: Starting The Apache HTTP Server...
Sep 25 14:17:43 demo httpd[2850]: [Wed Sep 25 14:17:43.245214 2019] [so:warn] [pid 2850] AH01574: module ruid2_module is already loaded, skipping
Sep 25 14:17:43 demo httpd[2850]: AH00526: Syntax error on line 17 of /home/admin/conf/web/demo.httpd.conf:
Sep 25 14:17:43 demo httpd[2850]: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
Sep 25 14:17:43 demo systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 25 14:17:43 demo kill[2853]: kill: cannot find process ""
Sep 25 14:17:43 demo systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 25 14:17:43 demo systemd[1]: Failed to start The Apache HTTP Server.
Sep 25 14:17:43 demo systemd[1]: Unit httpd.service entered

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Wed Sep 25, 2019 2:48 pm
by sysadminn
sufiyanshaikh wrote:
Wed Sep 25, 2019 2:21 pm
sysadminn wrote:
Wed Sep 25, 2019 12:44 pm
sufiyanshaikh wrote:
Wed Sep 25, 2019 12:39 pm


Which of his solution worked for you?
if you do a clean install follow this solution here :

Code: Select all

yum install yum-utils -y
yum-config-manager --disable remi-php5*
yum-config-manager --disable remi-php74
yum-config-manager --disable remi-test
yum-config-manager --enable remi-php73
yum remove php php-*
yum install roundcube phpmyadmin -y
service httpd restart or service php-fpm restart

Try it and should work, if it not works you can put the php selector then
Not working.


● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/httpd.service.d
└─limits.conf
Active: failed (Result: exit-code) since Wed 2019-09-25 14:17:43 UTC; 5s ago
Process: 2853 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 2850 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 2850 (code=exited, status=1/FAILURE)

Sep 25 14:17:43 demo systemd[1]: Starting The Apache HTTP Server...
Sep 25 14:17:43 demo httpd[2850]: [Wed Sep 25 14:17:43.245214 2019] [so:warn] [pid 2850] AH01574: module ruid2_module is already loaded, skipping
Sep 25 14:17:43 demo httpd[2850]: AH00526: Syntax error on line 17 of /home/admin/conf/web/demo.httpd.conf:
Sep 25 14:17:43 demo httpd[2850]: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
Sep 25 14:17:43 demo systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 25 14:17:43 demo kill[2853]: kill: cannot find process ""
Sep 25 14:17:43 demo systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 25 14:17:43 demo systemd[1]: Failed to start The Apache HTTP Server.
Sep 25 14:17:43 demo systemd[1]: Unit httpd.service entered
send me server details via pm so i look into this

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Thu Sep 26, 2019 11:18 pm
by root012
Please try my solution, for me everything is perfect.


1.

Code: Select all

yum remove php*
2.

Code: Select all

yum install php71-php-imap php71-php-process php71-php-pspell php71-php-xml php71-php-xmlrpc php71-php-pdo php71-php-ldap php71-php-pecl-zip php71-php-common php71-php php71-php-mcrypt php71-php-gmp php71-php-mysqlnd php71-php-mbstring php71-php-gd php71-php-tidy php71-php-pecl-memcache --enablerepo=remi
3.

Code: Select all

ln -s /usr/bin/php71 /usr/bin/php
4.

Code: Select all

yum install yum-utils -y
5.

Code: Select all

yum-config-manager --disable remi-php5*
yum-config-manager --disable remi-php74
yum-config-manager --disable remi-test
yum-config-manager --enable remi-php73
6.

Code: Select all

yum install phpmyadmin -y 
7. go to /etc/httpd/conf.d/ and edit "phpMyAdmin.conf and put this configuration.

Code: Select all

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from All
</Directory>

<Directory /usr/share/phpMyAdmin/scripts/>
   Order Deny,Allow
   Deny from All
   Allow from All
</Directory>

# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>
Now you can restart your apache "service httpd restart"

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Tue Oct 01, 2019 3:46 pm
by vibol
This solution is working too for me.. many thanks.

update #1:
i have a problem,
php -v show php version 7.3.x,
but browser (expose_php=on) showing 7.1.x instead 7.3.x

i'll try it again on new centos7 instance on google cloud...


update #2:
thanks to @greyfolk @root012 ...
i managed to downgrade my PHP version to 7.3.10 and fixed phpMyAdmin problem.
this is my step-by-step solution.

#tested on Centos7 Google Cloud

1. Installing VestaCP

Code: Select all

curl -O http://vestacp.com/pub/vst-install.sh

bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban no --quota no --exim no --dovecot no --spamassassin no --clamav no --softaculous no --mysql yes --postgresql no

2. VestaCP installed with PHP 7.4.0 RC3, in this condition phpMyAdmin have a lot of errors

Code: Select all

yum install yum-utils -y

yum-config-manager --disable remi-php5*
yum-config-manager --disable remi-php74
yum-config-manager --disable remi-test
yum-config-manager --enable remi-php73

yum remove php php-*

yum install php roundcube phpmyadmin -y

3. now after step 2, i successfully downgrade to PHP 7.3.10 and phpMyAdmin show no errors, but i can't access phpMyAdmin (forbidden 403)

Code: Select all


#edit phpMyAdmin config
nano /etc/httpd/conf.d/phpMyAdmin.conf


#overwrite all with this

# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from All
</Directory>

<Directory /usr/share/phpMyAdmin/scripts/>
   Order Deny,Allow
   Deny from All
   Allow from All
</Directory>

# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     Require local
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/frames/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#
#<IfModule mod_security.c>
#    <Directory /usr/share/phpMyAdmin/>
#        SecRuleInheritance Off
#    </Directory>
#</IfModule>



4. after restart httpd service or reboot, all my problem is fixed :D

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Tue Oct 22, 2019 1:27 am
by conste
I got some issues with PHP 7.4.0RC2 when running Laravel or some other apps dependent on Laravel.

I came across this post an tried several methods. What worked for me is

Code: Select all

yum install yum-utils -y
yum-config-manager --disable remi-php5*
yum-config-manager --disable remi-php74
yum-config-manager --disable remi-test
yum-config-manager --enable remi-php73
yum remove php php-*
I am using php-fpm so I need to install it

Code: Select all

yum install php-fpm
As I also need webmail and phpmyadmin, I have also installed them

Code: Select all

yum install roundcubemail phpmyadmin -y
Then restarted php-fpm

Code: Select all

service php-fpm restart
After the above steps, all worked fine. I was able to run Laravel without any issues unlike when I still have PHP 7.4.0RC2.

I am sharing for others as a reference only.

Re: Centos 7 - downgrade PHP 7.4.0RC2 to php 7.3

Posted: Sun Feb 02, 2020 6:00 pm
by paulo_crash
root012 wrote:
Thu Sep 26, 2019 11:18 pm
Please try my solution, for me everything is perfect.


1.

Code: Select all

yum remove php*
2.

Code: Select all

yum install php71-php-imap php71-php-process php71-php-pspell php71-php-xml php71-php-xmlrpc php71-php-pdo php71-php-ldap php71-php-pecl-zip php71-php-common php71-php php71-php-mcrypt php71-php-gmp php71-php-mysqlnd php71-php-mbstring php71-php-gd php71-php-tidy php71-php-pecl-memcache --enablerepo=remi
3.

Code: Select all

ln -s /usr/bin/php71 /usr/bin/php
4.

Code: Select all

yum install yum-utils -y
5.

Code: Select all

yum-config-manager --disable remi-php5*
yum-config-manager --disable remi-php74
yum-config-manager --disable remi-test
yum-config-manager --enable remi-php73
6.

Code: Select all

yum install phpmyadmin -y 
7. go to /etc/httpd/conf.d/ and edit "phpMyAdmin.conf and put this configuration.

Code: Select all

<Directory /usr/share/phpMyAdmin/>
   Order Deny,Allow
   Deny from All
   Allow from All
</Directory>

<Directory /usr/share/phpMyAdmin/scripts/>
   Order Deny,Allow
   Deny from All
   Allow from All
</Directory>

# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>
Now you can restart your apache "service httpd restart"
This worked for me, thanks.

However phpmyadmin gives the same error, and even if I do the configuration you passed it still gives an error:

Code: Select all

403 Forbidden
You don't have permission to access /phpmyadmin/ on this server.
As I can correct, I believe that only that is missing.