virtual hosts have php version mismatch

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,

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

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

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


$ 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

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