944,173 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4517
  • PHP RSS
Oct 24th, 2007
0

PHP MSSQL APACHE problem in coonecting to database

Expand Post »
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
[B] 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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
grmurali is offline Offline
1 posts
since Oct 2007
Oct 24th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

I believe the correct function is

PHP Syntax (Toggle Plain Text)
  1. mysql_connect();

Not mssql_connect() as you have typed.

Hope that helps.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Rankenian is offline Offline
4 posts
since Oct 2007
Oct 24th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

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.
Reputation Points: 15
Solved Threads: 17
Junior Poster
phper is offline Offline
189 posts
since Nov 2006
Oct 24th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

Reputation Points: 15
Solved Threads: 17
Junior Poster
phper is offline Offline
189 posts
since Nov 2006
Oct 24th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

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

try these

gsamk123
Last edited by fatihpiristine; Oct 24th, 2007 at 7:29 pm.
Reputation Points: 6
Solved Threads: 19
Posting Whiz in Training
fatihpiristine is offline Offline
283 posts
since Sep 2007
Nov 4th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
naturegirrrl is offline Offline
12 posts
since Nov 2007
Nov 4th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

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>
Last edited by fatihpiristine; Nov 4th, 2007 at 5:15 pm.
Reputation Points: 6
Solved Threads: 19
Posting Whiz in Training
fatihpiristine is offline Offline
283 posts
since Sep 2007
Nov 4th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
naturegirrrl is offline Offline
12 posts
since Nov 2007
Nov 4th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

didnt you install php??
Reputation Points: 6
Solved Threads: 19
Posting Whiz in Training
fatihpiristine is offline Offline
283 posts
since Sep 2007
Nov 4th, 2007
0

Re: PHP MSSQL APACHE problem in coonecting to database

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
naturegirrrl is offline Offline
12 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: A Tricky Question for You!
Next Thread in PHP Forum Timeline: Dynamically updating values in a form as you type?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC