1

I have several sites developed with an old version of laravel that requires PHP 7.0 But the version of phpmyadmin requires 7.4 min.

I have in Apache the following error in APACHE:

[Mon Jan 13 19:00:58.133861 2025] [:error] PHP Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /usr/share/php/PhpMyAdmin/MoTranslator/Translator.php>

I tried these:

`sudo apt install php7.4 php7.4-fpm php7.4-mysql

sudo a2enconf phpmyadmin sudo systemctl enable php7.4-fpm sudo a2enmod php7.0 sudo a2enmod php7.4 sudo a2enmod proxy_fcgi setenvif`

In phpmyadmin.config

<IfModule mod_proxy_fcgi.c> SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost" </IfModule>

The command "sudo systemctl status php7.4-fpm" returns ENABLED (for 7.0 y 7.4) But phpInfo() in phpmyadmin returns 7.0

I need that phpmyadmin runs with 7.4 and the rest 7.0.

Thank you for the time!!

1
  • 1
    "I need that phpmyadmin runs with 7.4 and the rest 7.0." - really? Even PHP 7.4 is EOL since years. Please don't let me guess how many unfixed security issues your application contains, starting from that horribly outdated PHP version... Also, if you insist to use PHP 7.0, why not install phpMyAdmin 4 which should be compatible with that version? Commented Jan 14 at 11:51

1 Answer 1

0

I need that phpmyadmin runs with 7.4 and the rest 7.0.

Create the virtual hosts with PHP 7.0 and one other one with PHP 7.4.

The later one dedicate for your Phpmyadmin deployment.

The earlier dedicated to your other Laravel deployments.

Compare as well with an earlier answer for some layouts and discussion, with FCGI you can pretty easily run different PHP versions on the same machine: How to use multiple PHP version using Apache and not using FPM?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.