Connect Firebird localhost DB with php

Chủ nhật - 16/02/2020 20:43
Connect Firebird localhost DB with php and install firebird with xampp
Connect Firebird localhost DB with php
<?php

$host = 'localhost:D:\LAP TRINH QLBH\SHOP 7.1\Programs-71\Database\SHOP.FDB';
$username = 'SYSDBA';
$password = 'masterkey';
$dbh = ibase_pconnect("localhost:D:\LAP TRINH QLBH\SHOP 7.1\Programs-71\Database\SHOP.FDB", "SYSDBA", "masterkey") or die('die message');
    $q = ibase_query($dbh, "select * from TDONHANG");
    while ($r = ibase_fetch_object($q)) {
        $some_value = $r->NAME;
        echo $some_value;
    }
//ibase_free_result($sth);
ibase_close($dbh);

?>
chi tiết
https://stackoverflow.com/questions/46205473/connect-firebird-localhost-db-with-php

HowTo: Install Firebird/Interbase with PHP on Windows. A step-by-step tutorial

Step 1:
Install Firebird SQL Download ( I install V2.5 )

Install XAMPP for Windows 10 64bit download
Step 2:
  • Download the zip archive: PHP Driver Download ( I install php 7.4 )
  • Extract the archive to D:\PHP Driver  

Configure PHP

  • Copy C:\Program Files\Firebird\Firebird_2_5\bin\fbclient.dll to your C:\windows\system32 directory and rename the file to gds32.dll ( If GDS32.dll not found )
    and also you can try copy fbclient.dll to
    C:\xampp\apache\bin
  • Copy php_interbase.dll, php_interbase_nts.dll from your D:\PHP Driver to  php\ext directory and to the C:\windows\system32 directory.
  • Copy libeay32.dll and ssleay32.dll from your C:\xampp  directory to the C:\windows\system32 directory.
  • Edit your php.ini, un-comment the line
    extension=php_interbase.dll
    extension=php_interbase_nts.dll
    (you have to remove the semicolon from that line).
  • Restart your webserver (Apache).
Bộ config sẵn tại đây

NB: the default admin username:password pair for Firebird is SYSDBA:masterkey.
+ https://firebirdsql.org/file/documentation/reference_manuals/fbdevgd-en/html/fbdevgd30-php-iface.html
+ https://www.php.net/manual/en/book.ibase.php
+ https://github.com/FirebirdSQL/php-firebird/tree/master/tests

CONFIG SCAN TO WEB

1
2
3
4

Xampp 3.4 ( PHP 7.4 ) nếu cài nuke thì báo lỗi Mcrypt library not available

 

1-First, you should download the suitable version for your system from here:
https://pecl.php.net/package/mcrypt/1.0.3/windows

Download file php_mcrypt-1.0.3-7.4-ts-vc15-x64 for xampp 7.4

2-Later, you should copy php_mcrypt.dll under ../xampp/php/ext/

3-you should enable extension like extension=mcrypt from xampp/php/php.ini

personly I modified the php.ini file and i add this lines :

extension=imap
extension=mcrypt

of course, these two lines have the 3 dll file saved on ../xampp/php/ext/ as :

php_imap.dll
php_mcrypt.dll




 
 Tags: Firebird

Tổng số điểm của bài viết là: 0 trong 0 đánh giá

Click để đánh giá bài viết

  Ý kiến bạn đọc

Bạn đã không sử dụng Site, Bấm vào đây để duy trì trạng thái đăng nhập. Thời gian chờ: 60 giây