Hi Daevid,

ODBC isn't that scary :)  You bascially need to link a Driver Manager into
PHP so it can knows how to bind to the ODBC layer.

The Quick and Dirty instructions are

1. download the iODBC sdk from www.iodbc.org,
2. add --with-iodbc=/path/to/iodbc in to your configure
3. proceed as usual per the unix install instructions:
http://www.php.net/manual/en/install.unix.php

Then you install drivers, and add to your script:

setenv("ODBCINI=/path/to/the/odbc.ini");
setenv("ODBCINSTINI=/path/to/the/odbcinst.ini");
setenv("LD_LIBRARY_PATH=/path/to/the/odbcsdk/lib"); //you might need the
odbc_driver/lib or database/lib here as well, depending on vendor of each.

I'm updating the HOWTO at www.iodbc.org to include php4 directions, but it's
pretty close to accurate now.

You can use OpenLink's Multi-Tier drivers - A free download is available
from www.openlinksw.com - no expiration and no limit on features, but the
free version caps at 2 concurrent connections to the database.  Install the
client on linux and server on win32.

N.B. when compiling, It's not necessary to
se --with-openlink.  --with-iodbc is fine since it's the same driver manager
you are linking against (we maintain iODBC).

It should take you about 30 minutes all told.
Let me know if you need help.

Best regards,
Andrew
--------------------------------------
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology
http://www.openlinksw.com
office:781.273.0900 x 27
mobile:781.608.4217

> -----Original Message-----
> From: Daevid Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 4:11 PM
> To: Darryl Friesen; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] how do I connect to MSSQL2000 and mySQL with PHP4
> and Linux?
>
>
> > By the way, I understand there are major issues with SQL2000 server.  In
> > that case, ODBC might be a better choice.
>
> Figures, that's the version we're using...
>
> So what all is involved with getting ODBC to work. Also, in case
> this wasn't
> obvious, I'm trying to connect from the PHP/Apache/Linux box TO a Win2k
> SQL2000 box -- will ODBC allow that type of thing or is it like JDBC where
> the 'applet' must be on the same box as the DB?
>
> I see in the PHP4 configure there are:
> --with-custom-odbc
> --with-iodbc
> --with-unix-odbc
> --with-openlink
>
> which one would I use for SQL2000? I assume I also need the ODBC drivers
> installed then too? ugh, I have a sinking feeling...
>
> I kinda need this up and working yesterday. I really underestimated this
> project. I figured I'd just simply compile in the 'mssql_' stuff, restart
> apache, and start harvesting my data. I had no idea there was going to be
> all these snags and work-arounds.
>
> d.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to