vanderHobus
vanderHobus

Reputation: 41

"undefined function sqlsrv_connect()" in PHP + SQL SERVER

I developed an application in CodeIgniter with SQL Server connection. In my development environment all went well, when I move to the production environment (elsewhere), errors occurred.

Informations:

I added the following DLLs in the "ext" folder:

And added in my php.ini the following lines:

Even so, the following error occurs:

Message: Call to undefined function sqlsrv_connect()

(http://prntscr.com/a4ik36)

I tried many other similar topics here in the forum and the most was the lack of enabling the extension in php.ini, which is not my case ...

Upvotes: 2

Views: 139

Answers (2)

vanderHobus
vanderHobus

Reputation: 41

I realized the full deployment, downloaded again php, apache, DLLs, SQL connector, etc., and is now functioning normally. I imagine something previously was with x64 mismatch.

Upvotes: 0

Mr. Engineer
Mr. Engineer

Reputation: 3515

This might be the case.

There are two php.ini files.

1) Under php folder. // My Path : C:\wamp\bin\php\php5.4.12

2) Under apache folder // My path : C:\wamp\bin\apache\Apache2.4.4\bin

You need to add that extension lines in both of the file.

Upvotes: 1

Related Questions