Forums

khvalera
khvalera
Offline
Resolved
0 votes
Is it possible to install PHP 7 on ClearOS version 7.9.1?
Sunday, March 06 2022, 10:54 AM
Share this post:
Responses (5)
  • Accepted Answer

    Wednesday, March 16 2022, 11:37 AM - #Permalink
    Resolved
    0 votes
    Do a "which php" and have a look at the executable which is a small script. If you have a file .phpenv in any folder from where you are executing the command up to the root with contents of 70, 71,72 or 73 (the file test is a bit out of date), then the relevant version of php should be used automatically. Try creating the .phpenv file. Alternatively use the full path to the executable. If you are using the Web Server, set the PHP version in the Web Server app. It can be set for each website individually.
    The reply is currently minimized Show
  • Accepted Answer

    khvalera
    khvalera
    Offline
    Sunday, March 06 2022, 04:45 PM - #Permalink
    Resolved
    0 votes
    php binaries of different versions are located in: /opt/rh/rh-php*/root/bin/php

    php73: /opt/rh/rh-php73/root/bin/php
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, March 06 2022, 04:21 PM - #Permalink
    Resolved
    0 votes
    khvalera wrote:

    I did this, but after enabling PHP 7.3 in the web interface, PHP 5.4.16 remains in the system.
    php -v
    PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17

    That is the internal php version for webconfig.

    I do not know any more how to check the webserver php version, but you should find it on the forum.
    The reply is currently minimized Show
  • Accepted Answer

    khvalera
    khvalera
    Offline
    Sunday, March 06 2022, 04:13 PM - #Permalink
    Resolved
    0 votes
    I did this, but after enabling PHP 7.3 in the web interface, PHP 5.4.16 remains in the system.
    php -v
    PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, March 06 2022, 03:42 PM - #Permalink
    Resolved
    0 votes
    Checkout the Marketplace.
    You can install PHP 7.3 easily with the webconfig App

    https://documentation.clearos.com/content:en_us:7_ug_php_engines
    The reply is currently minimized Show
Your Reply