Question

Web server using different PHP then terminal?

Posted November 9, 2021 94 views
UbuntuPHP

When using SSH into my server php -v returns

PHP 8.0.12 (cli) (built: Oct 22 2021 12:34:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.12, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.12, Copyright (c), by Zend Technologies

which makes sense, I just updated it. However a PHP file with

<?
phpinfo();
?>

return PHP Version 7.0.33-55+ubuntu18.04.1+deb.sury.org+1

What is going wrong here? I’ve been spending about 40 minutes trying to install Curl and seeing php -m has curl and it not being enabled and then found this out, so this might be the underlying issue.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers
Show answer This answer has been marked as resolved by Troti.