# Help, php -v shows 7.0.33 but I am running 7.3.22, I think!?

**URL:** <https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714>\
**Category:** PHP Installation and Configuration\
**Created:** [October 26, 2020, 8:57am UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714 "2020-10-26T08:57:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoldos](https://www.phphelp.com/user_avatar/www.phphelp.com/zoldos/32/4221_2.png) [@zoldos](https://www.phphelp.com/u/zoldos)\
**Post date:** [October 26, 2020, 8:57am UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/1 "2020-10-26T08:57:40Z")

</div>

In my Plesk 18 panel, all my sites show that they are using PHP 7.3.22 and this has been confirmed on my various sites via phpinfo. However, when I execute php -v under Ubunto 16.04 console, it reports PHP version as 7.0.33 and an app that uses Composer won’t update because of this.

What? Help please!

---

<div class="post-metadata">

**Author:** ![chorn](https://www.phphelp.com/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@chorn](https://www.phphelp.com/u/chorn)\
**Post date:** [October 26, 2020, 9:22am UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/2 "2020-10-26T09:22:54Z")

</div>

there may be multiple installations of PHP on your machine and CLI uses a different version then your webserver, contact your administrator.

---

<div class="post-metadata">

**Author:** ![zoldos](https://www.phphelp.com/user_avatar/www.phphelp.com/zoldos/32/4221_2.png) [@zoldos](https://www.phphelp.com/u/zoldos)\
**Post date:** [October 26, 2020, 2:04pm UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/3 "2020-10-26T14:04:19Z")

</div>

I’m the Admin. 🙂 It’s a dedicated, un-managed server and I have full root console and SFTP access. I only found PHP here: /opt/plesk/php/7.3/etc and phpinfo(); shows 7.3.22, but in console, php -v shows 7.0.33. How do I upgrade it? I found no reference at all to PHP 7.0.33 in phpinfo();, only 7.3.22. Very strange.

Here’s the full php -v result:

```
PHP 7.0.33-0ubuntu0.16.04.7 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.0, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache v7.0.33-0ubuntu0.16.04.7, Copyright (c) 1999-2017, by Zend Technologies

```

I’m confused…

---

<div class="post-metadata">

**Author:** ![chorn](https://www.phphelp.com/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@chorn](https://www.phphelp.com/u/chorn)\
**Post date:** [October 27, 2020, 7:15am UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/4 "2020-10-27T07:15:01Z")

</div>

what does `whereis php` say?

---

<div class="post-metadata">

**Author:** ![zoldos](https://www.phphelp.com/user_avatar/www.phphelp.com/zoldos/32/4221_2.png) [@zoldos](https://www.phphelp.com/u/zoldos)\
**Post date:** [October 27, 2020, 9:43am UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/5 "2020-10-27T09:43:59Z")

</div>

/usr/bin/php7.0 /usr/bin/php /usr/lib/php /etc/php /usr/include/php /usr/share/php7.0-curl /usr/share/php7.0-sqlite3 /usr/share/php7.0-mysql /usr/share/php7.0-common /usr/share/php7.0-readline /usr/share/php7.0-gd /usr/share/php7.0-mcrypt /usr/share/php7.0-zip /usr/share/php /usr/share/php7.0-xml /usr/share/php7.0-mbstring /usr/share/php7.0-opcache /usr/share/php7.0-json /usr/share/php7.0-imap /usr/share/man/man1/php.1.gz

Hmmm…

---

<div class="post-metadata">

**Author:** ![chorn](https://www.phphelp.com/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@chorn](https://www.phphelp.com/u/chorn)\
**Post date:** [October 27, 2020, 11:01am UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/6 "2020-10-27T11:01:33Z")

</div>

so obviously there’s some php 7.0 installed on your server.

---

<div class="post-metadata">

**Author:** ![zoldos](https://www.phphelp.com/user_avatar/www.phphelp.com/zoldos/32/4221_2.png) [@zoldos](https://www.phphelp.com/u/zoldos)\
**Post date:** [October 27, 2020, 11:35am UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/7 "2020-10-27T11:35:41Z")

</div>

Yup, saw that. So how do I upgrade it? Or set 7.3 as default? 🙂

---

<div class="post-metadata">

**Author:** ![chorn](https://www.phphelp.com/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@chorn](https://www.phphelp.com/u/chorn)\
**Post date:** [October 27, 2020, 12:41pm UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/8 "2020-10-27T12:41:18Z")

</div>

you can run `exec('whereis php')` from within PHP and set your $PATH variable in the linux shell accordingly

---

<div class="post-metadata">

**Author:** ![zoldos](https://www.phphelp.com/user_avatar/www.phphelp.com/zoldos/32/4221_2.png) [@zoldos](https://www.phphelp.com/u/zoldos)\
**Post date:** [October 27, 2020, 6:08pm UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/9 "2020-10-27T18:08:14Z")

</div>

Sounds good. But how exactly do I do that?

---

<div class="post-metadata">

**Author:** ![chorn](https://www.phphelp.com/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@chorn](https://www.phphelp.com/u/chorn)\
**Post date:** [October 28, 2020, 10:43am UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/10 "2020-10-28T10:43:08Z")

</div>

just like the manual says

[https://www.php.net/manual/en/function.exec.php](https://www.php.net/manual/en/function.exec.php)

---

<div class="post-metadata">

**Author:** ![zoldos](https://www.phphelp.com/user_avatar/www.phphelp.com/zoldos/32/4221_2.png) [@zoldos](https://www.phphelp.com/u/zoldos)\
**Post date:** [October 29, 2020, 12:12pm UTC](https://www.phphelp.com/t/help-php-v-shows-7-0-33-but-i-am-running-7-3-22-i-think/32714/11 "2020-10-29T12:12:36Z")

</div>

Okay gotcha. So I see where the PHP files are, then set PATH to point to it. 🙂
