We have a wordpress site with scripts that need to write to an Interbase db. Our developer attempted to add the extension to php via “extension=php_interbase.so” in php.ini to no avail. We use serverpilot and here is their answer “For Interbase, we build PHP with ODBC support. So, you’ll need to connect to your Interbase database server over ODBC.”
What would be the easiest way to do this? Can we add the php extension somehow or do we have to use the ODBC driver (with or without serverpilot)? As we have other sites coming over to DO, we want to get this right the first time and, though we like serverpilot, we are not tied to it.
We are running on the latest version of Ubuntu.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I cannot speak to whether this is possible with ServerPilot but our own one-click Wordpress image which uses the versions of Apache and PHP provided by Ubuntu would support installing interbase support with:
apt-get update;
apt-get install php5-interbase;
service apache2 restart;
If you need to connect to an Interbase database from your WordPress site and your server is running the latest version of Ubuntu, you have a couple of options. It appears that ServerPilot uses PHP built with ODBC support for Interbase, so you can either use ODBC or explore alternative server management solutions like manual server configuration or alternatives to ServerPilot.
Here are the steps to connect to an Interbase database from your WordPress site using ODBC:
sudo apt-get install unixodbc unixodbc-dev
sudo apt-get install firebird-dev
/etc/odbc.ini. Add an entry like this:[MyInterbaseDSN]
Description = My Interbase Database
Driver = /usr/lib/x86_64-linux-gnu/odbc/libinterbase.so
Database = /path/to/your/interbase/database.fdb
ServerType = 0
Adjust the Driver and Database paths to match your server configuration.
sudo apt-get install php-odbc
You may need to restart your web server after installing the extension.
$dsn = "MyInterbaseDSN";
$user = "your_db_username";
$password = "your_db_password";
$conn = odbc_connect($dsn, $user, $password);
if (!$conn) {
die("Connection failed: " . odbc_errormsg());
}
// Now, you can execute queries using $conn
Replace your_db_username and your_db_password with your Interbase database credentials.
By following these steps, you should be able to connect to your Interbase database using ODBC from your WordPress site.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.