Undefined function sqlsrv_connect()

MySQL is more like a girl friend and cozy with WAMP.
MS SQL Server becomes the arrogent gal for WAMP. She does all the drama before falling in love with WAMP.

I know WAMP should not be preferred if you want to be away with MySQL. But many of us prefer in installing WAMP cause it comes with

  1. The desired PHP version
  2. Apache webserver is automatically taken care as compatible with your PHP 5.x.x version (You just cant put any Apache httpd with your PHP X)
  3. You get many required DLL files with installation to /ext folder like – C:\wamp\bin\php\php5.5.12\ext. Need not to download them from here and there.
  4. Ofcourse the GUI is so quick and easy to
    a) run/stop the services,    b) look for the PHP.ini for any changes,   c) look for the httpd.conf for any changes

See what happens when you try to work with SQL server into WAMP’s PHP
1. You need to download the DLL for SQL server supported by PHP
2. Make a change to php.ini file for this dll

Here is the step by step guideline from installation to troubleshoot:
A. Download the DLL file
1) Complete this table from your installed environment (done so far)
a) PHP Version – Something like 5.5.12 or 5.3.4 or ?
b) PHP dll –  Like php5ts.dll or php5.dll or ?  [ Look to the directory – C:\wamp\bin\php\php5.5.12]
c) Microsoft Driver Version -> ? ( We will do it in next few minutes)
d) Required SQL Server DLL file -> ? ( We will do it in next few minutes)

To get the 1c & 1d, launch the website – https://docs.microsoft.com/en-us/sql/connect/php/system-requirements-for-the-php-sql-driver

Your 1a & 1b are the key to find the c & d from this page and that is too critical to get the correct one. DONT BE IN HURRY!

2) Time to download the 1d) now from https://www.microsoft.com/en-us/download/details.aspx?id=20098. In the next screen after pressing “DOWNLOAD”,
select the right exe SQLSRV30.EXE/SQLSRV31.EXE/SQLSRV32.EXE/SQLSRV40.EXE
Those 30, 31, 32 or 40 are nothing but the 1c- Microsoft Driver Version

B. Changes to PHP.ini file
Look for the php.ini file into Apache folder, not the one at PHP folder – like C:\wamp\bin\apache\apache2.4.9\bin
Add these two lines at related place into the ini file as per your downloaded dll
    extension=php_sqlsrv_55_ts.dll
    extension=php_pdo_sqlsrv_55_ts.dll 
C. Restart the server
Are you still getting an error while running your PHP code – “Unable to find sqlsrv_connect()”

D. You are happy to GO – May be or No No No!
If so, issue could be with the dll and that is something more your OS as 32 bit or 64 bit.
Let us try to overcome this:
1. Download this Microsoft ODBC Driver 11 for SQL Sever
https://www.microsoft.com/en-us/download/details.aspx?id=36434
ENU\x64\msodbcsql.msi  -> 64 bit


Restart the WAMP and see if this brings a good luck to you. IF NOT
2. Here is the ROB’s page http://robsphp.blogspot.in/2012/06/unofficial-microsoft-sql-server-driver.html
which may bring a smile to your face.
Download the Unofficial Microsoft SQL Server Driver for PHP – https://onedrive.live.com/?id=669EE24817961774%21123&cid=669EE24817961774
and hope this should work for you.

Since this is unofficial, hence I am instructing to try into steps till A to D1. If fails then only go for D2.

HIPAA for IT folks

Security is always an issue with IT people and HIPAA has given another torque to the Healthcare departments – Failure to comply with HIPAA can cost your practice up to $250,000 for a single offense.

We have been reading this since years. I am working into healthcare projects since last 6 years with two top most payers in USA plus other smaller clients as well both in provider & payer spaces. Thank God! Never fallen into a situation where either me, my company or my client needs to pay those several zeroes dollars.

 Then why HIPAA? Must be a law brought by parliament person to show their congress/democratic power to the general public!!! Oh really?

 For those who are not aware with HIPAA act specially the IT guys not aware with HIPAA Title II – EDI Simplification, they are getting a periodic instructions from their IT department to protect the PHI data. HIPAA Privacy & Security Laws mandate protection and safeguards for access, use and disclosure of PHI and/or ePHI with sanctions for violations. PHI refers below:-Medical record number, account number or SSN, Patient demographic data, e.g., address, date of birth, date of death, sex, e-mail / web address, Dates of service, e.g., date of admission, discharge Medical records, reports, test results, appointment dates.

Last month I took a session on Healthcare 101 – A basic training. Few queries were raised by the audience on HIPAA slides. So my article here is to prove the real importance of these PHI data and hence to say why is HIPAA so important for us? Hope few case studies  borrowed from internet along with my explanation will make this topic con-vincible to you.

Case Study 1:  First victim under HIPAA violation

Huping Zhou (http://journal.ahima.org/2010/04/29/californian-sentenced-to-prison-for-hipaa-violation/) was the first person in the nation to receive jail time for a misdemeanor HIPAA offense—for accessing confidential records without a valid reason or authorization but not profiting from it through the sale or use of the information.  Zhou was in prison for four months along with a fine of $2000.  He was a licensed cardiothoracic surgeon in China before immigrating to the US, was employed as a researcher with the UCLA School of Medicine.   Over the next three weeks, Zhou abused his access to the organization’s electronic health record system to view the medical records of celebrities and high-profile patients [ Wish I could list those few names here, but again it may under come HIPAA violation radar ]. He has accessed the UCLA record system 323 times during the three-week period.

 Okay so case study #1 says – it was a violation of PHI data. Still no evidence for any physical or economic damage. Let me take you to the next level of crime now.

Case Study 2: Impact on an individual if his/her Medical Record is exposed

A patient was diagnosed with HIV and he was with a physician for quite a long time for the ongoing treatment. Later on he was supposed to be transferred to another physician for continuity care. The current physician’s secretary has mistakenly faxed his medical record to the patient’s employer instead of the new physician. His employer came to know about the case and finally the he was terminated.

A similar case happened with a 30 yr. FBI veteran. He was sent on leave when the pharmacy released information about his treatment of depression without his permission.

 A candidate for Congress nearly saw her campaign derailed when newspapers published the fact that she had sought psychiatric treatment after a suicide attempt.

Hope you understood why should not be MR exposed to everyone?

 Case Study 3:  Impact in marketing strategies

Let us assume I run a chain of hospitals in my state. I may leak a huge routine test data to particular drug company. This company put a lot of analytics and find a major percentage is impacted with cancer. Next day the drug company may launch a product claiming for the right treatment as per the need and posts a 10% discount to increase the sell.  People falling into this category may take it randomly because of their utter need instead of much analysis on the product features.

Indeed this has happened. A few weeks after an Orlando woman had her doctor perform some routine tests, she received a letter from a drug company promoting a treatment for her high cholesterol.

With a similar thought, if a banker receives this data – it may launch a new loan scheme in the market.

A survey shows 40% insurers disclose PHI data to employers, lenders, marketers without customer permission.  You might have read the privacy cases on Google or Facebook as well. Ultimately government is trying to make you safer from this digital universe as well.

 I am sure, now you will take precaution while working with any EMR database, CCR/CCD/HL7/EDI files or a DICOM images. At least I do!

Let us think – You get Citrix to work with such client, rather than working in your local environment. Is this a HIPAA rule or just a secure way of doing your work?

To explain you the HIPAA – I will recommend you to refer the Google. Cause I have a tiny knowledge on it. But in a context of IT professional – I will try to simplify it for you. Here is the HIPAA checklist – http://www.hipaanews.org/checklist.htm. Please follow them religiously and officially whenever you execute a Healthcare project.

Now answer to the question Citrix usage is required under HIPAA or not? –> Let us explore the relevant checklist item(#17 & #18) from above link.

#17Has your organization completed a Security Evaluation on the information systems used in conjunction with maintaining your current and future Protected Health Information?

#18Does your organization have virus checking software, firewalls and operating systems that provide encryption and other security measures?

So ultimately HIPAA act is nowhere telling to use the Citrix, but the act needs a secure system to be used- and hence our client provides for us. So ultimately Citrix becomes just one way of fulfilling the clause under HIPAA act. What is import to understand from this is, whenever there is a security audit (internal or external) – You have to assure that working system is 100% secure and no penetrable. This way you have to think about the entire checklist to assure that you are not violating the act anywhere knowingly or unknowingly.

Disclaimer: I have composed this topic from my understanding point of view on HIPAA. Excuse for any conceptual/grammatical/typos mistakes. There could be better ways to explain the same.

 Feel free to comment on this!

EVERYBODY IS CULPRIT HERE….

Ten years ago, I was a student. Looking at the situation, I hated the Indian police all the time.

I saw the traffic police taking a silly bribe of 10/- excusing his fault.

I have gone to police station and begged the officer to lodge an FIR when one of the stupid snatched the mobile phone from my friend’s hand.

They took 50/- from me for clicking a snap to a restricted area of a waterfall in a botanical garden. They took it but did not give any receipt.

A police man stopped me at Mumbai CST station, took my mobile phone, looking into all the snaps I had in my mobile, browsed all the videos. I am not sure was he trying to find a secret information about planting a BOMB in BSE Sensex building or a porn video upon which he can ask me a 6″ long 500/- currency!

Just now I called my wife and enquired if she has encountered any such problems. Politely she said – Not exactly. What she has hated about RPFs (Railway Police Forces) behaving miserably in vendor coaches and in general class of bogies in train. They proclaimed the right meaning of Sarkar Raj.

I am a software engineer now. Felt those police would have changed in these many years. But it remains same. May be those 10/- became 100/- now and so 50/- became 500/-. Look at the magic of zero. Good! That’s how the economy has grown to our country in last one decade.

Don’t know how many times abused them, cursing them, making fun of their lathis, Khakhi topis, junk donali bandook, unbalanced abdomen… ha ha ha. No more they should be considered as protector of society, beneath harming the society.

It’s really so easy to find a fault in other person and blame them for every genuine or silly matters.

Once again – I am a software engineer. Oh come-on! Already you said it. Why are you repeating?

Yes proudly speaking – I am a software engineer. I took my job with my own guts. I had a skill set, I have not begged anyone for a reference neither I asked my parents to give me a cheque of Rs. 50000 for serving it under the table.

I am into a job profile where nothing like bribe. I don’t take a bribe like those police men or any other government official. I am into a job profile where everything is systematic, well organized, recorded at each step.

Just a silly thinking about this job profile; if all the software engineers are so well human being, then probably heaven will have the scarcity of keeping the people.

So what? What is that I want to prove myself? – I am an honest man with a clean chit. Aaaah!

Let me explore myself or my job carefully. Reader of this blog should not consider me as a victim; hence I will take up the cases here across the software industry relating live situation around me, my friends or a 2nd or Nth degree of friends. Though we don’t have a blood relation, but still connected. Connected via Facebook!

Knowingly I quoted to my client for 100 hours to complete a module in Java against an actual effort of 50 or 60 hrs.

I just messaged my boss “I am not keeping well, hence cannot come to office …” while the fact was my kid needs a pair of new shoes right now.

Several times I updated the status to my USA client as “Today it was a connection issue while accessing those remote servers and hence could not finish the task…”

I remember when I resigned from one of my past company tried to take as much as codes I can paste into my Gmail account. These were the programming codes either wrote by me or by my colleagues taking so much pain. I would have invested weeks to run that SQL query perfectly but stolen it in just few seconds.

When I see the consumed space in my laptop, I find 30% of space is reserved by eBooks. I did not have any internet connection or dongle for my personal computer. But still every week I used to download 2-3 books, copy it to my pen drive and make my eLibrary richer. 3 yrs. back when I counted I could find I got eBooks for more than 60,000 INR at zero cost. They were either downloaded from a right link or were torrented illegally.

We got a printer in our working environment and I use it for my credit card statements, IRCTC ticket booking, resume, recipes for my wife, images for interior design, Lyrics of MLTR songs, Ganesha festival details for society’s notice board …… Hardly have I taken a print out which says “How does a Java compiler works?”

Every time I take a leave for 5 days to visit my native but it is always a delay of 1 day; as my train used to be late while reaching Mumbai.

I know my juniors are not taking the work seriously. I called them for a quick meeting and said I got a call from senior management and he wants us to deliver this module by today EOD. Let’s do it forgetting that there is a night for sleep.

We rejected several candidates despite they did very well in interviews; just for a reason that they expected a high salary or it was a long notice period.

Overall I lie, I misuse things, I misguide people, I steal things – Hence I am a culprit too. How can I blame those police man when myself as a big fault?