WANrestapi on CentOS 7


CentOS 7 provides PHP version 5.4 in its official repository. In order to upgrade to PHP 7.x follow the instructions listed below.

  1. Remove the old version of PHP. This will also remove the WANconsole package because it`s a PHP dependency. No data or configurations will be lost. The WANconsole package will be later installed.
    yum remove php*
    
  2. Install the EPEL repository configuration package
    yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    
  3. Install the Remi repository configuration package
    yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
    
  4. Install the yum-utils package
    yum install yum-utils
    
  5. Enable the Remi repository
    yum-config-manager --enable remi-php72
    
  6. Update
    yum update
    
  7. Install PHP 7.2
    yum install php php-pecl-mysql php-cli php-common php-gd php-ldap php-mbstring php-mysql php-pdo php-pear php-pecl-radius php-process php-snmp php-xml
    
  8. Install the Wanguard Console
    yum install WANconsole
    
  9. Update the php configuration file
    nano /etc/php.ini
    
    add: zend_extension=/opt/andrisoft/webroot/ixed/ixed.7.2.lin
  10. Restart PHP
    systemctl restart httpd
    
  11. Check PHP version
    php -v
    
    If you upgraded to PHP 7.2 the output should be: PHP 7.2.16 (cli) (built: Mar 5 2019 14:45:10) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with SourceGuardian v11.2, Copyright (c) 2000-2018, by SourceGuardian Ltd.
    You might receive the message below after executing php -v. Failed loading /opt/andrisoft/webroot/ixed/ixed.5.4.lin: /opt/andrisoft/webroot/ixed/ixed.5.4.lin: undefined symbol: _zend_hash_index_update_or_next_insert The message can be ignored. If you replace /opt/andrisoft/webroot/ixed/ixed.5.4.lin with /opt/andrisoft/webroot/ixed/ixed.[new version of PHP].lin. in /etc/php.d/andrisoft.ini the message will no longer be displayed. Please note that the contents of andrisoft.ini gets reseted to /opt/andrisoft/webroot/ixed/ixed.5.4.lin at every Wanguard upgrade.
  12. Install the WANrestapi package
    yum install WANrestapi
    


Your feedback is highly appreciated! Please contact support andrisoft.com if you encounter errors.



Author
Andrisoft Team
Date Created
2019-04-26 05:41:11
Date Updated
2019-05-09 08:48:46
Views
3273