Executing Microsoft SQL Server Stored Procedure from PHP on Linux
Learn how to setup, install and configure Apache and PHP on a Linux box to execute MS SQL stored procedures. This extensive article takes you through an in-depth look on how to achieve your ideal environment.
Executing Microsoft SQL Server Stored Procedure from PHP on Linux (Page 1 of 9 )
Stored procedures are intensively used in MS SQL Server based development today. If we choose Apache + PHP as a web solution, we can execute Microsoft SQL Server stored procedures from PHP by calling these 3 functions: mssql_bind(), mssql_execute(), and mssql_init().
Itís true that we can use these functions when we install PHP on a Windows platform with precompiled PHP binary code. But in most cases, when installed on a Linux platform with FreeTDS, you will receive an error in your PHP script. There isnít much information in the PHP documentation that can help you solve these problems. Some people might not think that these functions are available on a Linux/Unix platform.
In this article, I will show you how to make these 3 functions work successfully on a Linux Platform. Step by step, Iíll explain how to modify the PHP source code, and compile with FreeTDS and Apache. I will also give you all the testing code and necessary screenshots, so you can repeat each step on your own machine.