Home arrow PHP arrow Executing Microsoft SQL Server Stored Procedure from PHP on Linux

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.

Author Info:
By: Jack Zhang
Rating: 4 stars4 stars4 stars4 stars4 stars / 33
October 20, 2003
  1. · Executing Microsoft SQL Server Stored Procedure from PHP on Linux
  2. · Preparation
  3. · Installing the Apache Web Server
  4. · Installing the Apache Web Server, Cont'd
  5. · Installing FreeTDS
  6. · Modify the PHP Source Code
  7. · Modify the PHP Source Code, Cont'd
  8. · Executing MS SQL Server Procedures from PHP
  9. · Conclusion

print this article

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.

blog comments powered by Disqus

- Removing Singletons in PHP
- Singletons in PHP
- Implement Facebook Javascript SDK with PHP
- Making Usage Statistics in PHP
- Installing PHP under Windows: Further Config...
- File Version Management in PHP
- Statistical View of Data in a Clustered Bar ...
- Creating a Multi-File Upload Script in PHP
- Executing Microsoft SQL Server Stored Proced...
- Code 10x More Efficiently Using Data Access ...
- A Few Tips for Speeding Up PHP Code
- The Modular Web Page
- Quick E-Commerce with PHP and PayPal
- Regression Testing With JMeter
- Building an Iterator with PHP

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials