Connect PHP to SQL Server with Always on Encryption


I run web applications with PHP, SQLSRV and MS SQL (2014 web).

With the forthcoming GDRP legislation I am considering encrypting my sql databases. Please can anyone advise if ugrading to SQL Server 2016 (web) and using AlwaysOn Encryption is a possibility. I would like to not have to recode all my queries, but could easily change my connection strings.

I am also looking at row-level security as my database tables are shared across multiple clients, with an an identifiying "clientid" on each record to distiguish which record belongs to which client. Can anyone advise if this is possible and practical.

Thank you
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DBAduck - Ben MillerPrincipal ConsultantCommented:
I believe you are referring to Always Encrypted and not AlwaysOn encrypted.

With your PHP site you will need to ensure that you have the right version of either ODBC or the PHP driver that supports always encrypted. This is possible from what we know in your post. You will have to validate the specifics with driver versions and how your code has to change.  The only thing in your code that has to change is the connection properties you set in PHP.

Row Level security does exist in 2016 Web so you are good there.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwlloyd71Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.