Web Development

(this page is a work in progress. please be patient! If you have specific questions, feel free to email us)

Downloads

FreeTDS

PHP

Goldmine Table Definitions Documentation

Contact US

Integrating Frontrange Goldmine (on Windows) and PHP (on Linux)

So you want to display information from your Goldmine database on your PHP enabled website?

Frontrange Goldmine runs on MS SQL (that's Microsoft SQL or SQL server and not MySQL, much to Google's dismay) and MSSQL runs on Windows, so you're going to have to get PHP to speak to Windows. Fortunately a little program called FreeTDS has made this task simple. FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases. Without going into too much detail, FreeTDS is an open source implementation of the Tabular DataStream protocol developed by Sybase which lets these databases talk to clients.

Step #1 :: Set up MS-SQL for access from your web server

First we need to create a MS SQL user which will be accessed from the web. Create a MS SQL user with read permissions only as we simply want to pull information from the SQL database and display it on the web. If you want to give your MS SQL user write reasons as well, then you should familiarize yourself with Goldmine's stored procedures which help you append information to the database (please read IMPORTANT DISCLAIMER below). For security reasons its better to have this user limited to read permissions in case your web server is compromised.


Step #2 :: Install FreeTDS on your web server

You will need root access to your server to install FreeTDS. Go to the FreeTDS website and download the latest stable release of FreeTDS . Follow the installation instruction in the download. Configure your freetds.conf file, add a new entry for your SQL server which should look something like this:

# MS SQL server  
[serverName] This will be the hostname you use in your PHP database connection.
host = 198.107.29.101 The IP of your SQL server
port = 1433 Standard port that SQL listens on for connections
tds version = 7.0 Use this for SQL Server 2000. For different versions, check the FreeTDS website.
client charset = UTF-8 This line is unneccesary in most cases.


Step #3 :: Recompile or Install PHP


It's a pain but you are probably going to have to recompile PHP with the --enable-mssql options (older versions of PHP use the --with-sybase option). There is some decent documentation about this on PHP.net and a through article on PHPBuilder.com.


Step #4 :: Grab Information from Goldmine and display it on your PHP website

How do I insert information into Goldmine from my website?

Goldmine 6.0 and above support the Goldmine Web Import feature. The way this works is by sending a specifically-formatted email to an email address which is set up in Goldmine. This email contains special headers, the Goldmine field names you wish to populate, and some settings that allow duplicate checking and how to handle duplicate records.

How do I set up Goldmine to automatically repond to these emails?

(coming soon)

How can I set up Goldmine so that it is always running and thus always retrieving and answering my emails?

(coming soon)

IMPORTANT DISCLAIMER: In general, you DO NOT want to try writing to the very obtuse Goldmine database unless you absolutely have to. The Goldmine client has a library of stored procedures which manage the entry of information into the database. Often a simple change in the Goldmine client will mean updating or reading several related tables behind the scenes. One alternative to getting information into the database is by using Goldmine's Web Import feature, however if you still insist on writing INSERT statements to add information to Goldmine, do so AT YOUR OWN RISK. Here's an informative article about using PHP to execute MSSQL stored procs that may help.

Web Hosting
Copyright © 2002-2003 Lieberman Consulting Services
Web Development and Website Design serving Tallahassee, Coral Gables, Miami and all of Florida
Top of Lieberman Consulting ServicesContact Us at Lieberman Consulting ServicesLieberman Consulting Services, A web design and hosting firm located in Coral Gables, Florida
Click Here to Alphabetize Any List!