Solved

Connection Problem of PHP 4.0, Apache and  MSSQL  2k.

Posted on 2001-06-26
8
252 Views
Last Modified: 2006-11-17
Hi all,

  I have tried hard to connect sql server with php4.0.

  but every time I got one error.

  $hostname = "myServer";
  $username = "sa";
  $password = "";
  MSSQL_CONNECT($hostname,$username,$password) or DIE  
  ("DATABASE FAILED TO RESPOND.");

--> Fatal error: Call to undefined function: mssql_connect() in F:\Appache\HtDocs\test...

Win2k, SQL Server 2k, PHP 4.0.
The connection params are valid and ntwdblib.dll exist in the system directory.
I have i uncommented the extension=php_mssql70.dll line in php.ini at sys root file.

ur suggetion will highly appreciated.
Thanks in advance.

 Rajesha.
0
Comment
Question by:rajesha_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 6227280
Junior guessing but, has the server been restarted since the introduction of the mssql settings in php.ini?

If so, if you use

<?php phpinfo(); ?>

Do you get settings regarding the MSSQL connection?


Also, is the case of the function correct? I know that PHP is case sensitive for variables, what about functions too?

mssql_connect(...)

rather than

MSSQL_CONNECT(...)

maybe.

Regards,

Richard Quadling.
0
 

Author Comment

by:rajesha_
ID: 6227631
Hi RQuadling ,

   I have use the correct case for mssql_connect() function i.e. in lower case.

Also I had restared the appache after the php.ini had been edited.

 I want to know that, If run <?php phpinfo(); ?>

 what setting regarding the sql server  should I get ?

 Thanks for your response.

 Regards
 Rajesha.
0
 
LVL 8

Expert Comment

by:us111
ID: 6230376
the mssql extension functions are not available
remove the ;
extension=php_mssql.dll

in your php.ini
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 40

Expert Comment

by:Richard Quadling
ID: 6230433
us111, can you clarify the difference between the 2 ms sql dlls that are present.

Thanks.

Richard.
0
 
LVL 8

Expert Comment

by:us111
ID: 6230471
That's a really good question! anaway I have no idea :))
I believe one for SQL7 and the other one for the previous version

rajesha, have you restart IIS ??? don't forget
0
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 50 total points
ID: 6230494
There is a new service pack for SQL 2K. It is in 3 parts and is 100MB in total.

Available from ...

http://www.microsoft.com/sql/downloads/default.asp

Regards,

Richard.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6419147
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:

1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.

2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

3.  Ask Community Support to help split points between participating experts.  Just comment here with details.

4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.

PLEASE DO NOT AWARD THE POINTS TO ME.

____________________________________________



Hi Experts:

In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.

Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.

Thank you everyone.

Moondancer :)
Community Support Moderator @ Experts Exchange

P.S.  REGARDING POINTS, Guidelines and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6929811
Finalized.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do I remove "" from json_encode 5 35
Can't Find the Homepage on my site 4 46
Which is best Image Resizing Web service 11 42
Ajax success not firing alert 6 44
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question