Ubuntu/Php/Sybase: Connecting sysbase database with php7

<?php /*========== install at ubuntu: ============== sudo apt install php-sybase //================================== append this into /etc/freetds/freetds.conf: (192.168.0.250:2638 is an example:) //================================== sudo nano /etc/freetds/freetds.conf [connName] host = 192.168.0.250 port = 2638 tds version = 7.4 database = MYDB //====== php: */ $connName = "connName"; $user = "myuser"; $pass = "mypass"; $st="dblib:host=$connName;charset=iso8859-1"; $conn = new PDO($st,$user,$pass); /* $conn->prepare($sql_query); ...etc */
Ubuntu/php7.0/sybase connection throughout freetds.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.