Link to home
Start Free TrialLog in
Avatar of rajesha_
rajesha_

asked on

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

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.
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
Avatar of rajesha_
rajesha_

ASKER

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.
the mssql extension functions are not available
remove the ;
extension=php_mssql.dll

in your php.ini
us111, can you clarify the difference between the 2 ms sql dlls that are present.

Thanks.

Richard.
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
ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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:  https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
Finalized.