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.
- 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*
- Install the EPEL repository configuration package
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- Install the Remi repository configuration package
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
- Install the yum-utils package
yum install yum-utils
- Enable the Remi repository
yum-config-manager --enable remi-php72
- Update
yum update
- 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
- Install the Wanguard Console
yum install WANconsole
- Update the php configuration file
nano /etc/php.ini
add: zend_extension=/opt/andrisoft/webroot/ixed/ixed.7.2.lin - Restart PHP
systemctl restart httpd
- 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. - Install the WANrestapi package
yum install WANrestapi
Your feedback is highly appreciated! Please contact support
andrisoft.com if you encounter errors.
AuthorAndrisoft Team
Date Created26 April 2019
Date Updated9 May 2019
Views13,122

