Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

535
Views
¿Cómo puedo degradar o usar PHP 7.2 sin desinstalar PHP 7.4? ¿Es posible usar PHP 7.2 por defecto en lugar de la última versión?

Estoy usando Linux Ubuntu 18.04 y quiero volver a la versión anterior de PHP.

He visto tutoriales que requieren que desinstale la última versión, ahora pregunto si hay una solución a este problema para que pueda cambiar fácilmente de usar 7.2 o 7.4.

over 4 years ago · Santiago Trujillo
5 answers
Answer question

0

Puede instalar varias versiones de php en ubuntu y puede deshabilitar la versión que no necesita, por ejemplo:

 sudo a2dismod php7.4 sudo a2enmod php7.2
over 4 years ago · Santiago Trujillo Report

0

Sí , puedes.

1- Para dejar de ejecutar PHP 7.4, ejecute los siguientes comandos para deshabilitarlo para Apache2:

 sudo a2dismod php7.4

2- Luego ejecute los siguientes comandos para habilitar el uso de PHP 7.2 para Apache2:

 sudo a2enmod php7.2

3- Reinicie Apache2 para que se apliquen los cambios ejecutando los siguientes comandos:

 sudo systemctl restart apache2.service
over 4 years ago · Santiago Trujillo Report

0

Me he enfrentado al mismo problema y aquí está la solución:

 sudo update-alternatives --config php

Ahora selecciona qué versión quieres en este momento, gracias

over 4 years ago · Santiago Trujillo Report

0

Bajar de 7.4 a 7.2

 sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.2 sudo apt-get install php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-mysql php7.2-mbstring php7.2-zip php7.2-fpm php7.2-intl php7.2-simplexml sudo a2dismod php7.4 sudo a2enmod php7.2 sudo service apache2 restart sudo update-alternatives --set php /usr/bin/php7.2 sudo update-alternatives --set phar /usr/bin/phar7.2 sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.2 sudo update-alternatives --set phpize /usr/bin/phpize7.2 sudo update-alternatives --set php-config /usr/bin/php-config7.2
over 4 years ago · Santiago Trujillo Report

0

Si eres usuario de nginx. primero instale php 7.4 todos los elementos necesarios.

 sudo apt-get update sudo apt -y install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath php7.4-fpm -y systemctl status php7.2-fpm.service #get previous version id kill -9 873 #id will be replace with your php.7.2-fpm service php7.4-fpm restart systemctl status php7.4-fpm.service #check php status

Listo, todo bien

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!