2

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:

  • PHP Version 5.6.18
  • Windows Server 2008 (x64)
  • Apache 2.4.18 (Win64)
  • SQLServer Express Edition 10.50.1600.1

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

  • php_pdo_mysql.dll
  • php_pdo_sqlsrv_56_ts.dll

And added in my php.ini the following lines:

  • extension=php_pdo_mysql.dll
  • extension=php_pdo_sqlsrv_56_ts.dll

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

2
  • 1
    You restarted Apache after changes to ini file? Commented Feb 17, 2016 at 17:59
  • Yes, restart apache every time I change anything... Commented Feb 17, 2016 at 18:10

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for reply. It is not my case! In my php "Loaded Configuration File" is "C:\WebServer\php\php.ini". I alter the correct file
Did you alter file under apache? If no, please try once.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.