| | |
PHP MSSQL APACHE problem in coonecting to database
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2007
Posts: 1
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Oct 2007
Posts: 4
Reputation:
Solved Threads: 0
I believe the correct function is
Not mssql_connect() as you have typed.
Hope that helps.
PHP Syntax (Toggle Plain Text)
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.
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.
If my post is useful please add to my reputation.
Thanks.
Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
Thanks.
Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
If my post is useful please add to my reputation.
Thanks.
Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
Thanks.
Ajtrichards Web Solutions | http://www.ajtrichards.co.uk
Retenovate | http://www.retenovate.com
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.
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>
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.
Do a favour, leave me alone
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.
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.
![]() |
Similar Threads
- I am New In MySQL. Problem With MySQL Database Plz Help. (MySQL)
- PHP 2 MsSQL (PHP)
- PHP sessions/$_POST problem. Too Stressed today! (PHP)
- PHP, mySQL, Apache all in one (PHP)
- PHP not working with Apache. (Linux Servers and Apache)
- Using PHP, MySQL and Apache Server (PHP)
Other Threads in the PHP Forum
- Previous Thread: A Tricky Question for You!
- Next Thread: Dynamically updating values in a form as you type?
Views: 2899 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cookies cron curl database date directory display download dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery js limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql stored structure subdomain syntax system table tutorial update updates upload url validation validator variable video web xml youtube





