I am new user I have a system which has Apache2.2.4, PHP 5.2.3 in windows xP proffessional service pack 2. My MSSQL server is in remote place .
I have access to the server by using the windows authentication only.

when I use script
$host='mass.com ';
$user='gs\amk123';
$pass='Almn!2345';( windows password ie my login password)

$connection = mssql_connect($host, $user, $pass) or die("Unable to connect");

i got error like this
Fatal error: Call to undefined function mssql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\m.php on line 8

plz give me a solution ASAP.

I believe the correct function is

mysql_connect();

Not mssql_connect() as you have typed.

Hope that helps.

Rankenian - mysql_connect(); is the incorrect function. This is to connect to a MYSQL database.

Grmurali - mssql_connect is the correct function to use. The error message you have means that PHP doesn't know what the function is. You may not have uncommented the mssql extension in your php.ini file.

Open php.ini thats in your PHP directory, find your extensions then the mssql extension and remove the ;

Save php.ini, restart Apache and you should be ready to rock.

since when we have "\" slash in user names?

try these

gsamk123

I am reading the posts trying to resolve my Apache/php problem and noted this post about a PHP.ini file.
Did a search and I don't have a PHP.ini file.

I did download PHP
Downloaded Apache and got it to run

but not publishing at http:/localhost to see my hello world program which lives in my htdocs rootl.

Any ideas? I'm really frying here.

in http.conf

find this row: ( this setting is for my server, change the path )

DocumentRoot "d:/websites"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>

#
# This should be changed to whatever you set DocumentRoot to.
#


change this one also as path

<Directory "d:/websites">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#


here you set what file is gonna be shown as first
i set it index.aaa
if you want to show index.php as main file set it to index.php


<IfModule dir_module>
DirectoryIndex index.aaa
</IfModule>

apache seems to be working fine with html file but NOT php

have added php to addtypes

When I click on a php page get an error that says doesn't know what to open it with

thanks,
b

Hi all, getting weary here, any help appreciated BIG TIME!

everything seems to be working, (thank god) except the parsing of php
apache and browser see and parse .html files but not .php files

If I call a php file in the browser it will parse the html <title> tag but not the php echo to the page.

I am getting dumber by the minute and need to have this working by day break tomorrow AM.

yes I did install PHP, and Rapid PHP 2007 IDE, and Html-kit IDE with PHP plug ins--oh but forgot the kitchen sink.

This article has been dead for over six months. Start a new discussion instead.