Microsoft PHP SQL Driver vs PHP SQL Driver

So, on my test machine, I had PHP with Apache, and I had the PHP SQL driver (not Microsoft). So, I used mssql_connect () and such commands to work with the database.

When I switched to another server, it has Microsoft PHP SQL Driver. Now it crashes and shows the PHP_via_FastCGI error when I execute mssql_connect () and other mssql_ php commands.

Could you advise how to solve this? Do I need to change the code to something else? If so, I have hundreds of files, do I need to change them in each?

Thank.

+3
source share
2 answers

() - Microsoft . - , db, : myConnect(...) myEXEC(...)

if ($givenDriver=='M') { 
    code using microsoft DB function 
} elseif ($givenDriver=='P') { 
    code using the PHP DB function 
} else { 
    error unknown connection type
}

PHP . $givenDriver.

+1

( SQL Server). . PHP SQL Driver Microsoft, .

( , Microsoft .)

+1
source

Source: https://habr.com/ru/post/1763135/


All Articles