Advertisement

12.08.2007 at 07:01PM PST, ID: 23011188
[x]
Attachment Details

Fatel Error connecting to SQL through PHP page

Asked by TycoonMillion in PHP and Databases

Tags: call, fatal, undefined, php

I can use php to connect to mysql with no problems but this is the first of me trying a mssql connection and I have a fatel error. Anything you can see I'm doing wrong from these details and anything I should do?

These are the two php extensions I uncommented...
extension=php_mssql.dll
extension=php_msql.dll

Dont worry about the password etc its all local and a university test database and access made up data.

Can you please confirm the  host and database settings. Database is the name of the database and host is something like RRB/SQLEXPRESS?   Just need to make sure I know the basics.

HERE IS THE ERROR
Fatal error: Call to undefined function mssql_connect() in C:\AppServ\www\ifolio\test.php on line 21Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
<?php
  /* Program: PetCatalog.php
   * Desc:    Displays a list of pet categories from the
              PetType table. Includes descriptions.
   *          User checks radio button.
   */
 
//...code...
?>
<html>
<head><title>PHP Test Page</title></head>
<body>
 
<?php
 
  $user="ifolio";
  $host="SQLEXPRESS";
  $password="25130217cmt";
  $database="test";
 
$Conn = mssql_connect("SQLEXPRESS","test","25130217cmt") or die("Unable to connect to server");
 
$Db=mssql_select_db("test",$Conn);
 
 
  $query = "SELECT * FROM test";#
  while($RS = mssql_fetch_array($SQL))
{
echo 'test'.$RS['test'].' ';
 
}
mssql_close($Conn);    
 
  $result = mssql_query($query)
       or die ("Couldn't execute query.");              #21
 
?>
</div>
</body></html>
[+][-]12.08.2007 at 07:05PM PST, ID: 20435912

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.09.2007 at 07:07AM PST, ID: 20437169

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.09.2007 at 10:39AM PST, ID: 20437662

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.09.2007 at 11:07AM PST, ID: 20437746

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.09.2007 at 11:13AM PST, ID: 20437762

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.09.2007 at 11:16AM PST, ID: 20437772

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: call, fatal, undefined, php
Sign Up Now!
Solution Provided By: nizsmo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]12.13.2007 at 08:30AM PST, ID: 20465458

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2007 at 09:02AM PST, ID: 20465757

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2007 at 09:08AM PST, ID: 20465799

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2007 at 09:10AM PST, ID: 20465813

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2007 at 09:35AM PST, ID: 20465961

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2007 at 07:41PM PST, ID: 20469591

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628