So on my test machine, I had PHP installed with Apache, and I had the PHP SQL Driver (not the Microsoft one). So, I used mssql_connect() and such commands to deal with the database.
When I shifted to another server, it has Microsoft PHP SQL Driver. Now it is crashing and showing me error of PHP_via_FastCGI error, whenever I execute the mssql_connect() and the other mssql_ php commands.
Could you please advise on how to solve this? Do I need to change my code to something else? If that is the case, I have hundreds of files, do I need to change in each?
Thanks.
You will need to map (change) all the DB calls in the application to the Microsoft driver’s equiv functions or create an abstraction layer. An abstraction layer is where you make up your own db functions like:
myConnect(...)myEXEC(...)and within that you have code like
then everywhere in your code convert from the actual PHP driver commands to your abstraction layer commands. Then the code can easily switch between using one driver or another by changing the value of
$givenDriver.