Re: [PHP-DB] how do I connect to MSSQL and mySQL with PHP4 and Linux?

2001-03-28 Thread Darryl Friesen

> I see this FreeTDS thing (www.freetds.org), but do I really need that?
> I don't even know what it is really? The 'FAQ' is not very informative for
a
> 'novice'.
> It seems like some extra layer of minutiae that I don't want to deal with.
>
> Isn't there some way to compile PHP "--with-mssql" just like there is
> "--with-mysql"?

No.

> And there are all these built in mssql_connect() etc functions in PHP
> already, how would FreeTDS effect that?

It lets you use them.

There are two ways to talk to an SQL server, ODBC (in which case you'd use
the odbc_* functions) or TDS (using the sybase_* or mssql_* functions).
You'll need support installed on your linux box for at least one of these
protocols.

All the unix based ODBC stuff I've seen also _requires_ software to be
installed on your SQL server.  TDS does not; think of it as the 'native'
protocol spoken by the MS SQL server (and Sybase servers actually).  It's
_way_ easier than ODBC (I never could get ODBC support installed and working
on our Digital Unix machines). FreeTDS is a free, open source implementation
of the TDS protocol.

>I guess I was hoping this would be simple, like mySQL connectivity was...

It's no more work than MySQL.  In order to compile PHP with MySQL support,
you first had to install MySQL.  In order to talk to a Sybase or MS SQL
server, you need to install TDS.

FreeTDS is very easy to install.  You should be able to install FreeTDS and
recompile PHP in under an hour.  The only tricky part is knowing what port
the SQL server listens on (the default is 1433).

Feel free to email me if you need more help.

By the way, I understand there are major issues with SQL2000 server.  In
that case, ODBC might be a better choice.


- Darryl

 --
  Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
  Education & Research Technology Services, http://gollum.usask.ca/
  Department of Computing Services,
  University of Saskatchewan
 --
  "Go not to the Elves for counsel, for they will say both no and yes"




-- 
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-DB] how do I connect to MSSQL and mySQL with PHP4 and Linux?

2001-03-28 Thread Daevid Vincent

I run Apache, PHP4, RH Linux, and mySQL currently. Everything is fine.
What I need to do is get Microsoft SQL Server in there as well.

I see this FreeTDS thing (www.freetds.org), but do I really need that?
I don't even know what it is really? The 'FAQ' is not very informative for a
'novice'.
It seems like some extra layer of minutiae that I don't want to deal with.

Isn't there some way to compile PHP "--with-mssql" just like there is
"--with-mysql"?
And there are all these built in mssql_connect() etc functions in PHP
already, how would FreeTDS effect that?

on this page:
http://www.php.net/manual/en/ref.mssql.php
there is an example on how to compile everything, but it still shows freeTDS
in there.

I looked through the archives:
http://marc.theaimsgroup.com/?l=php-db&w=2&r=2&s=mssql+mysql&q=b
but didn't find anything remotely useful.

I guess I was hoping this would be simple, like mySQL connectivity was...

Thanks in advance,

Daevid.com


-- 
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]