Asemon_report V3.2.0 now supports PHP 8 (tested with 8.1.12) with ODBC access to Sybase database
(old sybase_ct module is no longer supported with PHP8)
(Nevethelsess, this version of asemon_report supports also old PHP5.6.40 and module sybase_ct, with Sybase CT-Lib as before)
Following steps describe how to install asemon_report V3.2.0 with PHP 8 on Linux (tested on Centos)
Install these modules :
- php81 or recent php8.4 (tested on RedHat9)
- php-odbc
- unixODBC.x86_64
- unixODBC-devel.x86_64
Test your PHP. Ex. :
php -v
PHP 8.1.12 (cli) (built: Oct 25 2022 17:30:00) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
Install and configure ODBC
Install Sybase client (at least 15.7) (tested with Open Client V16SP04 on RedHat9)
The Sybase ODBC driver is $SYBASE/DataAccess64/ODBC/lib/libsybdrvodb.so
You should follow Sybase documentation to install Sybase ODBC driver and your ODBC DSN with the "odbcinst" utility
For example (as su) :
cd /usr/lib64
ln -s libodbc.so.2 /usr/lib64/libodbc.so
ln -s libodbcinst.so.2 libodbcinst.so
cd /your_OpenClient_Install/DataAccess64/ODBC/samples/
cp drivertemplate.txt mydrivertemplate.txt
cat mydrivertemplate.txt
[Adaptive Server Enterprise]
Description = Sybase ODBC Driver
Driver =/your_OpenClient_Install/DataAccess64/ODBC/lib/libsybdrvodb.so
FileUsage = -1
/usr/bin/odbcinst -i -d -f mydrivertemplate.txt
/usr/bin/odbcinst -q -d
[PostgreSQL]
[MySQL]
[MySQL-5]
[FreeTDS]
[MariaDB]
[Adaptive Server Enterprise]
cp sampletemplate.txt your_archive_server_name.txt
cat your_archive_server_name.txt :
[your_archive_server_name]
Description = SAP ODBC Data Source
UserID =
Password =
Driver = Adaptive Server Enterprise
Server = your_archive_ASE_host
Port = your_archive_ASE_port
Database = master
UseCursor = 0 # This is mandatory if you use PHP-ODBC rather than PHP-DBO_PDBC
/usr/bin/odbcinst -i -s -f your_archive_server_name.txt
/usr/bin/odbcinst -q -s
[your_archive_server_name]
Test access to your Archive Server with the isql installed with unixODBC module (not the Sybase isql) :
/bin/isql your_archive_server_name login password
Modify your /etc/php.ini to uncomment line :
extension=pdo_odbc
except if it is already defined in /etc/php.d/30-pdo_odbc.ini
Untar asemon_report_V3.2.4.tgz into a directory and change file owner to apache:apache . Ex. :
cd /var/www/html
mkdir asemon_report
cd asemon_report
tar xzvf /path_to_your_tar/asemon_report_V3.2.4.tgz
chown -R apache:apache *
If selinux is activated :
1) authorize httpd to acces to Sybase files and asemon_report :
chcon -t httpd_sys_rw_content_t /your_sybase_home_dir/ -R
chcon -t httpd_sys_rw_content_t /var/www/html/asemon_report/ -R
or (on RedHat 9) :
(check SELinux alerts with : sealert -l "*"
and apply recommended actions)
For example :
semanage fcontext -a -t httpd_sys_content_t "/your_asemon_report_dir/.*)?"`
restorecon -R -v /your_asemon_report_dir
2) authorize httpd to use sockets :
ausearch -c 'httpd' --raw | audit2allow -M my-httpd
semodule -i my-httpd.pp
or
ausearch -c "php-fpm" --raw | audit2allow -M my-phpfpm
semodule -X 300 -i my-phpfpm.pp
Restart httpd :
systemctl restart httpd
Access Asemon_Report
You can now call asemon_report in a browser with URL :
your_linux_host/asemon_report/asemon_report.php
You should see :
The very first time this takes some time to generate public and private keys in "asemon_report/COMMON/keys" for password encryption during login to Archive Server.
Then, enter your_archive_server_name, user and password in login area and click Connect. You should see your monitored servers.
If the connection fails, first, check if pdo and pdo_odbc modules are correctly installed by calling phpinfo :
your_linux_host/asemon_report/phpinfo.php
Wiki: Asemon report installation
Wiki: install asemon_report on Linux