473,320 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

mssql not loaded

Good day!

I try a lot of configuration to work my connection from php to mssql but still I cannot connect. And I got a code to check if the mssql was loaded.

Here is the code:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. if (function_exists('mssql_connect')){
  3. echo "Okay, fn is there<br>------------------<br>";
  4. } else {
  5. echo "Hmmm .. fn is not even there<br>------------------<br>";
  6. }
  7.  
  8. if(extension_loaded("mssql")) {
  9. echo "MSSQL is Loaded<br>";
  10. }
  11. else {
  12. echo "MSSQL not loaded<br>";
  13.  
  14. if(extension_loaded("msql")) {
  15. echo "MSQL is Loaded<br>";
  16. }
  17. else {
  18. echo "MSQL not loaded<br>";
  19. echo '<br><br>';
  20.  
  21. $ext = get_loaded_extensions();
  22. if(in_array('mssql', $ext))
  23. echo 'u have mssql installed<br><br>';
  24. else
  25. echo 'u do NOT have mssql installed<br><br>';
  26.  
  27. phpinfo();
  28. ?>
  29.  
And when I run this code the result is:

Hmmm….fn is not even there
----------------------
MSSQL not loaded
MSQL not loaded
You do NOT have mssql installed
And the list of phpinfo() appear.

Actually I run this code when my php version is php 5.2.4 and now I try it to php 5.1.4 and the result is still the same.

Web server is IIS 6.0
OS is Windows Server 2003 R2 Standard Edition
PHP version is php 5.1.4
MS SQL Server 2005 Express Edition –Windows Authentication.

I need to solved this problem because my connection in mssql is not working because call to undefined the function mssql_connect().

I hope somebody can help me. Almost three weeks I configure this connection and still I cannot connect.

Any help is highly appreciated.
Thank you.
Oct 11 '10 #1
1 1754
Atli
5,058 Expert 4TB
Hey.

Try installing PHP 5.2.4 or higher and using Microsoft's own Microsoft Drivers for PHP for SQL Server.

Note that this extension replaces the old mssql_* functions with sqlsrv_* functions.

You may want to take a look at these two articles as well.
- Introducing the Microsoft Drivers for PHP for SQL Server
- Example Application (SQLSRV Driver)
Oct 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I...
7
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that...
14
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with...
9
by: Advo | last post by:
Im having major problems trying to connect to a mssql database thats hosted on our server. I've got the ip, username, password and database name, yet no matter what i try, I cant seem to...
9
by: dunleav1 | last post by:
Does enabling/disabling Data Execution Prevention have a performance impact on SQL 2000 or SQL 2005? For SQL best performance - how should I configure for: Processor Scheduling: Programs or...
0
by: Derftics | last post by:
Hi Guys, Is there anyone who have tried installing MSSQL 2000 and MSSQL 2005 servers in one desktop computer? I have tried using MSDE and successfully install the MSSQL 2000 server but when I...
2
by: Todd Michels | last post by:
Hi all, I have PHP 5.2.1 installed on IIS, WinXP Pro. The MSSQL module is not loading, or any other module that needs to be loaded manually. PHP in general works, I am able to run...
2
by: Rob | last post by:
What is the main difference between a library compiled into PHP and one loaded in PHP.INI as an extension? The reason I ask is that I'm trying to use FreeTDS as a library to communicate to...
1
by: Bernhard Giden | last post by:
Hello everybody, I have some background questions regarding linked tables. I've used the MSSMA tool to link my access database to a remote MSSQL server. a) It seems that the SQL user password...
1
by: newphpcoder | last post by:
Actually, now I only test my webpage in a computer that I create as a server. And also I’m not too familiar in a server. Now I created a database in SQL Server 2005 Express and some of information I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.