Announcement

Collapse
No announcement yet.

virtual hosts have php version mismatch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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,

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

    Comment


    • #3
      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

      Comment


      • #4
        Actually you may be wrong. After updating the user's .bashrc:

        Code:
        $ 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

        Comment


        • #5
          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 Click image for larger version

Name:	default php version.png
Views:	1
Size:	85.6 KB
ID:	46185

          you can check by ssh and looking .bashrc

          Many thanks

          John

          Comment

          Working...
          X