Solved

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

Posted on 2001-06-26
8
225 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_
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 40

Expert Comment

by:RQuadling
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
 
LVL 40

Expert Comment

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

Thanks.

Richard.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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:
RQuadling 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

896 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now