Connecting Tech Pros Worldwide Help | Site Map

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

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 10:48 AM
Biffo
Guest
 
Posts: n/a
Default 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?


  #2  
Old July 17th, 2005, 10:48 AM
Mark
Guest
 
Posts: n/a
Default Re: Help: Fatal error: Call to undefined function mssql_connect()

Biffo wrote:
[color=blue]
> 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[/color]

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.
[color=blue]
> 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.[/color]

does php_info() show the extension as successfully loaded?

[color=blue]
> 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.[/color]

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.
  #3  
Old July 17th, 2005, 10:48 AM
Muffinman
Guest
 
Posts: n/a
Default Re: Help: Fatal error: Call to undefined function mssql_connect()

Biffo wrote:[color=blue]
> 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[/color]

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
  #4  
Old July 17th, 2005, 10:49 AM
Andy Hassall
Guest
 
Posts: n/a
Default Re: Help: Fatal error: Call to undefined function mssql_connect()

On Wed, 19 Jan 2005 13:28:24 +1100, Muffinman
<blah6#*REMOVE#*THIS#*@custodis.cistron.nl> wrote:
[color=blue]
>Biffo wrote:[color=green]
>> 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[/color]
>
>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.[/color]

mysql != mssql.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
  #5  
Old July 17th, 2005, 10:49 AM
Muffinman
Guest
 
Posts: n/a
Default Re: Help: Fatal error: Call to undefined function mssql_connect()

Andy Hassall wrote:[color=blue]
> On Wed, 19 Jan 2005 13:28:24 +1100, Muffinman
> <blah6#*REMOVE#*THIS#*@custodis.cistron.nl> wrote:
>
>[color=green]
>>Biffo wrote:
>>[color=darkred]
>>>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[/color]
>>
>>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.[/color]
>
>
> mysql != mssql.
>[/color]


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

MI
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.