# virtual hosts have php version mismatch

**URL:** <https://forums.interworx.com/t/virtual-hosts-have-php-version-mismatch/15375>\
**Category:** General Discussion\
**Created:** [October 19, 2019, 8:11am UTC](https://forums.interworx.com/t/virtual-hosts-have-php-version-mismatch/15375 "2019-10-19T08:11:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![javapipe](https://forums.interworx.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@javapipe](https://forums.interworx.com/u/javapipe)\
**Post date:** [October 19, 2019, 8:11am UTC](https://forums.interworx.com/t/virtual-hosts-have-php-version-mismatch/15375/1 "2019-10-19T08:11:18Z")

</div>

Hello,

A vhost has been updated to remi PHP7.2.23 and the site loads correctly. But when you ssh as that user and do php -v it shows php7.0.33.

How do I fix this mismatch? Right now im using /opt/remi/php72/root/usr/bin/php to accommodate but I shouldnt need to.  
Where are the vhost env variables set for the following:  
LD\_LIBRARY\_PATH=/opt/remi/php70/root/usr/lib64  
PATH=/opt/remi/php70/root/usr/bin

Or do i just override this in vhost .bashrc?

Thanks,

---

<div class="post-metadata">

**Author:** ![javapipe](https://forums.interworx.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@javapipe](https://forums.interworx.com/u/javapipe)\
**Post date:** [October 19, 2019, 8:13am UTC](https://forums.interworx.com/t/virtual-hosts-have-php-version-mismatch/15375/2 "2019-10-19T08:13:30Z")

</div>

nevermind I just figured it out. Siimply change vhost .bashrc source /opt/remi/php70/enable to source /opt/remi/php72/enable.

---

<div class="post-metadata">

**Author:** ![d2d4j](https://forums.interworx.com/user_avatar/forums.interworx.com/d2d4j/32/16_2.png) [@d2d4j](https://forums.interworx.com/u/d2d4j)\
**Post date:** [October 19, 2019, 8:24am UTC](https://forums.interworx.com/t/virtual-hosts-have-php-version-mismatch/15375/3 "2019-10-19T08:24:39Z")

</div>

Hi javapipe

I am sorry, using ssh to bring php details would always show the system php and not the version of php used by siteworx accounts

To correctly view the php version used by a siteworx account, you need to upload a info.php and view in a browser

I hope that helps a little

Many thanks

John

---

<div class="post-metadata">

**Author:** ![javapipe](https://forums.interworx.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@javapipe](https://forums.interworx.com/u/javapipe)\
**Post date:** [October 19, 2019, 10:42am UTC](https://forums.interworx.com/t/virtual-hosts-have-php-version-mismatch/15375/4 "2019-10-19T10:42:39Z")

</div>

Actually you may be wrong. After updating the user’s .bashrc:

```auto

$ php -v
PHP 7.2.23 (cli) (built: Sep 25 2019 07:56:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd.
    with Zend OPcache v7.2.23, Copyright (c) 1999-2018, by Zend Technologies

```

---

<div class="post-metadata">

**Author:** ![d2d4j](https://forums.interworx.com/user_avatar/forums.interworx.com/d2d4j/32/16_2.png) [@d2d4j](https://forums.interworx.com/u/d2d4j)\
**Post date:** [October 20, 2019, 2:51am UTC](https://forums.interworx.com/t/virtual-hosts-have-php-version-mismatch/15375/5 "2019-10-20T02:51:37Z")

</div>

Hi Javapipe

Many thanks

I know see what you are meaning and you can change this withour SSH/bashrc as follows:

login to nodeworx  
goto siteworx \_ show list of all siteworx accounts  
edit the siteworx account you want to change default PHP version (this does not change the PHP version in use by siteworx account if set differently)  
goto default PHP option  
change to PHP you want as default PHP version  
Save

See picture [ATTACH=JSON]{“data-align”:“none”,“data-size”:“medium”,“data-attachmentid”:46185}[/ATTACH]

you can check by ssh and looking .bashrc

Many thanks

John

 ![default php version.png](https://forums.interworx.com/uploads/default/original/1X/0cd9fd4b117a81f424a0e1a8dca5fcd93cf79ab7.png)
