Solved

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

Posted on 2001-06-26
8
245 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
Industry Leaders: 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!

 
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

Technology Partners: 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
Generate PDF from MySQL using PHP 3 52
Php logic to add to date card 9 37
MySQL-Design Help 12 38
How do i use the await event in php echo 5 14
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

740 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