I have XAMPP running on an MS Server 2012 R2. I need to make a connection to an MSSQL server which accepts only integrated win authentication.
If I simply try the below, I get a login failure and an error log on the SQL Server that SQL authentication is not an option. It only accepts connection from a certain user. Obviously the PHP script is not being run under that account.
$server = "sqlServerName";
$SQLUser = "username";
$SQLPass = "pw";
$SQLDatabase = "db";
$link = mssql_connect($server,$SQLUser,$SQLPass);
As I'm using PHP 5.3.1 sqlsrv_connect is not an option. I tried to load the php drivers for it but it's just not working. I can't change the authentication for the sql server and I can't use any other version of PHP.
I also can't turn the secure_connection on as I have to be able to connect to other sql servers which requires "normal" sql authentication:
mssql.secure_connection = Off
How to connect to my problematic sql server?
UPDATE: Upgraded xampp to the latest version. PHP is now version 5.6.8 I still can't use sqlsrv_connect() even though I installed the necessary driver and added every single dll to the php.ini. Restarted apache several times. Any clue?
error msg: Fatal error: Call to undefined function sqlsrv_connect()
mssql.secure_connection = Onin php.ini file to enable Windows authentication. But you are saying that you can't do it. I don't know what to do in this case.