Solved

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

Posted on 2001-06-26
8
212 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
Comment Utility
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_
Comment Utility
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
Comment Utility
the mssql extension functions are not available
remove the ;
extension=php_mssql.dll

in your php.ini
0
 
LVL 40

Expert Comment

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

Thanks.

Richard.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 8

Expert Comment

by:us111
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Finalized.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

762 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

12 Experts available now in Live!

Get 1:1 Help Now