468,765 Members | 1,153 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Help: Fatal error: Call to undefined function mssql_connect()

I have PHP Version 5.0.3 installed on Windows XP Pro with IIS as the
webserver. All is working well, except I get a -

Fatal error: Call to undefined function mssql_connect() in
C:\Inetpub\wwwroot\CertificateOccupancy\main.php on line 33

line 33: $conn = mssql_connect(toshibo,sa,ladeda) or die ("Could Not
Connect to Database");

when trying to use mssql_connect. Info.php shows that the mssql module
is loading which tells me that where I uncommented

extension=php_mssql.dll

in the php.ini file is working. I have set up paths for both the
c:\php\ext and c:\php directories.

I had PHP 4.3.10 installed on the same box a day earlier, and the
function worked. Also, I am using the ISAPI method for PHP instead of
the CGI if it matters.

Any ideas?

Jul 17 '05 #1
4 61036
Biffo wrote:
I have PHP Version 5.0.3 installed on Windows XP Pro with IIS as the
webserver. All is working well, except I get a -

Fatal error: Call to undefined function mssql_connect() in
C:\Inetpub\wwwroot\CertificateOccupancy\main.php on line 33
good way to at least get an idea of what's going on:

if (function_exists('mssql_connect'))
echo "Okay, fn is there"
else
echo "Hmmm .. fn is not even there");
from there you can start to diagnose the problem better.
extension=php_mssql.dll

in the php.ini file is working. I have set up paths for both the
c:\php\ext and c:\php directories.
does php_info() show the extension as successfully loaded?

I had PHP 4.3.10 installed on the same box a day earlier, and the
function worked. Also, I am using the ISAPI method for PHP instead of
the CGI if it matters.


only things i can think of:

1. you've changed something about your SQL Server Installation since then
(does the mssql extension require extra libraries or DLLs or something) ??
2. PHP5 put php.ini in a different location and you're editing the wrong
one. (i.e. you're editing c:\php.ini and PHP5 is looking in C:\windows or
vice versa ...)
3. some paths aren't quite set up to find DB libraries or something.
good ruck.
mark.

--
I am not an ANGRY man. Remove the rage from my email to reply.
Jul 17 '05 #2
Biffo wrote:
I have PHP Version 5.0.3 installed on Windows XP Pro with IIS as the
webserver. All is working well, except I get a -

Fatal error: Call to undefined function mssql_connect() in
C:\Inetpub\wwwroot\CertificateOccupancy\main.php on line 33


IN PHP 5 mysql is be default not loaded... go to you php.ini and remove
to ';' before the mysql.dll extension and put the mysql.dll in your
system32 folder.
It is possible that there are more dll files ( such as libmysql.dll and
a few more) you have to put in the system32 folder.. but you probably
got them all in the php 5 folder...

MI
Jul 17 '05 #3
On Wed, 19 Jan 2005 13:28:24 +1100, Muffinman
<bl*******************@custodis.cistron.nl> wrote:
Biffo wrote:
I have PHP Version 5.0.3 installed on Windows XP Pro with IIS as the
webserver. All is working well, except I get a -

Fatal error: Call to undefined function mssql_connect() in
C:\Inetpub\wwwroot\CertificateOccupancy\main.php on line 33


IN PHP 5 mysql is be default not loaded... go to you php.ini and remove
to ';' before the mysql.dll extension and put the mysql.dll in your
system32 folder.


mysql != mssql.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #4
Andy Hassall wrote:
On Wed, 19 Jan 2005 13:28:24 +1100, Muffinman
<bl*******************@custodis.cistron.nl> wrote:

Biffo wrote:
I have PHP Version 5.0.3 installed on Windows XP Pro with IIS as the
webserver. All is working well, except I get a -

Fatal error: Call to undefined function mssql_connect() in
C:\Inetpub\wwwroot\CertificateOccupancy\main.ph p on line 33


IN PHP 5 mysql is be default not loaded... go to you php.ini and remove
to ';' before the mysql.dll extension and put the mysql.dll in your
system32 folder.

mysql != mssql.

Sorry... but in the end it's probably the same problem anyway.. y=s

MI
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by gc | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.