Re: [php-49] Connecting to MS SQL from LAMP

From: user 7.
Sent on: Wednesday, November 19, 2008 9:51 PM
I don't know if this has been answered yet, but if you are attempting to connect to a SQL 2000 server via an encrypted pipe from over odbc using the deault SQL Server encryption, you are going to need to do some custom compiling -- it's a major pain in the arse. I have notes around somewhere about what the gotcha was, but I just made the decision to avoid that particular requirement in the future. Also, if there is any complexity in the SQL Server environment (such as clustering) a custom compile fails as well. Oh, and domain auth requirements will kill you too.

If you are able to run PHP with SQL Server, it's better on a Windows platform, either in Apache or IIS (via Phalanger or another method), you can use the new SQL Server native driver that gives you full functionality. MS support for PHP is getting better every day.

If your requirement is simply to dev in your LAMP environment, but you have the option of a Windows production environment, you can use PDO. The PHP Data Objects are similar to the Perl DBI in that the database platform doesn't effect the rest of your code at all -- you just change the connection string. You cannot take advantage of platform-specific syntax (such as stored procedures) this way, so you'll lose some application security best practices that may be important if this is sensitive data.

On Nov 17, 2008, at 6:37 PM, mahalie wrote:

Reading a lot of stuff all over the place - trying to find a simple tutorial on this topic. Then remembered someone mentioning pitfalls of connecting to MS SQL from Apache on this list, I think?

Anyway, following

Any input on sybase vs. obdc vs. mssql?

I have an existing MS SQL 2000 DB on the network and need to create an admin CRUD interface. Would really like to dev on my LAMP (php5). Haven't done this yet, can't move the DB yet either so if I can't get this working I'm going to have to torture myself with .NET again. Please don't let me do that...

Any general input appreciated while I try to wrap my head around installing freeTDS!


Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by mahalie ([address removed]) from The Seattle PHP Meetup Group.
To learn more about mahalie, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy