- Easy way – using ODBC connection:
a) created 64-bit ODBC connection (System) in Windows
b) create user in your DB acc. to ODBC connection
c) use following source code:
$sql="SELECT top 10 First_Name,Last_Name FROM Person"; $rs=odbc_exec($conn,$sql);
2. proper way acc. to Actian:
You will need to download the Btrieve 2 SDK to do the build. It is available at https://esd.actian.com/. Go to the Zen product and under Actian Zen (PSQL) SDKs, download the Btrieve 2 SDKs for Zen/PSQL. Pick either Windows or Linux, which I believe your server right now is Windows. You will also need to download SWIG and gcc.
The instructions to build the API is as follows :
$ sudo apt install swig php-dev
$ tar -zxf Zen-SDK-Btrieve2API-linux-noarch-14.10.023.000.tar.gz
$ cd Zen-SDK-Btrieve2API-000-linux-noarch-14.10.023/swig
$ swig -php7 -I../include -c++ btrievePhp.swig
$ gcc $(php-config –includes) -I../include -fpic -c btrievePhp_wrap.cxx
$ gcc -shared -o btrievePhp.so btrievePhp_wrap.o -L/usr/local/actianzen/lib64 -lbtrieveCpp -lbtrieveC -lstdc++
$ sudo bash
# vi /etc/php/7.2/apache2/php.ini
— Add these lines to the end of the file:
include_path = „.:/usr/share/php:/home/jetson/ActianZen/BtrievePhp/Zen-SDK-Btrieve2API-000-linux-noarch-14.10.023/swig”
display_errors = On
# vi /etc/apache2/envvars
— Add this line at the end of the file:
# service apache2 restart
From an appropriate browser:
— Search for btrievePhp. You should find it listed under “Additional Modules”.
3 myśli na “RaspberryPI – project for „Baltic Robo Battles” 11 – how to connect from php to ActianZen”
My brother suggested I might like this website.
He was totally right. This post truly made my day.
You cann’t imagine simply how much time I had spent for this information! Thanks!
I must thank you for the efforts you have put in penning this site.
I really hope to check out the same high-grade content from
you in the future as well. In truth, your creative writing abilities has motivated me to get my own website now 😉
Wow, marvelous blog format! How lengthy have you ever
been running a blog for? you make blogging glance easy. The full glance of your website is wonderful, as well
as the content!