Jump to content

Mac OS X, ODBC and PHP


This topic is 5656 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have Filemaker Server Advanced running on an Mac OSX server. The same server acts as our webserver. What I would like to do is use PHP to present and edit data through the webserver.

With a Windows server I have been able to achieve this using ODBC (Filemaker as the data source, php as the client). From what I have read I believe it is possible to do the same thing on a Mac OSX server, but have not succeded.

Filemaker on the Mac is set up to share data through ODBC. ODBC drivers are set up in OS X and checks run through ODBC administrator show a working connection.

However, when I try to connect to the ODBC data source through a php script (odbc_connect ($dsn, $db_user, $db_password)) the process freezes; there is no error message and no page is returned to the browser. In fact the browser reports that the connection is lost. I have tried connecting to a non-existent DSN and I can get a properly formed error message.

Warning: odbc_connect(): SQL error: [iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded, SQL state IM002 in SQLConnect

I have read that people have experienced some rather flaky results with an ODBC connection, but nothing to suggest that other people have experienced the same sort of problem.

Suggestions welcome.

Link to comment
Share on other sites

do you actually have an odbc driver installed? The error looks like it cannot find one.

If you have not explicitly set up an odbc driver that is probably why it's giving you that error. At least in my experience that has been the problem.

i haven't seen alot of good documentation on setting this up, there are some companies that provide odbc drivers for the mac, but you have to buy them.

hope this helps,



Link to comment
Share on other sites

  • Newbies

The sysadmin swears that when he tests the dsn in the odbc management tool he can connect to the filemaker database.

The problem seems to be when php tries to connect through the dsn

(I had considered putting this message into the php forum but that does not seem to get too involved in odbc issues)

Link to comment
Share on other sites

If you have Server Advanced running why not using fm-and-php? That should be much, much faster than using an ODBC-conneciton.

Download the FMPro Worksheet (http://www.fmpromigrator.com/downloads/demo_software/FmProWorksheet1.04MacOSX.dmg) and try your connection with this tool. If it works, there is something wrong with your php configuration.

Link to comment
Share on other sites

  • 2 weeks later...

I don't know....

The guys at FX.PHP -- I purchased their software to originally assist in development of PHP / FM stuff, but when I raised an issue with them regarding a serious PHP performance issue I was having they dropped off the face of the earth.

However the guy who wrote FM-and-PHP has been in regular contact over this issue. He has been helping to diagnose the problem even though he hasn't been remunerated for his efforts.

I have emailed FMWebSchool several times, but have had only one reply. Attached is the correspondence: (by the way, I replied to this email giving her the particulars and haven't heard anything back despite several further emails asking about status)


Hi Steve,

Thank you for your email. Do you know how many simultaneous users you have?

How many queries do you have per page? Make sure that the layouts you are accessing for each query contain only the fields necessary for the query.

In kindness,

Allyson Olm



-----Original Message-----

From: Steve Grant [mailto:[email protected]]

Sent: Tuesday, May 30, 2006 8:13 PM

To: [email protected]

Subject: FX Forge question / Support

Importance: High


A few months ago i purchased FX Forge and have been working with your tool and FX.PHP to produce a website.

Firstly, thank you for your effort in putting together the tool. It was instrumental in helping me understand what was going on, and a great learning tool

With what i have used, I have been able to successfully create a really cool solution -- BUT -- we have a problem that i am hoping you can help me with.

The system went live on Monday. During our testing, we had no issues.

But under load the system slwos down considerably. It **appears** to be a problem with multiple connections to the database.

The datbase is a survey database. it has four files; very simply in construction.

The performance grinds to a halt when more than 10 people write data to the database.

The server environment is Windows 2003 Enterprise on which is running

FMSA8 (patched to the latest patch)

The server is running both Filemaker and the publishing engine together.

The server has 80GB of drive space and 1GB Ram. System utiliziation does not appear to be an issue as the server itself is running well. Our regular filemaker connections don't have any issues accessing the data.

Any help you could give would be greatly appreciated.


Edited by Guest
Link to comment
Share on other sites

FMWebSchool doesn't develop FX.php - they develop tools for use in developing with FX.php. You should contact the FX.php folks directly for any questions regarding such. There's a lot of developers/consultatnts out there that could help as well - not only FMWebSchool (let me know offlist if you need some names).

I know there are a whole lot more folks using FX.php vs. FM-and-PHP. I'd suggest having a look at Lasso too .

- John

Link to comment
Share on other sites

This topic is 5656 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.