0

I am trying to make a connection between PHP and a SQL server's database. I'm running XAMPP, and I deleted the ; from extension=php_mssql.dll to enable the PHP extension by modifying the php.ini file.

When I run my script, however, PHP throws an error that says the function mssql_connect() doesn't exist.

What can I do to fix this?

4
  • remember to run php_info() to test your php.ini file. Many times people edit the wrong php.ini Commented Apr 8, 2011 at 19:21
  • 1
    Did you restart php after editing the php.ini? Commented Apr 8, 2011 at 19:25
  • What version of PHP? Look at this article. Commented Apr 8, 2011 at 19:32
  • all done the problem was i delete ; and try to use mssql_connect without do restart for apache tx all Commented Apr 9, 2011 at 8:22

2 Answers 2

1

So far xampp comes with MySQL and have not include Microsoft SQL Server (MSSQL)

Sign up to request clarification or add additional context in comments.

2 Comments

i knowww that but the function dosent run php give me error mssql_connect is unknown function
Latest xampp comes with php 5.3.5 and as I say mssql is not included php.net/manual/en/intro.mssql.php
0

As a general approach:

In the php.ini is an option

display_startup_errors = Off

Set that to On and call PHP (maybe from console). It should tell you what went wrong then.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.