Call to undefined function mssql_connect()

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
nmzike
Forum Newbie
Posts: 2
Joined: Mon Apr 18, 2005 6:54 pm

Call to undefined function mssql_connect()

Post by nmzike »

Hello, I am very new at php. I am running an MSSQL server and my test web site on the same box. PHP5 is installed using the windows installer from php.net. the box is a Win2000 server. When I attempt to use mssql_connect or pdo_mssql_connect I keep getting one error after another. Any assistance in setting up my connection to the db would be greatly appreciated. My php.ini file is uncommented where it should be and complies now without any errors. I just can not seem to get the system to see the mssql dlls. When I installed php, my mssql dll was php_pdo_mssql, not the php_mssql.dll that I have read about.

Thanks,
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mssql isn't enabled by default. You need to edit your php.ini to add the extension.
nmzike
Forum Newbie
Posts: 2
Joined: Mon Apr 18, 2005 6:54 pm

mssql enabled

Post by nmzike »

That I understood. I did enable it in the php.ini file.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

and it still happens? Did you forget to restart the server?
Death
Forum Newbie
Posts: 17
Joined: Tue Apr 19, 2005 11:52 am

Post by Death »

Hi, I am having a similar problem.

I uncommented this line in php.ini:

extension=php_mysql.dll

I also copied php_mysql.dll to WINDOWS/system32/ which is where I keep php5ts.dll

(I also tried putting php_mysql.dll in WINDOWS/system/)

The error is:

Unable to load dynamic library './php_mysql.dll' - The specified module could not be found.

I stopped and started IIS and also reset my computer.

I'm using the cgi version of php.

What should I do ?

Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that's the MySQL extension... not Microsoft SQL Server (MSSQL).
Post Reply