Using MySQL with ODBC DSN?

I'm using a hosting provider that creates all MySQL DB's as 'local' and the only way of connecting to them is by ODBC DSN's.

Is it possible to specify this in zp-config for setup, and if so what is the syntax used?

Thanks in advance

Comments

  • acrylian Administrator, Developer
    Sorry, I have no knowledge about ODBC DSN at all. I fear this will not be possible if you can't enter your MySQL data like requested on the setup program.. But maybe my collegue has an idea about that later today.
  • As of right now, I don't think it's possible. But it shouldn't be too hard to add in by either adding support for `odbc_connect` or perhaps by passing the `CLIENT_ODBC` flag to the `mysql_connect` function if appropriate. The latter would probably be easier, but since I have little knowledge of this either, I don't know how well either solution would work.
  • Sorry: I, too, do not have experience with ODBC connections. If you wish to attempt this, we can at least answer questions from the Zenphoto point of view. All database handling is isolated to the functions-db script. Probably the only other script that would require change is the setup script in order to provide whatever paremeters the odbc connect might need. These would (presumably) be stored in the zp-config.php file.

    One approach to this might be creating an alternate functions-db script. We have done this sort of thing for the authorization library and could follow a similar approach.
  • Thanks for the responses to this. Given the complexity I've moved the gallery to a different host which made things much easier.
Sign In or Register to comment.